/* ---------- ID — Confident Maximalism ---------- */

:root {
  /* Palette (colors.rac.so) */
  --void: #222c33;
  --n-2: #29333e;
  --n-3: #313f4c;
  --n-4: #6a8090;
  --n-5: #ccd6e0;
  --n-6: #edf1f5;
  --white: #ffffff;

  --lava: #f33c2c;
  --viridian: #2a9d8f; /* ink: cool, calm — the "you" color */
  --verdigris: #40b868; /* chrome: warm, fresh — the "go/success" color */

  /* Roles */
  --ink: var(--void);
  --paper: var(--n-6);
  --rule: 3px solid var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Subtle paper grain — adds tactility without competing with content */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(34,44,51,0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 33%, rgba(34,44,51,0.03) 0 1px, transparent 1px),
    radial-gradient(circle at 41% 71%, rgba(34,44,51,0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 88% 89%, rgba(34,44,51,0.03) 0 1px, transparent 1px);
  background-size: 320px 320px;
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  border: 1.5px dashed var(--n-4);
  background: rgba(255,255,255,0.4);
  padding: 32px 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stage {
  display: flex;
  flex-direction: column;
}

/* ---------- Typography ---------- */

.display {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 16px 0 14px;
}
.display.tight { margin: 16px 0 12px; }

.ink-viridian { color: var(--viridian); font-style: italic; }
.ink-verdigris { color: var(--verdigris); font-style: italic; }
.ink-lava { color: var(--lava); font-style: italic; }

.lead {
  font-size: 19px;
  line-height: 1.5;
  max-width: 520px;
  margin: 0 0 32px;
}

.fineprint {
  font-size: 13px;
  line-height: 1.6;
  color: var(--n-4);
  margin-top: 24px;
  max-width: 460px;
}

.meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--n-5);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--n-4);
}
.meta code { word-break: break-all; }

/* ---------- Logo grid (R-pentomino) ---------- */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 80px;
  aspect-ratio: 1;
  background: var(--void);
  padding: 0;
  margin-bottom: 16px;
}
.logo-grid span {
  background: var(--void);
  aspect-ratio: 1;
}
.logo-grid span.lava { background: var(--lava); }
.logo-grid.small { width: 56px; }

/* ---------- RP tag (which app is asking) ---------- */

.rp-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  padding: 8px 14px;
  margin-top: 16px;
}
.rp-tag strong { color: var(--verdigris); font-weight: 600; }

/* ---------- Form ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
  max-width: 520px;
  border: var(--rule);
  background: var(--white);
}

.form input[type="email"] {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  padding: 24px 20px;
  border: 0;
  border-bottom: var(--rule);
  background: var(--white);
  color: var(--ink);
  outline: none;
  width: 100%;
}
.form input[type="email"]::placeholder { color: var(--n-4); }
.form input[type="email"]:focus { background: #fffef7; }

.form button {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  padding: 20px 24px;
  border: 0;
  background: var(--viridian);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 120ms ease;
}
.form button:hover { background: #258a7e; }
.form button .arrow {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 400;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ---------- Badges (status pills) ---------- */

.badge-verdigris,
.badge-lava {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  align-self: flex-start;
}
.badge-verdigris { background: var(--verdigris); color: var(--ink); }
.badge-lava { background: var(--lava); color: var(--white); }

.email-echo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  background: var(--n-6);
  padding: 2px 6px;
  border-bottom: 2px solid var(--verdigris);
}

/* ---------- Footer ---------- */

.signature {
  text-align: center;
  padding-top: 24px;
  border-top: 1px dashed var(--n-5);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--n-4);
  letter-spacing: 0.05em;
}
.spade {
  font-size: 1.15em;
  color: var(--lava);
  vertical-align: -0.05em;
}

/* ---------- Page-level accents ----------
   A tiny accent square on the card's top-left corner replaces the old
   full-height fixed bar — same role-coding, less visual noise. */
.card::before {
  content: "";
  position: absolute;
  top: -7px; left: -7px;
  width: 14px; height: 14px;
  background: var(--n-4);
}
body.page-home .card::before    { background: var(--verdigris); }
body.page-login .card::before   { background: var(--viridian); }
body.page-sent .card::before    { background: var(--verdigris); }
body.page-expired .card::before { background: var(--lava); }

/* ---------- Reveal animation ---------- */

.stage > * {
  animation: rise 600ms cubic-bezier(.2,.7,.2,1) both;
}
.stage > *:nth-child(1) { animation-delay: 0ms; }
.stage > *:nth-child(2) { animation-delay: 70ms; }
.stage > *:nth-child(3) { animation-delay: 140ms; }
.stage > *:nth-child(4) { animation-delay: 210ms; }
.stage > *:nth-child(5) { animation-delay: 280ms; }
.stage > *:nth-child(6) { animation-delay: 350ms; }

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

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