/* ============================================================
   LONGBOX — marketing site
   Tokens mirror the shipped app (caveman-comics-ios
   Longbox/UI/Theme/Theme.swift). Paper + ink, 1px hairlines,
   6px cards. Anton for screen titles, Barlow Condensed for
   row titles, JetBrains Mono for everything else.
   ============================================================ */

:root {
  /* palette — Cave.* in Theme.swift */
  --paper: #f2f1ec;
  --ink: #141412;
  --surface: #f8f7f3;
  --muted: #6f6b63;
  --dark: #3e3b34;
  --light: #cfcbc2;
  --tan: #ede2d0;
  --thumb-tan: #e5daca;
  --tan-deep: #c9b497;
  --line: rgba(20, 20, 18, 0.8);
  --line-soft: rgba(20, 20, 18, 0.28);
  --slab-blue: #c9daf2;
  --green: #2f9e5f;
  --green-tint: #dff0df;
  --wish: #6b4e8c;
  --wish-tint: #e9e2f0;
  --danger: #b00020;

  /* type — Fonts.* in Theme.swift */
  --display: "Anton", "Haettenschweiler", "Impact", "Arial Narrow", sans-serif;
  --condensed: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Menlo",
    "Consolas", monospace;

  /* rhythm — Space.* */
  --xs: 4px;
  --sm: 8px;
  --md: 12px;
  --lg: 16px;
  --xl: 24px;
  --xxl: 48px;
  --gutter: 16px;

  /* Radius.* */
  --r-card: 6px;
  --r-field: 4px;
  --r-chip: 3px;

  --maxw: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

::selection {
  background: var(--tan);
  color: var(--ink);
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 40px 0;
}

/* ---------- section header: tracked mono label + hairline rule ---------- */
.label {
  display: flex;
  align-items: center;
  gap: var(--lg);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--lg);
}
.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* uppercase tracked meta line ("13 COMICS · $11,965 ASKING") */
.meta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
}

/* ---------- top nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
header.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: var(--xl);
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: rgba(20, 20, 18, 0.65);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a.cta {
  color: #fff;
  font-weight: 700;
  background: var(--ink);
  padding: 9px 14px;
  border-radius: var(--r-card);
}
.nav-links a.cta:hover {
  color: #fff;
  opacity: 0.85;
}
@media (max-width: 760px) {
  .nav-links a:not(.cta) {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: var(--xxl) 0 40px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--xxl);
  align-items: center;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(84px, 14vw, 164px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 var(--md);
}
.hero .tagline {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.05;
  text-transform: uppercase;
  margin: var(--xl) 0 var(--md);
}
.hero .lede {
  max-width: 520px;
  margin: 0 0 var(--xl);
  font-size: 15px;
  color: var(--dark);
}
.hero-price {
  margin: var(--lg) 0 0;
  font-size: 13px;
  color: var(--muted);
}
.hero-price b {
  color: var(--ink);
}

.hero-phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--lg);
  align-items: start;
}
.hero-phones .phone:last-child {
  margin-top: var(--xxl);
}
.phone {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
}
.phone img,
.phone video {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: var(--xl);
  }
  .hero-phones {
    max-width: 440px;
  }
}

/* ---------- buttons ---------- */
/* PrimaryBar: solid ink, white uppercase label */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--r-card);
}
.btn:hover {
  opacity: 0.85;
}
/* OutlinedButton: hairline, surface fill, tan on press */
.btn.ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  opacity: 1;
  background: var(--tan);
}
.btn-row {
  display: flex;
  gap: var(--md);
  flex-wrap: wrap;
}

/* ---------- chips ---------- */
.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  background: var(--tan);
  border: 1px solid rgba(20, 20, 18, 0.13);
  white-space: nowrap;
}
.chip--slab {
  background: var(--slab-blue);
  border-color: transparent;
}
/* "● AI DETECTED" style status dot */
.dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- list rows (the app's series cards) ---------- */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--md);
}
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--lg) 20px;
}
.row h3 {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 var(--xs);
}
.row p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.row-side {
  border-left: 1px solid var(--line-soft);
  margin-left: 20px;
  padding-left: 20px;
  min-width: 84px;
}
.row-side small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
}
.row-side b {
  font-weight: 800;
  font-size: 20px;
  line-height: 1.3;
}

/* ---------- feature cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--md);
}
@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 20px;
}
/* lead card: full width, tan "selected" fill */
.card--lead {
  grid-column: 1 / -1;
  background: var(--tan);
  border: 1.5px solid var(--ink);
}
.card--lead .dot {
  color: var(--ink);
  margin-bottom: var(--md);
}
.card.card--lead h3 {
  font-size: clamp(30px, 5vw, 44px);
}
.card.card--lead p:not(.dot) {
  color: var(--dark);
  font-size: 14px;
  max-width: 680px;
}
.card h3 {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 var(--sm);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- maker's note ---------- */
.note {
  border-left: 3px solid var(--tan-deep);
  padding: var(--xs) 0 var(--xs) 20px;
}
.note .headline {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 var(--md);
}
.note p:not(.headline) {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  color: var(--dark);
}

/* ---------- app screenshots ---------- */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: var(--lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) var(--md);
  scroll-padding: 0 var(--gutter);
}
.shot {
  margin: 0;
  scroll-snap-align: start;
}
.shot figcaption {
  margin-top: var(--md);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.shot figcaption b {
  display: block;
  font-family: var(--condensed);
  font-size: 20px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}
@media (max-width: 620px) {
  .shots {
    grid-auto-columns: 62%;
  }
}

/* ---------- pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--md);
}
@media (max-width: 620px) {
  .plans {
    grid-template-columns: 1fr;
  }
}
.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 20px;
}
/* selected OptionButton: tan fill, heavier ink border */
.plan--paid {
  background: var(--tan);
  border: 1.5px solid var(--ink);
}
.plan h3 {
  margin: 0 0 var(--md);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.plan .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--md);
  font-weight: 800;
  font-size: 38px;
  line-height: 1;
}
.plan .price .chip {
  background: var(--surface);
}
.plan .price-alt {
  margin: var(--sm) 0 0;
  font-size: 13px;
  color: var(--dark);
}
.plan ul {
  margin: var(--lg) 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.plan li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.plan li::before {
  content: "✓";
  font-weight: 800;
  color: var(--green);
}
.fine {
  margin: var(--lg) 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
}

/* ---------- privacy strip (ink, like the capture screen) ---------- */
.strip {
  background: var(--ink);
  color: var(--paper);
  padding: var(--xxl) 0;
  margin: 40px 0;
}
.strip .label {
  color: var(--paper);
}
.strip .label::after {
  background: rgba(242, 241, 236, 0.4);
}
.strip .dot {
  color: var(--paper);
  margin-bottom: var(--md);
}
.strip .headline {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: clamp(30px, 5.4vw, 48px);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 var(--md);
  max-width: 760px;
}
.strip p:not(.headline):not(.dot) {
  color: var(--light);
  max-width: 640px;
  margin: 0;
  font-size: 14px;
}
.strip a {
  color: var(--tan);
}

/* ---------- download / QR block ---------- */
.download-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--xxl);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: var(--xxl);
}
@media (max-width: 720px) {
  .download-inner {
    grid-template-columns: 1fr;
    gap: var(--xl);
    padding: var(--xl) 20px;
  }
  .download-inner > div:first-child {
    display: none; /* QR is pointless on the phone you'd scan it with */
  }
}
.qr {
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--paper);
  padding: var(--md);
  width: 196px;
  height: 196px;
}
.qr img {
  width: 100%;
  height: 100%;
}
.qr-caption {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
  margin-top: var(--md);
  text-align: center;
}
.download .headline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 72px);
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 var(--md);
}
.download p:not(.headline) {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 var(--xl);
  max-width: 460px;
}

/* ---------- store badges ---------- */
.stores {
  display: flex;
  gap: var(--md);
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  text-decoration: none;
  min-width: 200px;
}
a.store-badge:hover {
  opacity: 0.85;
}
.store-badge__glyph {
  font-size: 24px;
  line-height: 1;
}
.store-badge__t {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}
.store-badge__t small {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.store-badge__t span {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
}
/* android "coming soon" */
.store-badge--soon {
  background: transparent;
  border: 1px dashed var(--line-soft);
  color: var(--muted);
  cursor: default;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: var(--xl) 0 var(--xxl);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--xl);
  flex-wrap: wrap;
}
footer .foot-links {
  display: flex;
  gap: var(--xl);
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
footer .foot-links a {
  text-decoration: none;
  color: rgba(20, 20, 18, 0.65);
}
footer .foot-links a:hover {
  color: var(--ink);
}
footer .copy {
  font-size: 12px;
  color: var(--muted);
  margin: var(--md) 0 0;
}

/* ============================================================
   article pages (privacy / terms / support)
   ============================================================ */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--xl) var(--gutter) var(--xxl);
}
.doc h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(52px, 12vw, 96px);
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 var(--md);
}
.doc .updated {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
  margin: 0 0 var(--xl);
}
.doc hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--xl) 0;
}
/* section header with rule */
.doc h2 {
  display: flex;
  align-items: center;
  gap: var(--lg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: var(--xxl) 0 var(--lg);
}
.doc h2::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: var(--line);
}
.doc h3 {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  text-transform: uppercase;
  margin: var(--xl) 0 var(--sm);
}
.doc p,
.doc li {
  color: var(--dark);
  font-size: 14px;
}
.doc b,
.doc strong {
  color: var(--ink);
}
.doc ul {
  padding-left: 1.2em;
}
.doc li {
  margin-bottom: var(--sm);
}
.doc a {
  color: var(--ink);
}
.doc .tldr {
  border: 1.5px solid var(--ink);
  background: var(--tan);
  border-radius: var(--r-card);
  padding: var(--lg) 20px;
  margin-bottom: var(--xl);
}
.doc .tldr .label {
  margin-bottom: var(--sm);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.doc .tldr .label::after {
  display: none;
}
.doc .tldr p,
.doc .tldr li {
  color: var(--ink);
}
.doc .tldr p {
  margin: 0;
}
.back-link {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: var(--xl);
}
.back-link:hover {
  text-decoration: underline;
}
