@font-face {
  font-family: "homira";
  src: url("./assets/homira.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --surface: rgba(20, 20, 20, 0.72);
  --surface-solid: #1a1a1a;
  --page: #000000;
  --gold: #fcb900;
  --gold-ink: #141210;
  --danger: #ff5a73;
  --danger-soft: rgba(255, 90, 115, 0.12);
  --focus: #fcb900;
  --info: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --radius-pill: 200px;
  --font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "homira", "Open Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(252, 185, 0, 0.16), transparent 55%),
    radial-gradient(700px 480px at 100% 20%, rgba(80, 90, 110, 0.25), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #000 45%, #050505 100%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 1.25rem));
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 0
    max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom)));
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.brand-logo {
  display: block;
  width: min(220px, 70vw);
  height: auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.75rem 1.5rem 1.5rem;
  animation: rise 0.45s ease both;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.panel[hidden] {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    animation: none;
  }
}

.headline {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.9rem 0.95rem;
  font: inherit;
  font-size: 16px; /* avoid iOS zoom on focus */
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.field input:focus {
  border-color: rgba(252, 185, 0, 0.7);
  box-shadow: 0 0 0 3px rgba(252, 185, 0, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 420px) {
  .captcha-row {
    grid-template-columns: 1fr auto;
  }
}

.captcha-box {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f1ea;
  padding: 0.25rem;
  cursor: pointer;
  height: 52px;
  width: 148px;
}

.captcha-box:hover {
  border-color: var(--gold);
}

.captcha-box canvas {
  display: block;
  width: 140px;
  height: 48px;
}

.pause-note {
  background: var(--info);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}

.pause-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.pause-note a,
.lede a,
.fine a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.pause-note a:hover,
.lede a:hover,
.fine a:hover {
  text-decoration: underline;
}

.fine {
  margin-top: -0.5rem;
  font-size: 0.9rem;
}

.warning {
  background: rgba(252, 185, 0, 0.08);
  border: 1px solid rgba(252, 185, 0, 0.28);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.85rem;
  margin-bottom: 1.25rem;
}

.warning h2 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
}

.warning ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  display: grid;
  gap: 0.55rem;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  margin-top: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.actions {
  display: grid;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.95rem 1.15rem;
  min-height: 48px;
  width: 100%;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid rgba(255, 90, 115, 0.55);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.error {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 90, 115, 0.35);
  color: #ffb3bf;
  font-size: 0.9rem;
}

.error[hidden] {
  display: none;
}

@media (max-width: 559px) {
  .brand {
    margin-bottom: 1.25rem;
  }

  .brand-logo {
    width: min(180px, 58vw);
  }

  .panel {
    padding: 1.35rem 1.1rem 1.2rem;
  }

  .headline {
    font-size: clamp(1.4rem, 6.2vw, 1.7rem);
  }

  .lede,
  .pause-note p,
  .warning ul,
  .check {
    font-size: 0.9rem;
  }

  .warning {
    padding: 0.9rem 0.85rem 0.75rem;
  }

  .warning h2 {
    font-size: 1.05rem;
  }

  .captcha-box {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  /* Keep account first / primary; delete below on phone */
  .btn-danger {
    order: 2;
  }
}

/* Tablet / PC */
@media (min-width: 560px) {
  .shell {
    width: min(640px, calc(100% - 2.5rem));
    padding: 2.5rem 0 4.5rem;
  }

  .brand-logo {
    width: 240px;
  }

  .panel {
    padding: 2.15rem 2rem 1.9rem;
  }

  .headline {
    font-size: clamp(1.7rem, 2.2vw, 2.05rem);
  }

  .captcha-row {
    grid-template-columns: 1fr auto;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .btn {
    padding: 0.95rem 1.35rem;
  }

  .btn-danger {
    order: initial;
  }
}

/* Large desktop breathing room */
@media (min-width: 1100px) {
  .shell {
    width: min(680px, calc(100% - 3rem));
    padding-top: 3.25rem;
  }
}
