/* Sign-in page. Deliberately shares login.css's token block rather than
   importing that 1,800-line landing stylesheet: this page needs the palette and
   the two type families, not the six marketing sections. Keep the values below
   in step with login.css — they are one design, not two. */

:root {
  color-scheme: dark;
  --bg: #0c0e11;
  --panel: #12151a;
  --line: #292f38;
  --line-soft: rgba(255, 255, 255, .075);
  --text: #f2f3f5;
  --dim: #adb4bf;
  --faint: #747d89;
  --gold: #dda83f;
  --gold-bright: #f2c35e;
  --bad: #f27272;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --display: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 4%, rgba(221, 168, 63, .10), transparent 32rem),
    linear-gradient(rgba(221, 168, 63, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221, 168, 63, .035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 76px 76px, 76px 76px, auto;
  color: var(--text);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

/* Same grain as the landing page. Flat dark surfaces read as unfinished
   without it, and the two pages sit one click apart. */
body::before {
  position: fixed;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--gold-bright);
  color: #17130b;
  font-weight: 800;
}

.skip-link:focus {
  transform: none;
}

/* ---- header ------------------------------------------------------------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 0 clamp(20px, 5vw, 78px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .25em;
}

.mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--gold);
  color: #1c1305;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

.language-picker select {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.back-link {
  color: var(--dim);
  font-size: 13px;
  transition: color .2s ease;
}

.back-link:hover {
  color: var(--text);
}

/* ---- sign-in panel ------------------------------------------------------ */

main {
  display: grid;
  flex: 1;
  align-content: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 78px) clamp(64px, 9vw, 112px);
}

.panel {
  width: min(100%, 620px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .19em;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  background: var(--gold);
  content: "";
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.lede {
  max-width: 52ch;
  margin: 22px 0 40px;
  color: var(--dim);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.62;
}

.start-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: rgba(18, 21, 26, .93);
  /* Tinted to the page ground rather than pure black. */
  box-shadow: 0 26px 70px rgba(6, 8, 11, .55);
}

.start-card > div:first-child {
  display: grid;
  gap: 5px;
}

.start-card strong {
  font-size: 15px;
}

.start-card span {
  color: var(--faint);
  font-size: 12px;
}

.google-wrap {
  min-width: 300px;
  min-height: 44px;
}

.status {
  margin: 14px 0 0;
  color: var(--bad);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

.status:empty {
  display: none;
}

.privacy {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 12px;
}

/* ---- closed notice ------------------------------------------------------ */

.notice {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.notice h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.notice p {
  max-width: 56ch;
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.65;
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  transition: border-color .2s ease, transform .12s ease, background-color .2s ease;
}

.contact:hover {
  border-color: var(--gold);
  background: rgba(221, 168, 63, .07);
}

.contact:active {
  transform: translateY(1px);
}

.contact::after {
  color: var(--faint);
  content: "→";
}

.contact:empty {
  display: none;
}

/* ---- footer ------------------------------------------------------------- */

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 5vw, 78px);
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 720px) {
  .start-card {
    flex-direction: column;
    align-items: stretch;
  }

  .google-wrap {
    min-width: 0;
  }

  .site-nav {
    min-height: 66px;
  }

  .brand .wordmark {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .contact {
    transition: none;
  }
}

/* ---- desktop client ------------------------------------------------------
   Google refuses its sign-in flow inside an embedded application window, so
   the app swaps the Google card for a handoff to the real browser. Hidden by
   default and revealed only when the preload bridge sets data-client: a
   browser must never be shown a button that asks an app that is not there. */
.desktop-signin { display: none; }
body[data-client="desktop"] .start-card { display: none; }
body[data-client="desktop"] .desktop-signin { display: block; }
.desktop-signin .desktop-copy { display: grid; gap: 6px; margin-bottom: 18px; }
.desktop-signin strong { font-size: 16px; }
.desktop-signin span { color: var(--dim, #aeb5c0); font-size: 13px; line-height: 1.6; }
.desktop-button {
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--gold, #dda83f);
  background: var(--gold, #dda83f);
  color: #201400;
  font: 700 14px/1 inherit;
  cursor: pointer;
}
.desktop-button[disabled] { opacity: .55; cursor: progress; }
.desktop-status { margin: 14px 0 0; color: var(--dim, #aeb5c0); font-size: 13px; line-height: 1.55; }
.desktop-status.bad { color: var(--bad, #f36b6b); }
