/* ==========================================================================
   Inkwire — marketing landing page
   Design system: editorial display (Fraunces) over a neutral UI face (Inter),
   one brand accent (crimson), one ink colour, paper-white surfaces.
   Everything is self-hosted: two woff2 files, no third-party requests.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #55637a;
  --muted-2: #6b7a91;
  --line: #e3e8ef;
  --line-soft: #eef2f7;
  --paper: #ffffff;
  --paper-2: #f7f9fc;
  --paper-3: #eef2f7;
  --brand: #c8102e;
  --brand-dark: #9f0c24;
  --brand-soft: #fdeef1;
  --accent: #b45309;
  --ok: #047857;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-2: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-3: 0 26px 60px rgba(15, 23, 42, .14);
  --t: 200ms cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 600;
  font-variation-settings: "opsz" 60;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
strong { color: var(--ink); font-weight: 600; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; transition: top var(--t);
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 14px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px;
}

.lede { font-size: 1.14rem; color: var(--muted); max-width: 60ch; }
.section { padding: 88px 0; }
.section--tint { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
.section__head { max-width: 62ch; margin-bottom: 44px; }
.section__head p { color: var(--muted); margin-bottom: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 .98rem/1 var(--font-body); text-decoration: none;
  cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(200, 16, 46, .22); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-3); color: var(--ink); background: var(--paper-2); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; }
.brand__name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink-3); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--brand); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink);
}

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 76px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%; height: 620px;
  background: radial-gradient(closest-side, rgba(200, 16, 46, .10), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: relative; display: grid; gap: 54px; align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero__lede { font-size: 1.2rem; color: var(--muted); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.hero__trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--ok); flex: none; }

/* Hero visual: a mini newsroom drawn with SVG + a live canvas ticker. */
.hero__visual {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden;
}
.hero__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--paper-2); }
.hero__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hero__url { margin-left: 8px; font-size: .78rem; color: var(--muted-2); font-family: var(--font-body); }
.hero__masthead { padding: 20px 22px 14px; text-align: center; border-bottom: 3px double var(--ink); }
.hero__masthead svg { width: 100%; height: auto; max-width: 340px; margin-inline: auto; display: block; }
.hero__rule { display: flex; align-items: center; gap: 12px; padding: 9px 22px; border-bottom: 1px solid var(--line-soft); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.hero__rule b { color: var(--brand); letter-spacing: .12em; }
.hero__gridlines { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; padding: 18px 22px 22px; }
.hero__lead { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; color: var(--ink); margin: 0 0 8px; }
.hero__meta { font-size: .8rem; color: var(--muted-2); margin: 0; }
.hero__cols { display: grid; gap: 10px; }
.hero__thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background: var(--paper-3); }
.hero__ticker {
  position: relative; height: 38px; overflow: hidden; border-top: 1px solid var(--line-soft);
  background: var(--ink); color: #fff; display: flex; align-items: center;
}
.hero__ticker span { padding-inline: 16px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--brand); z-index: 2; }
.hero__ticker canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- Stat band ---------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--paper); padding: 26px 24px; }
.stat__num { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--ink); font-weight: 600; }
.stat__label { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }

/* --- Bento features ----------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  grid-column: span 2; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-1);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-2); }
.card--wide { grid-column: span 3; }
.card--full { grid-column: span 6; }
.card--tall { grid-column: span 3; display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: center; }
.card__icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 16px;
}
.card__icon svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .93rem; }
.card ul li { margin-bottom: 4px; }

/* --- Formats ------------------------------------------------------------ */
.formats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.format {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-align: center; font-size: .84rem; color: var(--ink-3); font-weight: 500;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.format svg { width: 24px; height: 24px; color: var(--brand); }
.format:hover { border-color: var(--brand); color: var(--ink); background: var(--brand-soft); }

/* --- Split sections ----------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.checklist { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 11px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; color: var(--ink-3); }
.checklist svg { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }
.checklist b { color: var(--ink); font-weight: 600; }

.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.role { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: var(--paper); }
.role h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: .98rem; font-weight: 600; }
.role p { margin: 0; font-size: .9rem; color: var(--muted); }
.role code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: var(--paper-3); padding: 1px 6px; border-radius: 5px; color: var(--brand); }

.mock { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); overflow: hidden; }
.mock__head { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper-2); }
.mock__head h4 { margin: 0; font-family: var(--font-body); font-size: .95rem; }
.mock__badge { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); font-weight: 600; }
.mock__body { padding: 20px; }
.mock__line { height: 9px; border-radius: 5px; background: var(--paper-3); margin-bottom: 10px; }
.mock__line--short { width: 58%; }
.mock__line--title { height: 14px; width: 80%; }
.mock__price { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); margin: 0; }
.mock__rows { display: grid; gap: 10px; margin-top: 18px; }
.mock__row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--ink-3); padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.mock__row b { color: var(--ink); }

/* --- Pricing ------------------------------------------------------------ */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; box-shadow: var(--shadow-1); }
.plan--featured { border-color: var(--brand); box-shadow: var(--shadow-2); }
.plan__tag {
  position: absolute; top: -12px; left: 28px; background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.plan__name { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin: 0 0 4px; }
.plan__for { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.plan__price { font-family: var(--font-display); font-size: 2.9rem; line-height: 1; color: var(--ink); margin: 0; font-weight: 600; }
.plan__price span { font-family: var(--font-body); font-size: .95rem; color: var(--muted); font-weight: 400; }
.plan__terms { color: var(--muted-2); font-size: .86rem; margin: 8px 0 20px; min-height: 2.4em; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; font-size: .93rem; color: var(--ink-3); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; }
.plan li svg { width: 17px; height: 17px; color: var(--ok); margin-top: 3px; }
.plan .btn { width: 100%; }

.pricing__note { text-align: center; color: var(--muted); font-size: .92rem; margin: 26px auto 0; max-width: 68ch; }

/* Reader membership cards (data from the database) */
.memberships { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.member { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; background: var(--paper); }
.member h4 { margin: 0 0 6px; }
.member__price { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); margin: 0 0 10px; }
.member__price span { font-size: .85rem; color: var(--muted); font-family: var(--font-body); }
.member p { margin: 0; color: var(--muted); font-size: .92rem; }

/* --- Steps -------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding-top: 44px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font: 600 .9rem/1 var(--font-body);
}
.step h4 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.stack span { font-size: .82rem; color: var(--ink-3); background: var(--paper-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 600; color: var(--ink); font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--t);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq__body { padding: 0 20px 18px; color: var(--muted); font-size: .97rem; }
.faq__body p:last-child { margin-bottom: 0; }

/* --- Final CTA ---------------------------------------------------------- */
.final { background: var(--ink); color: #cdd6e4; border-radius: 24px; padding: 56px 48px; text-align: center; position: relative; overflow: hidden; }
.final::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -140px; top: -180px;
  background: radial-gradient(closest-side, rgba(200, 16, 46, .5), transparent 70%); pointer-events: none;
}
.final h2 { color: #fff; }
.final p { max-width: 58ch; margin-inline: auto; }
.final .btn--primary { background: var(--brand); }
.final__note { color: #8ea0b8; font-size: .88rem; margin-top: 18px; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 34px; margin-top: 88px; background: var(--paper-2); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.site-footer a { color: var(--ink-3); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer__legal { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; color: var(--muted-2); font-size: .86rem; }
.site-footer__legal p { margin: 0; }

/* --- Reveal on scroll ---------------------------------------------------- */
/* The hidden state is scoped to .js so the page is never blank when the
   script is blocked, fails to load or runs too late. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 420ms ease, transform 420ms ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .card { grid-column: span 2; }
  .card--tall { grid-column: span 4; }
  .card--full { grid-column: span 4; }
  .formats { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 40px; }
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.is-open .site-nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
    position: absolute; top: 68px; left: 0; right: 0; padding: 18px 24px 22px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  }
}

@media (max-width: 860px) {
  .section { padding: 62px 0; }
  .split { grid-template-columns: 1fr; }
  .pricing, .memberships { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .final { padding: 40px 24px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .hero { padding: 44px 0 40px; }
  .hero__actions .btn { width: 100%; }
  .bento { grid-template-columns: 1fr; }
  .card, .card--wide, .card--tall, .card--full { grid-column: span 1; grid-template-columns: 1fr; }
  .formats { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .site-header__actions .btn--ghost { display: none; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .stat { padding: 20px 18px; }
  .stat__num { font-size: 2rem; }
}


/* ---------------------------------------------------------------------------
   Layout utilities
   The templates carry no inline styling: every spacing and alignment rule
   lives here, so the markup stays clean and the stylesheet stays the single
   source of truth.
   --------------------------------------------------------------------------- */
.section--tight { padding-block: 56px; }
.section--flush { padding-top: 0; }
.section__head--center { text-align: center; margin-inline: auto; }
.eyebrow--center { justify-content: center; }
.text-center { text-align: center; }
.measure-center { margin-inline: auto; }
.lede--center {
  text-align: center;
  color: var(--muted);
  max-width: 62ch;
  margin-inline: auto;
}
.hero__actions--center { justify-content: center; }
.hero__lede {
  margin-top: 12px;
  max-width: 42ch;
  color: var(--muted);
  font-size: .95rem;
}
.btn-row {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.roles--spaced { margin-top: 24px; }
.memberships--spaced { margin-top: 28px; }
.stack-64 { margin-top: 64px; }
.plan__note { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: .9rem;
  color: var(--muted);
}
