/* boxpeak.com (#1006). Colours from the logo (BoxPeak3.svg): navy #23314c, red #cd3243. */
:root {
  --navy: #23314c;
  --night: #141c2e;
  --dusk: #1e2b45;
  --red: #cd3243;
  --red-dark: #ad2535;
  --ink: #1b2333;
  --muted: #5b6478;
  --line: #d3d8e2;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background-color: var(--night);
  background-image:
    radial-gradient(64rem 30rem at 50% -8rem, rgba(205, 50, 67, 0.62), rgba(205, 50, 67, 0) 72%),
    linear-gradient(180deg, var(--dusk) 0%, var(--night) 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* The sunrise behind the peak in BoxPeak's red logo: thin rays from the top edge, fading out. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 75vh;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% -2rem,
    rgba(255, 255, 255, 0.07) 0deg 1.1deg,
    rgba(255, 255, 255, 0) 1.1deg 7deg);
  -webkit-mask-image: radial-gradient(55% 90% at 50% 0, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 78%);
  mask-image: radial-gradient(55% 90% at 50% 0, #000 0%, rgba(0, 0, 0, 0.5) 40%, transparent 78%);
}

.wrap {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 16px 32px;
}

.lang {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
}
.lang:hover { background: rgba(255, 255, 255, 0.14); }

.card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.logo {
  display: block;
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 22px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--navy);
}

.lead {
  margin: 6px 0 24px;
  text-align: center;
  color: var(--muted);
}

form { margin: 0; }

label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0 0 16px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(35, 49, 76, 0.16);
}

.pw { position: relative; }
.pw input { padding-right: 72px; }
.show {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.show:hover { background: #eef0f5; }

.primary {
  display: block;
  width: 100%;
  height: 50px;
  margin: 8px 0 0;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 50px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.primary:hover { background: var(--red-dark); }
.primary:active { transform: translateY(1px); }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 20px;
  font-size: 15px;
}
.links a { color: var(--navy); text-underline-offset: 3px; }
.links a:last-child { font-weight: 600; }

.foot {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}
.foot p { margin: 4px 0; }
.foot a { color: #fff; text-underline-offset: 3px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(205, 50, 67, 0.55);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .wrap { padding-top: 64px; }
  .card { padding: 28px 20px 24px; border-radius: 16px; }
  .logo { width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
