/* ─── Theme tokens ──────────────────────────────────────────────── */
:root {
  --font-serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --paper:      #fefae0;
  --paper-2:    #faedcd;
  --paper-edge: #ccd5ae;
  --ink:        #2f3327;
  --ink-mute:   rgba(47, 51, 39, 0.62);
  --ink-faint:  rgba(47, 51, 39, 0.30);
  --rule:       rgba(47, 51, 39, 0.22);
  --sage:       #6a6f5b;
  --sage-deep:  #4c5042;

  --phone-shadow:
    drop-shadow(0 24px 48px rgba(47, 51, 39, 0.18))
    drop-shadow(0 4px 8px rgba(47, 51, 39, 0.10));
  --showcase-glow: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(204, 213, 174, 0.22) 0%, transparent 70%);
  --hero-mesh-bg:
    radial-gradient(circle at 30% 30%, #ccd5ae 0%, transparent 55%),
    radial-gradient(circle at 70% 35%, #faedcd 0%, transparent 60%),
    radial-gradient(circle at 50% 70%, #e9edc9 0%, transparent 65%),
    radial-gradient(circle at 30% 80%, #fefae0 0%, transparent 70%);
  --hero-mesh-opacity: 0.85;
}

:root[data-theme="dark"] {
  --paper:      #1a1b15;
  --paper-2:    #232419;
  --paper-edge: #3a4030;
  --ink:        #ece5d0;
  --ink-mute:   rgba(236, 229, 208, 0.60);
  --ink-faint:  rgba(236, 229, 208, 0.28);
  --rule:       rgba(236, 229, 208, 0.16);
  --sage:       #b3b8a4;
  --sage-deep:  #899177;

  --phone-shadow:
    drop-shadow(0 30px 70px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 60px rgba(179, 184, 164, 0.10));
  --showcase-glow: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(179, 184, 164, 0.10) 0%, transparent 70%);
  --hero-mesh-bg:
    radial-gradient(circle at 30% 30%, #3a4030 0%, transparent 55%),
    radial-gradient(circle at 70% 35%, #4a3a26 0%, transparent 60%),
    radial-gradient(circle at 50% 70%, #2a3027 0%, transparent 65%),
    radial-gradient(circle at 30% 80%, #1a1b15 0%, transparent 70%);
  --hero-mesh-opacity: 0.75;
}

/* ─── Base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-feature-settings: "ss01", "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}

::selection { background: var(--sage); color: var(--paper); }

/* ─── Layout primitives ─────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 64px; }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-thick { height: 2px; background: var(--ink); border: 0; margin: 0; opacity: .88; }

.caps {
  font-family: var(--font-text);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-mute);
}

.serif { font-family: var(--font-serif); font-weight: 400; }

/* ─── Masthead ──────────────────────────────────────────────────── */
.masthead {
  padding: 22px 0 14px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--rule);
}
.masthead-left { display: flex; align-items: center; gap: 12px; }
.mark {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mark svg { width: 100%; height: 100%; display: block; }
.masthead .lockup {
  font-family: var(--font-text);
  font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 13px; color: var(--ink);
}
.masthead .lockup .sep { margin: 0 8px; color: var(--ink-faint); font-weight: 500; }
.masthead .lockup .edition { font-weight: 500; letter-spacing: 0.16em; color: var(--ink-mute); }
.masthead-right { display: flex; align-items: center; gap: 22px; }
.masthead-right a {
  color: var(--ink); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.masthead-right a:hover { color: var(--sage); }
.masthead-right .vol { color: var(--ink-mute); font-size: 11px; letter-spacing: 0.18em; }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 96px;
}
.hero-mesh {
  position: absolute;
  right: -120px; top: 40px;
  width: 720px; height: 720px;
  border-radius: 50%;
  background: var(--hero-mesh-bg);
  filter: blur(40px);
  opacity: var(--hero-mesh-opacity);
  pointer-events: none;
  z-index: 0;
  transition: opacity .35s ease;
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; }

.deck-tag {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
}
.deck-tag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage);
}
.deck-tag span {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--sage-deep);
}

h1.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 184px;
  line-height: 0.88;
  letter-spacing: -0.028em;
  color: var(--ink);
}
h1.hero-title .stop {
  color: var(--sage);
  font-style: italic;
  margin-left: -8px;
}
h1.hero-title .tm {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0;
  vertical-align: super;
  margin-left: 6px;
  color: var(--sage);
  opacity: 0.75;
}

.hero-deck {
  margin: 36px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 34px;
  line-height: 1.28;
  color: var(--sage-deep);
  max-width: 720px;
}
.hero-deck br { display: block; }

.hero-ctas {
  margin-top: 40px;
  display: flex; align-items: center; gap: 20px;
}
.cta-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform .2s ease, background .2s ease;
}
.cta-primary:hover { background: var(--sage-deep); transform: translateY(-1px); }
.cta-primary .arrow { font-family: var(--font-serif); font-size: 18px; line-height: 1; transform: translateY(-1px); }
.cta-meta { font-size: 13px; color: var(--ink-mute); }
.cta-meta strong { font-weight: 600; color: var(--ink); }

/* ─── Standfirst ────────────────────────────────────────────────── */
.standfirst {
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 56px;
  align-items: start;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.standfirst-label { padding-top: 6px; }
.standfirst p {
  margin: 0;
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 640px;
}
.standfirst p em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08em;
  color: var(--sage-deep);
}

/* ─── Pillars ───────────────────────────────────────────────────── */
.pillars {
  padding: 72px 0 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 72px;
}
.pillar { position: relative; }
.pillar .pillar-caps {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
}
.pillar .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--sage);
  line-height: 1;
}
.pillar h3 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.pillar h3 em { font-style: italic; color: var(--sage); }
.pillar p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 460px;
}

/* ─── Showcase ──────────────────────────────────────────────────── */
.showcase {
  position: relative;
  padding: 80px 0 96px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--showcase-glow);
  pointer-events: none;
}
.showcase-head {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 56px;
  align-items: end;
  margin-bottom: 64px;
  position: relative;
}
.showcase-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
  letter-spacing: -0.018em;
}
.showcase-head h2 em { font-style: italic; color: var(--sage); }
.showcase-head .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 480px;
  margin: 0 0 4px;
}

.phones-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: end;
}
.phone {
  position: relative;
  transition: transform .4s ease;
  margin: 0;
}
.phone img {
  width: 100%; height: auto; display: block;
  filter: var(--phone-shadow);
}
.phone .cap {
  margin-top: 22px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center;
}
.phone .cap em {
  font-family: var(--font-serif); font-style: italic;
  letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--sage);
}
.phone-mid { transform: translateY(-40px); }
.phone-side { transform: translateY(20px); }

/* ─── Pullquote ─────────────────────────────────────────────────── */
.pullquote {
  padding: 96px 0 88px;
  text-align: center;
  position: relative;
}
.pullquote .qmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 96px;
  line-height: 0.5;
  color: var(--sage);
  display: block;
  margin-bottom: 24px;
}
.pullquote blockquote {
  margin: 0 auto;
  max-width: 880px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 54px;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.pullquote cite {
  display: block;
  margin-top: 32px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ─── Colophon ──────────────────────────────────────────────────── */
.colophon {
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 56px;
  border-top: 1px solid var(--rule);
}
.colophon h4 {
  margin: 0 0 16px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-mute);
}
.colophon ul {
  list-style: none; padding: 0; margin: 0;
  font-size: 15px; line-height: 2.1;
}
.colophon ul li a {
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color .15s ease, gap .15s ease;
}
.colophon ul li a:hover { color: var(--sage); gap: 14px; }
.colophon ul li a .ar { color: var(--sage); font-family: var(--font-serif); font-size: 18px; line-height: 1; }
.colophon .by p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 360px;
}
.colophon .by p em {
  font-family: var(--font-serif); font-style: italic;
  color: var(--sage-deep); font-size: 1.05em;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.foot {
  padding: 32px 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--ink-mute);
}
.foot-right {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.foot .mono { font-family: var(--font-mono); }
.foot .tm { font-size: 0.8em; vertical-align: super; margin-left: 1px; }
.foot a.garben {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .15s ease, gap .15s ease;
}
.foot a.garben:hover { color: var(--sage); gap: 12px; }
.foot a.garben .mono { color: var(--sage); }
.foot a.garben .ar {
  font-family: var(--font-serif); font-style: italic;
  color: var(--sage); font-size: 14px; line-height: 1;
}

/* ─── Theme toggle ──────────────────────────────────────────────── */
.theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
}
.theme button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  padding: 6px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s ease, background-color .2s ease;
}
.theme button svg { width: 14px; height: 14px; display: block; }
.theme button:hover { color: var(--ink); }
.theme button.active {
  background: var(--ink);
  color: var(--paper);
}

/* ─── Legal / article pages (privacy, terms) ────────────────────── */
.legal {
  padding: 72px 0 80px;
  max-width: 760px;
}
.legal-head {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}
.legal-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 96px;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.legal-head h1 em { font-style: italic; color: var(--sage); }
.legal-head .updated {
  margin: 20px 0 0;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.legal .intro {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
  color: var(--sage-deep);
  margin: 0 0 48px;
}
.legal section { margin: 0 0 40px; }
.legal h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.legal h2 .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--sage);
  line-height: 1;
}
.legal h3 {
  margin: 24px 0 8px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-mute);
}
.legal p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 680px;
}
.legal p strong { font-weight: 600; }
.legal ul {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  max-width: 680px;
}
.legal ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.legal ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-family: var(--font-serif);
}
.legal ul li strong { font-weight: 600; }
.legal a {
  color: var(--sage-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .15s ease, border-color .15s ease;
}
.legal a:hover { color: var(--sage); border-color: var(--sage); }
.legal .back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 40px;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-mute);
  text-decoration: none; border: 0;
  transition: color .15s ease, gap .15s ease;
}
.legal .back:hover { color: var(--sage); gap: 12px; }
.legal .back .ar { font-family: var(--font-serif); font-size: 16px; color: var(--sage); }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .wrap { padding: 0 32px; }

  h1.hero-title { font-size: 120px; }
  .hero-deck { font-size: 26px; }

  .standfirst { grid-template-columns: 1fr; gap: 20px; }
  .pillars { grid-template-columns: 1fr; gap: 40px; }

  .showcase-head { grid-template-columns: 1fr; }
  .phones-row { gap: 20px; }
  .phone-mid { transform: translateY(-20px); }

  .pullquote blockquote { font-size: 36px; }

  .colophon { grid-template-columns: 1fr 1fr; }
  .colophon .by { grid-column: 1 / -1; }

  .masthead-right .vol { display: none; }

  .legal-head h1 { font-size: 60px; }
  .legal .intro { font-size: 22px; }
  .legal h2 { font-size: 26px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }

  h1.hero-title { font-size: 80px; }
  .hero-deck { font-size: 22px; }
  .hero { padding: 48px 0 64px; }

  .masthead-right a { display: none; }

  /* Horizontal swipe carousel: all three phones, snap-scroll */
  .phones-row {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* bleed to screen edges so cards peek past the .wrap padding */
    margin: 0 -20px;
    padding: 4px 20px 8px;
  }
  .phones-row::-webkit-scrollbar { display: none; }
  .phone {
    flex: 0 0 78%;
    scroll-snap-align: center;
    transform: none;
  }
  .phone-mid, .phone-side { transform: none; }

  .pullquote { padding: 64px 0; }
  .pullquote blockquote { font-size: 28px; }
  .pullquote .qmark { font-size: 72px; }

  .colophon { grid-template-columns: 1fr; }
  .colophon .by { grid-column: auto; }

  .foot { flex-direction: column; align-items: flex-start; gap: 16px; }
}
