/* Editorial grid: a wide hero statement, a horizontal three-step "promise"
   band, then a loose asymmetric app grid. Every app page reuses this same
   shell with its own accent swapped in via [data-app]. Light-only by
   design — the family's own apps already carry a dark mode; this page is
   the stationery, meant to read as one fixed, calm surface. */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1c1a1b;
  --ink-soft: #6b6568;
  --ink-faint: #a69fa1;
  --accent: #ff008f;
  --accent-ink: #ffffff;
  --border: #e9e3e1;
  --write: #677084;
  --explore: #84676a;
  --comic: #67846a;
  --codex: #bd9300;
  --app: var(--accent);
  --shadow: 0 1px 2px rgba(28, 26, 27, 0.04), 0 12px 32px -16px rgba(28, 26, 27, 0.14);
  color-scheme: light;
}

[data-app="write"] { --app: var(--write); }
[data-app="explore"] { --app: var(--explore); }
[data-app="comic"] { --app: var(--comic); }
[data-app="codex"] { --app: var(--codex); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }

/* -- Two-line heading: Barlow first line, Source Serif italic second -------- */
.heading-split { font-family: "Barlow", "Manrope", ui-sans-serif, sans-serif; font-weight: 600; line-height: 1.05; }
.heading-split .heading-split-serif {
  display: block;
  margin-top: 0.08em;
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
}

.wrap { max-width: 72rem; margin: 0 auto; }

/* -- Nav -------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.nav-mark { display: block; height: 1.5rem; width: auto; }
.nav-mark img { display: block; height: 100%; width: auto; }
.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--app); }

/* -- Hero --------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: 1.75rem;
  max-width: 44rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app);
}
.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(2.25rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero h1 em { color: var(--app); font-style: italic; }
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.25rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-ghost { border-color: var(--border); color: var(--ink); }

/* -- Section scaffolding ------------------------------------------------ */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section.section-tight { padding-block: clamp(1.25rem, 3vw, 2rem); }
.section-head { max-width: 38rem; margin-bottom: clamp(2rem, 4vw, 3rem); display: grid; gap: 0.75rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-head p { color: var(--ink-soft); font-size: 1.02rem; }

.section-head.section-head-split {
  max-width: none;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1.5rem;
}
.section-head-copy { display: grid; gap: 0.75rem; }
.section-illustration { width: 100%; height: auto; justify-self: end; }

/* -- Promise strip (shared truth, private by default) -------------------- */
.promise { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.promise-step { display: grid; gap: 0.6rem; }
.promise-step .num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--app);
}
.promise-step h3 { font-size: 1.1rem; }
.promise-step p { color: var(--ink-soft); font-size: 0.98rem; }

/* -- App grid ------------------------------------------------------------ */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.app-card {
  --card-accent: var(--app);
  grid-column: span 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.9rem;
  display: grid;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--card-accent);
}
.app-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(28, 26, 27, 0.06), 0 24px 40px -20px rgba(28, 26, 27, 0.22); }
.app-card[data-app="write"] { --card-accent: var(--write); }
.app-card[data-app="explore"] { --card-accent: var(--explore); }
.app-card[data-app="comic"] { --card-accent: var(--comic); }
.app-card[data-app="codex"] { --card-accent: var(--codex); }
.app-card .mark { height: 1.35rem; width: auto; }
.app-card .mark img { height: 100%; width: auto; display: block; }
.app-card .tagline { font-family: "Fraunces", serif; font-style: italic; font-size: 1.2rem; color: var(--card-accent); }
.app-card p.desc { color: var(--ink-soft); font-size: 0.98rem; }
.app-card .go { font-size: 0.85rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 0.3rem; }

/* -- App page specific ---------------------------------------------------- */
.app-hero { display: grid; gap: 1.5rem; padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem); max-width: 46rem; }
.app-hero.hero-split {
  max-width: none;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
}
.hero-copy { display: grid; gap: 1.5rem; }
.app-hero .mark { height: 2.1rem; width: auto; margin-bottom: 0.25rem; }
.app-hero .mark img { height: 100%; width: auto; display: block; }
.app-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.app-hero .lede { font-size: 1.2rem; }

.feature-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
.feature {
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.feature h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 0.55rem; }
.feature h3::before { content: ""; width: 0.55rem; height: 0.55rem; background: var(--accent); flex: 0 0 auto; }
.feature p { color: var(--ink-soft); font-size: 0.96rem; }

.quote-block {
  border-left: 3px solid var(--app);
  padding-left: 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.quote-block p { font-family: "Fraunces", serif; font-style: italic; font-size: 1.35rem; line-height: 1.45; }
.quote-block cite { font-style: normal; color: var(--ink-soft); font-size: 0.9rem; }
.quote-cta { margin-top: 1.5rem; margin-left: 1.5rem; }

.codex-diagram {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.codex-node {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 1.1rem;
  display: grid;
  gap: 0.4rem;
  text-align: center;
}
.codex-node .mark { height: 1.1rem; margin-inline: auto; }
.codex-node .mark img { height: 100%; width: auto; }
.codex-node span { font-size: 0.82rem; color: var(--ink-soft); }
.codex-hub {
  border: 1px solid var(--app);
  background: color-mix(in srgb, var(--app) 7%, var(--surface));
}
.codex-hub strong { font-family: "Fraunces", serif; font-style: italic; color: var(--app); font-size: 1.05rem; }

.cta-band {
  border-top: 1px solid var(--border);
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 28rem; }

footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
footer .mark { height: 1rem; opacity: 0.7; }
footer .mark img { height: 100%; width: auto; }

/* -- Numbered steps ("how it works") -------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.steps-5 { grid-template-columns: repeat(5, 1fr); }
.step { display: grid; gap: 0.5rem; align-content: start; }
.step .num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--app);
}
.step h3 { font-size: 1rem; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* -- Audience grid ---------------------------------------------------------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.audience {
  padding: 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}
.audience h3 { font-size: 1rem; }
.audience p { color: var(--ink-soft); font-size: 0.94rem; }

/* -- FAQ --------------------------------------------------------------------- */
.faq { display: grid; gap: 1.25rem; max-width: 46rem; }
.faq-item { display: grid; gap: 0.4rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.faq-item:first-child { border-top: none; padding-top: 0; }
.faq-item h3 { font-size: 1.05rem; }
.faq-item p { color: var(--ink-soft); font-size: 0.97rem; }

/* -- Showcase (flagship feature cards) -------------------------------------- */
.showcase { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.showcase-card {
  padding: 1.6rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.showcase-card.pro {
  border-color: var(--app);
  background: color-mix(in srgb, var(--app) 6%, var(--surface));
}
.showcase-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app);
}
.showcase-card h3 { font-size: 1.15rem; }
.showcase-card p { color: var(--ink-soft); font-size: 0.96rem; }
.showcase-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.94rem; display: grid; gap: 0.3rem; }

/* -- Card thumbnail + lightbox ------------------------------------------- */
.card-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  cursor: zoom-in;
  line-height: 0;
}
.card-thumb img { width: 100%; height: 8.5rem; object-fit: cover; object-position: top; display: block; transition: transform 0.2s ease; }
.card-thumb:hover img { transform: scale(1.04); }
.card-thumb-sm { margin-bottom: 0.5rem; }
.card-thumb-sm img { height: 5.5rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 26, 27, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 68rem); max-height: 88vh; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); cursor: default; }
.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* -- Screenshots (real app, not an illustration) ----------------------------- */
.screenshot {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot-caption {
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  border-top: 1px solid var(--border);
}
.screenshot-caption p { color: var(--ink-soft); font-size: 0.92rem; }
.screenshot-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app);
  flex: 0 0 auto;
}
.screenshot-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
.screenshot-narrow { max-width: 24rem; margin-inline: auto; }
.screenshot-align-end { margin-inline: auto 0; }

@media (max-width: 760px) {
  .promise-grid, .feature-list, .app-grid, .steps, .steps-5, .audience-grid, .showcase, .screenshot-row, .app-hero.hero-split, .section-head.section-head-split { grid-template-columns: 1fr; }
  .section-illustration { justify-self: start; }
  .codex-diagram { grid-template-columns: 1fr; }
  .nav-links { font-size: 0.82rem; gap: 1rem; }
  .screenshot-align-end { margin-inline: auto; }
}
