/* 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;
  --audiobook: #986891;
  --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); }
[data-app="audiobook"] { --app: var(--audiobook); }

* { 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; }
h1, h2 { line-height: 1.12; letter-spacing: -0.012em; }
h3 { line-height: 1.3; }
p { text-wrap: pretty; }
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); }
.btn[href*="buymeacoffee"] { background: var(--accent); color: var(--accent-ink); transition: filter 0.15s ease, transform 0.15s ease; }
.btn[href*="buymeacoffee"]:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* -- Section scaffolding ------------------------------------------------ */
section { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
section.section-tight { padding-block: clamp(1rem, 2.5vw, 1.5rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: 0.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-head p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }

.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[data-app="audiobook"] { --card-accent: var(--audiobook); }
.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.25rem; padding-block: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 3vw, 2.25rem); 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.1rem; }
.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, 3.1rem); line-height: 1.08; }
.app-hero .lede { font-size: 1.12rem; line-height: 1.55; }

.feature-list { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.feature-list-3 { grid-template-columns: repeat(3, 1fr); }
.feature {
  --pad: 1.25rem;
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: var(--pad);
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.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.94rem; line-height: 1.55; }

/* Ruled, box-free variant: a quieter strip of supporting points. */
.feature-list-plain { grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1.25rem 1.75rem; }
.feature-list-plain .feature {
  position: relative;
  padding: 0.9rem 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  overflow: visible;
}
.feature-list-plain .feature::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2rem;
  height: 2px;
  background: var(--app);
}
.feature-list-plain .feature h3::before { display: none; }

.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: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.35; max-width: 46rem; text-wrap: balance; }
.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); }
.steps + .screenshot { margin-top: 1.75rem; }
.step { position: relative; display: grid; gap: 0.35rem; align-content: start; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 2rem; height: 2px; background: var(--app); }
.step .num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--app);
}
.step h3 { font-size: 1rem; }
.step p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55; }

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

/* -- 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.25rem; grid-template-columns: repeat(3, 1fr); }
.showcase + .feature-list { margin-top: clamp(1.5rem, 3vw, 2rem); }
.showcase-card {
  --pad: 1.4rem;
  padding: var(--pad);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.5rem;
  align-content: start;
  overflow: hidden;
}
.showcase-card, .feature, .audience { transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.showcase-card:hover, .feature-list:not(.feature-list-plain) .feature:hover, .audience:hover {
  border-color: color-mix(in srgb, var(--app) 40%, var(--border));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.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.94rem; line-height: 1.55; }
.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; }

/* A thumbnail that opens a card runs edge to edge, like a cover image. */
.showcase-card > .card-thumb:first-child,
.feature > .card-thumb:first-child {
  width: calc(100% + 2 * var(--pad));
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0.45rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.showcase-card > .card-thumb:first-child img { height: 10.5rem; }
.feature > .card-thumb:first-child img { height: 8rem; }

.card-video {
  display: block;
  width: 100%;
  margin: 0 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.card-video video { display: block; width: 100%; height: 8.5rem; object-fit: cover; }

.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, .screenshot video { 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; }

/* -- Spotlight: one dark, full-width showpiece per page ---------------------- */
.spotlight-panel {
  border-radius: 22px;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: radial-gradient(120% 90% at 50% 100%, #3b1d0d 0%, #1a110c 55%, #130d0a 100%);
  color: #f6efe9;
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
  box-shadow: 0 24px 48px -28px rgba(28, 26, 27, 0.55);
}
.spotlight-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: end; }
.spotlight-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-top: 0.6rem; }
.spotlight-head p { color: rgba(246, 239, 233, 0.74); font-size: 1rem; line-height: 1.55; }
.spotlight .eyebrow { color: #e3bfa9; }
.spotlight-shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  line-height: 0;
}
.spotlight-shot img { display: block; width: 100%; height: auto; }
.spotlight-caption { color: rgba(246, 239, 233, 0.6); font-size: 0.9rem; max-width: 46rem; }

/* -- Band: a contained call-out with its action alongside -------------------- */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2.5rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--app) 5%, var(--surface));
}
.band .section-head { margin-bottom: 0; max-width: 44rem; }

/* -- FAQ with its heading held alongside ------------------------------------- */
.faq-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem 3rem; align-items: start; }
.faq-split .section-head { margin-bottom: 0; position: sticky; top: 1.5rem; }
.faq-split .faq { max-width: none; gap: 1rem; }
.faq-split .faq-item { padding-top: 1rem; }

@media (max-width: 760px) {
  .spotlight-head, .band, .faq-split { grid-template-columns: 1fr; }
  .faq-split .section-head { position: static; }
  .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; }
}
