/* Journal Studio sign-in. Ink surface from theme/DESIGN.md: the page is the
   writing room before the paper, so it stays on ink and the brand green is
   used only here, where it reads at 8.8:1. The manuscript behind the panel is
   drawn by login.js (Three.js); without WebGL the gradients below stand in. */

:root {
  --ink: #0a1628;
  --soot: #101f36;
  --smoke: #1b2d47;
  --bone: #f6f5f3;
  --ash: #9aa5b5;
  --ash-2: #8d97a8;
  --accent: #98c341;
  --accent-light: #d8fb8e;
  --danger: #f2555a;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: max(20px, min(4vw, 56px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 78% 110%, rgba(152, 195, 65, 0.10), transparent 60%),
    radial-gradient(90% 70% at 10% -10%, #13284a, transparent 70%),
    var(--ink);
  color: var(--bone);
  font: 400 1rem/1.5 var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.manuscript {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; opacity: 0; transition: opacity 1.6s ease;
}
.manuscript.is-live { opacity: 1; }
/* keeps the type legible over the moving field: dark where the words sit */
.veil {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 22, 40, 0.80) 0%, rgba(10, 22, 40, 0.30) 46%, rgba(10, 22, 40, 0.05) 100%),
    linear-gradient(0deg, rgba(10, 22, 40, 0.55) 0%, transparent 16%, transparent 80%, rgba(10, 22, 40, 0.65) 100%);
}

.frame {
  position: relative; z-index: 1;
  min-height: 100%;
  display: grid; grid-template-rows: auto 1fr auto;
  padding-block: max(22px, env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.top, .bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash-2);
}
.wordmark--logo { display: inline-flex; align-items: center; gap: 14px; }
.brand-logo { display: inline-flex; align-items: center; height: 50px; padding: 0 14px; border-radius: 10px; background: var(--bone); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }
.brand-logo img { display: block; height: 38px; width: auto; }
.wordmark { font-weight: 700; letter-spacing: -0.01em; text-transform: none; font-size: 1.05rem; color: var(--bone); }
.wordmark span { color: var(--accent); font-weight: 500; }

.stage {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px);
  align-items: center; gap: clamp(32px, 6vw, 96px);
  max-width: 1240px; width: 100%; margin: 0 auto; padding-block: clamp(32px, 6vh, 72px);
}

.eyebrow, .panel__eyebrow {
  margin: 0 0 18px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}
h1 {
  margin: 0; font-weight: 680; text-transform: uppercase;
  font-size: clamp(3rem, 8.6vw, 8.4rem); line-height: 0.92; letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 em {
  font-family: var(--font-body); font-style: italic; font-weight: 400; text-transform: none;
  letter-spacing: -0.02em; color: var(--accent-light);
}
.dek {
  margin: 28px 0 0; max-width: 30rem;
  font: italic 400 clamp(1.15rem, 1.6vw, 1.4rem)/1.45 var(--font-body); color: var(--ash);
}

.panel {
  position: relative;
  padding: clamp(28px, 3.2vw, 40px);
  background: linear-gradient(180deg, rgba(16, 31, 54, 0.82), rgba(10, 22, 40, 0.88));
  border: 1px solid var(--smoke);
  border-radius: 18px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(246, 245, 243, 0.04);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: rise 0.9s cubic-bezier(.2, .7, .2, 1) both 0.15s;
}
.panel__eyebrow { display: flex; align-items: center; gap: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(152, 195, 65, 0.18); }
.panel h2 { margin: 0 0 10px; font: 500 clamp(2rem, 2.6vw, 2.5rem)/1.05 var(--font-body); letter-spacing: -0.015em; }
.panel__copy { margin: 0 0 26px; font: 400 1.15rem/1.5 var(--font-body); color: var(--ash); }
.panel__copy strong, .panel__fine strong { color: var(--bone); font-weight: 500; }

.status {
  display: grid; gap: 4px; margin: -6px 0 22px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--smoke); background: rgba(246, 245, 243, 0.03);
  font-size: 0.9rem; line-height: 1.4; color: var(--ash);
}
.status > strong { color: var(--bone); font-weight: 600; }
.status span strong { color: var(--bone); font-weight: 600; }
.status--error { border-color: rgba(242, 85, 90, 0.5); background: rgba(242, 85, 90, 0.08); }
.status--error > strong { color: var(--danger); }
.status--ok > strong { color: var(--accent); }

.google {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border-radius: 12px;
  background: var(--bone); color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, background .25s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 12px 30px -14px rgba(152, 195, 65, 0.0);
}
.google__g { width: 22px; height: 22px; flex: none; }
.google span { flex: 1; }
.google__arrow { width: 20px; height: 20px; flex: none; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.google:hover { transform: translateY(-1px); background: #ffffff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 16px 34px -14px rgba(152, 195, 65, 0.55); }
.google:hover .google__arrow { transform: translateX(3px); }
.google:active { transform: translateY(0); }
.google:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.google[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.google[aria-busy="true"] .google__arrow { animation: nudge 0.9s ease-in-out infinite; }

.panel__fine { margin: 20px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--ash-2); }

.bottom__live { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.caret { width: 2px; height: 12px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes nudge { 50% { transform: translateX(4px); } }

.lede > * { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.lede > :nth-child(2) { animation-delay: .06s; }
.lede > :nth-child(3) { animation-delay: .14s; }

@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
  .veil { background: linear-gradient(180deg, rgba(10, 22, 40, 0.55) 0%, rgba(10, 22, 40, 0.80) 55%, rgba(10, 22, 40, 0.92) 100%); }
  .top__note { display: none; }
}
@media (max-width: 480px) {
  h1 { font-size: clamp(2.6rem, 14vw, 3.6rem); }
  .panel { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .manuscript { opacity: 1; }
}
