/* ══════════════════════════════════════════════════════════════
   home.css — the public-beta landing page (index.html).
   Builds on the tokens in colors_and_type.css; no JS needed.
══════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  /* Darker than --text-secondary / --text-muted so body copy and
     eyebrows keep 4.5:1 contrast on the gradient. Don't lighten. */
  --text-body: #4E4064;
  --text-meta: #5C4E72;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
  line-height: normal; /* paragraphs set their own; labels stay tight */
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--purple-700);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Shared pieces ─────────────────────────────────────────── */
.eyebrow {
  font-size: var(--text-label-size);
  font-weight: var(--text-label-weight);
  color: var(--text-meta);
  text-transform: var(--text-label-transform);
  letter-spacing: var(--text-label-spacing);
  margin-bottom: 12px;
}

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.15;
  text-wrap: balance;
}

/* Overrides the base .btn-primary from colors_and_type.css */
.btn-primary {
  gap: 10px;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:focus-visible { border-radius: var(--radius-button); }
.btn-primary svg { flex-shrink: 0; }
.btn-sm { height: 40px; padding: 0 18px; border-radius: 12px; font-size: 14px; }
/* 2px less on the leading-icon side so the icon doesn't look pushed out */
.btn-lg { height: 54px; padding: 0 26px 0 24px; font-size: 16px; }

/* ── Phone frame (used 5×) ─────────────────────────────────── */
.phone {
  --pad: 8px;
  --radius: 42px;
  padding: var(--pad);
  border-radius: var(--radius);
  background: var(--text-primary);
  box-shadow: 0 20px 50px rgba(42,31,61,0.16);
}
.phone-lg { --pad: 9px; --radius: 46px; }
.phone > img,
.phone > .screen {
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--radius) - var(--pad));
}

/* ── Nav ───────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px clamp(16px, 4vw, 40px);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-brand span { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav-links a:not(.btn-primary) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-meta);
  text-decoration: none;
  transition: opacity var(--micro-duration);
}
@media (hover: hover) {
  .nav-links a:not(.btn-primary):hover { opacity: 0.7; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 44px) clamp(16px, 4vw, 64px) 72px;
}

.letter {
  flex: 1 1 460px;
  max-width: 600px;
  min-width: 0;
  /* Tighter than the base card so the P.S. form clears an 800px-tall fold */
  padding: clamp(28px, 3.5vw, 40px);
}
.letter .eyebrow { margin-bottom: 14px; }
.letter h1 {
  font-size: clamp(34px, 4.2vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.letter p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.letter p:last-of-type { margin-bottom: 22px; }
.letter-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.letter-cta .note { font-size: 13px; color: var(--text-meta); }
.signoff {
  padding-top: 14px;
  border-top: 0.5px solid rgba(0,0,0,0.06);
  font-size: 15px;
  font-style: italic;
  color: var(--text-body);
}

/* The P.S.: email capture one glance below the install button. Lavender
   inset, never a second solid-purple button, so TestFlight stays primary. */
.postscript {
  margin-top: 14px;
  padding: 14px 14px 12px;
  background: var(--purple-bg);
  border: 1px solid rgba(123,94,167,0.14);
  border-radius: var(--radius-chip);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.postscript-copy { display: flex; flex-direction: column; gap: 3px; }
.postscript-copy strong { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.postscript-copy span { font-size: 14px; line-height: 1.5; color: var(--text-body); }
.inline-form { display: flex; gap: 8px; }
.inline-form input[type="email"] {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--purple-300);
  background: var(--surface-card);
  font: inherit;
  font-size: 16px; /* 16px stops iOS Safari zooming the page on focus */
  color: var(--text-primary);
  transition: border-color var(--micro-duration);
}
.inline-form input[type="email"]::placeholder { color: var(--text-muted); }
.inline-form input[type="email"]:focus { border-color: var(--purple-700); }
.inline-form input[type="email"]:focus-visible { outline-offset: 2px; border-radius: 12px; }
/* Outlined secondary button: 5.25:1 text contrast, visibly not the primary */
.btn-outline {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--purple-300);
  background: var(--surface-card);
  color: var(--purple-700);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--micro-duration), background-color var(--micro-duration);
}
@media (hover: hover) {
  .btn-outline:hover { border-color: var(--purple-700); background: var(--purple-100); }
}
.btn-outline:active { background: var(--purple-200); }
.btn-outline:focus-visible { border-radius: 12px; }
.postscript .fine-print { font-size: 12px; color: var(--text-meta); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Two overlapping phones. --s scales the whole group on small screens. */
.hero-phones {
  --s: 1;
  flex: 0 0 auto;
  position: relative;
  width: calc(380px * var(--s));
  height: calc(640px * var(--s));
}
.hero-phones .phone { position: absolute; }
.hero-phones .back {
  left: 0;
  top: calc(60px * var(--s));
  width: calc(240px * var(--s));
  box-shadow: 0 24px 60px rgba(42,31,61,0.16);
  transform: rotate(-4deg);
}
.hero-phones .front {
  right: 0;
  top: 0;
  width: calc(260px * var(--s));
  box-shadow: 0 30px 80px rgba(42,31,61,0.22);
}

/* ── What to expect ────────────────────────────────────────── */
.expect {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 40px) 80px;
}
.expect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.expect-grid .card h3 { font-size: 20px; margin-bottom: 8px; }
.expect-grid .card p { font-size: 15px; line-height: 1.7; color: var(--text-body); }
/* Inline link back to the email form (overrides the 13px base <a> style) */
.expect-grid .card p a {
  font: inherit;
  color: var(--purple-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* The required data-reset notice. Lavender, never pink:
   pink is reserved for overdue items in the design system. */
.expect-grid .card.notice { outline: 2px solid var(--purple-300); outline-offset: -2px; }
.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-icon);
  background: var(--purple-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--purple-700);
}

/* ── A Saturday with Fixiv ─────────────────────────────────── */
.saturday {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 40px) 88px;
}
.saturday .section-head { margin-bottom: 44px; }
.saturday .section-head h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; }
.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}
.step { width: 260px; display: flex; flex-direction: column; gap: 18px; }
.step-num { font-size: 13px; font-weight: 600; color: var(--purple-700); margin-bottom: 6px; }
.step p { font-size: 15px; line-height: 1.6; color: var(--text-body); }

/* Runbook mock (step 02): a stand-in for a real screenshot. Sizes are
   tiny on purpose; they mimic the app at phone-frame scale. */
.runbook {
  background: var(--bg-gradient);
  padding: 34px 6px 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.runbook-sheet {
  flex: 1;
  background: var(--surface-card);
  border-radius: 28px; /* concentric: 34px screen radius − 6px inset */
  padding: 10px 16px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.rb-handle { display: flex; justify-content: center; position: relative; height: 16px; }
.rb-handle::before {
  content: "";
  width: 26px;
  height: 3px;
  margin-top: 2px;
  border-radius: 2px;
  background: var(--drag-handle);
}
.rb-close {
  position: absolute;
  right: -4px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background: rgba(0,0,0,0.04);
  color: var(--text-muted);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rb-label {
  font-size: 7px;
  font-weight: 500;
  color: var(--text-meta);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.rb-title { font-size: 15px; font-weight: 700; line-height: 1.15; color: var(--text-primary); }
.rb-meta { font-size: 8.5px; color: var(--text-secondary); margin-top: 3px; }
.rb-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rb-tools span {
  font-size: 8px;
  font-weight: 500;
  color: var(--purple-700);
  background: var(--purple-bg);
  border-radius: 6px;
  padding: 3px 6px;
}
.rb-steps { list-style: none; }
.rb-steps li {
  display: flex;
  gap: 7px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--row-divider);
  font-size: 8.5px;
  line-height: 1.4;
  color: var(--text-primary);
}
.rb-steps li:last-child { border-bottom: 0; }
.rb-steps b {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--purple-700);
  color: #FFFFFF;
  font-size: 7.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rb-steps li.todo b { background: var(--purple-bg); color: var(--purple-700); }
.rb-done {
  margin-top: auto;
  height: 30px;
  border-radius: 10px;
  background: var(--purple-700);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Closing CTA ───────────────────────────────────────────── */
.closing { padding: 24px clamp(16px, 4vw, 40px) 96px; }
.closing-card {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 48px);
}
.closing-card h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  text-wrap: balance;
}
.closing-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 44ch;
  text-wrap: pretty;
}
.closing-card .btn-primary { margin-top: 12px; }
.closing-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--purple-700);
  text-decoration: none;
  margin-top: 4px;
}
@media (hover: hover) {
  .closing-link:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* Honeypot: real users never see or fill this; bots that do get flagged */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── Footer (same as the other pages) ──────────────────────── */
footer {
  border-top: 0.5px solid rgba(42,31,61,0.08);
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }
.footer-brand span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.footer-copy { font-size: 13px; color: var(--text-meta); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-meta);
  text-decoration: none;
  transition: color var(--micro-duration);
}
@media (hover: hover) {
  .footer-links a:hover { color: var(--purple-700); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .letter { flex: 0 1 auto; width: 100%; }
}
@media (max-width: 860px) {
  .expect-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 820px) {
  nav { padding-top: max(44px, calc(16px + env(safe-area-inset-top, 44px))); }
  footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  /* Row 1: logo + Try the Beta. Row 2: the two section links. */
  nav { row-gap: 0; column-gap: 20px; }
  nav::after { content: ""; order: 1; flex-basis: 100%; }
  .nav-links { display: contents; }
  .nav-links .btn-primary { order: 1; margin-left: auto; }
  .nav-links a:not(.btn-primary) { order: 2; margin-top: 14px; }
  .hero { padding-bottom: 40px; }
  .letter { border-radius: 24px; }
  .letter-cta .btn-lg { width: 100%; }
  .hero-phones { --s: 0.84; height: calc(585px * var(--s)); }
  .expect-grid .card { padding: 28px 24px; border-radius: 24px; }
  .closing-card { border-radius: 24px; }
  .closing-card .btn-lg { width: 100%; }
}
@media (max-width: 420px) {
  .inline-form { flex-direction: column; }
  .inline-form input[type="email"] { flex: none; width: 100%; }
  .btn-outline { width: 100%; }
}
@media (max-width: 360px) {
  .hero-phones { --s: 0.74; }
  .nav-links { justify-content: center; }
}
