/* ============================================================
   Tonos. A scholarly press for polytonic Greek.
   ============================================================ */

:root {
  /* ----- LIGHT (default) ----- */
  --ink:           #1A1613;
  --ink-muted:     #584D44;
  --ink-faint:     #8B8073;
  --paper:         #F4EFE3;
  --paper-elevated:#FBF7EB;
  --paper-sunken:  #ECE3CE;
  --rule:          #CFC4AB;
  --rule-strong:   #A59979;
  --accent:        #8A2A2A;
  --accent-ink:    #5F1B1B;
  --accent-soft:   rgba(138, 42, 42, 0.08);
  --header-bg:     rgba(244, 239, 227, 0.92);

  /* ----- TYPEFACES ----- */
  --font-display: 'GFS Didot', 'Didot', 'Bodoni Moda', ui-serif, 'Apple Garamond', serif;
  --font-serif:   'EB Garamond', 'EB Garamond Variable', 'Adobe Garamond', ui-serif, Georgia, serif;
  --font-sans:    'Manrope', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;

  /* ----- TYPE SCALE ----- */
  --text-micro:   0.6875rem;
  --text-xs:      0.75rem;
  --text-sm:      0.9375rem;
  --text-base:    1.0625rem;
  --text-lg:      1.1875rem;
  --text-xl:      1.5rem;
  --text-2xl:     1.875rem;
  --text-3xl:     2.75rem;
  --text-display: clamp(2.75rem, 7.5vw, 6rem);
  --text-hero:    clamp(3.25rem, 11vw, 9rem);
  --text-specimen:clamp(2.5rem, 8.5vw, 5.5rem);

  /* ----- SPACING ----- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4.5rem;
  --space-9:  6.5rem;
  --space-10: 9rem;

  /* ----- LAYOUT ----- */
  --max-prose: 38rem;
  --max-wide:  78rem;
  --gutter:    clamp(1.25rem, 5vw, 3rem);
  --rule-w:    1px;
}

/* ----- DARK (system preference, unless user forced light) ----- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:           #EEE4D2;
    --ink-muted:     #B5A98E;
    --ink-faint:     #7A6F5D;
    --paper:         #1A1613;
    --paper-elevated:#231E19;
    --paper-sunken:  #0E0B09;
    --rule:          #332B21;
    --rule-strong:   #564B38;
    --accent:        #D18B6A;
    --accent-ink:    #E4A484;
    --accent-soft:   rgba(209, 139, 106, 0.12);
    --header-bg:     rgba(26, 22, 19, 0.9);
  }
}

/* ----- DARK (explicit) ----- */
:root[data-theme="dark"] {
  --ink:           #EEE4D2;
  --ink-muted:     #B5A98E;
  --ink-faint:     #7A6F5D;
  --paper:         #1A1613;
  --paper-elevated:#231E19;
  --paper-sunken:  #0E0B09;
  --rule:          #332B21;
  --rule-strong:   #564B38;
  --accent:        #D18B6A;
  --accent-ink:    #E4A484;
  --accent-soft:   rgba(209, 139, 106, 0.12);
  --header-bg:     rgba(26, 22, 19, 0.9);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 60% 60% at 95% 100%, var(--accent-soft), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
  font-feature-settings: "kern", "liga", "clig", "onum";
  transition: background-color 0.3s ease, color 0.3s ease;
  hanging-punctuation: first last;
}

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

/* ============================================================
   TYPOGRAPHY BASE
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-feature-settings: "kern", "liga", "dlig";
}

p { margin: 0 0 var(--space-4); }
em { font-style: italic; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--accent-soft);
  transition: text-decoration-color 0.2s, color 0.2s;
}

a:hover { text-decoration-color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

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

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

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--gutter);
  border-bottom: var(--rule-w) solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  z-index: 100;
  font-family: var(--font-sans);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  letter-spacing: -0.01em;
  font-feature-settings: "kern", "liga", "dlig";
  transition: color 0.2s;
  flex-shrink: 0;
}

.wordmark__logo {
  width: 1.5em;
  height: 1.5em;
  display: block;
  flex-shrink: 0;
}

.wordmark__text {
  height: 1em;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Light/dark variant toggle. Matches the existing theme-switching
   pattern: OS dark mode wins unless the user has explicitly selected
   the light theme via the in-page toggle (data-theme="light"); an
   explicit data-theme="dark" always wins. */
.wordmark__text--dark { display: none; }
:root[data-theme="dark"] .wordmark__text--light { display: none; }
:root[data-theme="dark"] .wordmark__text--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark__text--light { display: none; }
  :root:not([data-theme="light"]) .wordmark__text--dark { display: block; }
}

.wordmark:hover { opacity: 0.85; text-decoration: none; }
.wordmark:focus-visible { outline-offset: 5px; }

.site-nav {
  display: flex;
  gap: clamp(var(--space-3), 2.5vw, var(--space-5));
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  align-items: center;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule-strong);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.header-toggles {
  display: inline-flex;
  gap: var(--space-3);
  align-items: center;
  flex-shrink: 0;
}

.segmented-toggle {
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  border: 1px solid var(--rule-strong);
  flex-shrink: 0;
}

.segmented-toggle__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
}

.segmented-toggle__option + .segmented-toggle__option {
  border-left: 1px solid var(--rule-strong);
}

.segmented-toggle__option:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.segmented-toggle__option[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.segmented-toggle__option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-toggle .segmented-toggle__option img {
  display: block;
  width: 22px;
  height: 22px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.lang-toggle .segmented-toggle__option:hover img,
.lang-toggle .segmented-toggle__option[aria-pressed="true"] img {
  opacity: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(var(--space-8), 10vw, var(--space-10)) var(--gutter) var(--space-10);
  max-width: var(--max-wide);
  margin: 0 auto;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, var(--accent-soft), transparent 75%),
    linear-gradient(to bottom, var(--paper-sunken), transparent 85%);
  z-index: -1;
  pointer-events: none;
}

.hero__meta {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  margin: 0 0 var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__meta-sep {
  color: var(--accent);
  font-weight: 400;
  padding: 0 var(--space-1);
}

/* Specimen grid: hairline rules via background-gap trick */
.hero__specimen-block {
  margin: 0;
}

.hero__specimen {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: var(--rule);
  gap: 1px;
  margin: 0;
  border: 1px solid var(--rule-strong);
}

.specimen__legend {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-muted);
  text-align: center;
  margin: var(--space-5) 0 0;
  min-height: 1.5em;
}

.specimen__cell { cursor: help; }

@media (max-width: 800px) { .hero__specimen { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .hero__specimen { grid-template-columns: repeat(3, 1fr); } }

.specimen__cell {
  font-family: var(--font-display);
  font-size: var(--text-specimen);
  line-height: 1;
  text-align: center;
  padding: clamp(var(--space-3), 3vw, var(--space-6)) var(--space-2);
  background: var(--paper-elevated);
  color: var(--ink);
  font-feature-settings: "kern", "liga";
  transition: background 0.2s, color 0.2s;
}

.specimen__cell:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-7);
  color: var(--ink);
  max-width: 16ch;
  text-wrap: balance;
}

.hero__tagline em {
  font-style: italic;
  color: var(--accent);
}

.hero__deck {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 40rem;
  margin: 0 0 var(--space-7);
  font-style: italic;
}

/* ============================================================
   CALL TO ACTION
   ============================================================ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #FBF7EB;
  background: var(--accent);
  padding: var(--space-4) var(--space-6);
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  outline: 1px solid var(--accent);
  outline-offset: 5px;
  transition: background 0.2s ease, outline-offset 0.2s ease, outline-width 0.2s ease;
}

.cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  animation: cta-shine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cta-shine {
  0%, 75% { left: -100%; }
  100% { left: 200%; }
}

@media (prefers-reduced-motion: reduce) {
  .cta::after { animation: none; }
}

.cta:hover {
  background: var(--accent-ink);
  text-decoration: none;
  outline-offset: 8px;
}

.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.cta__apple {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  position: relative;
  top: -0.05em;
}

.cta__arrow {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.15em;
  transition: transform 0.2s ease;
  position: relative;
}

.cta:hover .cta__arrow { transform: translateX(4px); }

/* ============================================================
   SECTION FRAME
   ============================================================ */
.section {
  padding: var(--space-9) var(--gutter);
  max-width: var(--max-wide);
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}

.section-header {
  display: flex;
  gap: var(--space-5);
  align-items: baseline;
  margin: 0 0 var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.section-number {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1;
}

/* ============================================================
   FEATURES (typographic list)
   ============================================================ */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: feature;
}

.feature {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--space-6);
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--rule);
  counter-increment: feature;
  align-items: start;
}

.feature::before {
  content: counter(feature, lower-roman) ".";
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.25rem;
  color: var(--accent);
  line-height: 0.9;
  padding-top: 0.15em;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 var(--space-3);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.feature p {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0;
}

.archaic-list {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: var(--space-3) 0 0;
  padding-left: 1.25em;
  columns: 2;
  column-gap: var(--space-5);
}

.archaic-list li {
  break-inside: avoid;
}

.feature p.archaic-note {
  margin-top: var(--space-3);
  font-size: var(--text-base);
  color: var(--ink-faint);
}

@media (max-width: 680px) {
  .feature {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-6) 0;
  }
  .feature::before {
    font-size: 1.75rem;
    padding-top: 0;
  }
  .feature h3 { font-size: var(--text-xl); }
  .feature p { font-size: var(--text-base); }
  .archaic-list {
    font-size: var(--text-base);
    columns: 1;
  }
}

/* ============================================================
   HERO LAYOUT + DEMO VIDEO + SCREENSHOT STRIP
   ============================================================ */
.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas:
    "tagline  demo"
    "deck     demo"
    "cta      demo"
    "specimen specimen";
  column-gap: var(--space-8);
  row-gap: var(--space-6);
  align-items: start;
}

.hero__layout > .hero__tagline       { grid-area: tagline; margin: 0; }
.hero__layout > .hero__deck          { grid-area: deck;    margin: 0; }
.hero__layout > .hero__cta           { grid-area: cta;     justify-self: start; }
.hero__layout > .hero__demo          { grid-area: demo;    justify-self: center; }
.hero__layout > .hero__specimen-block { grid-area: specimen; margin-top: var(--space-4); }

@media (max-width: 760px) {
  .hero__layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tagline"
      "deck"
      "cta"
      "demo"
      "specimen";
    column-gap: 0;
  }
}

.hero__demo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  background: var(--paper-elevated);
  border: 1px solid var(--rule);
}

.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 760px) {
  .screenshot-strip {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    gap: var(--space-4);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) var(--space-3);
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
  }
  .screenshot {
    flex: 0 0 45%;
    min-width: 9rem;
    scroll-snap-align: start;
  }
}

.section--screenshots {
  border-top: none;
  padding-top: 0;
}

.screenshot {
  margin: 0;
  text-align: center;
}

.screenshot img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto var(--space-4);
  background: var(--paper-elevated);
  border: 1px solid var(--rule);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.screenshot img:hover,
.screenshot img:focus-visible {
  transform: scale(1.02);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--space-5);
  animation: lightbox-fade 0.15s ease;
}

.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: min(90vw, 420px);
  max-height: 90vh;
  height: auto;
  width: auto;
  background: var(--paper-elevated);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  transition: background 0.15s, border-color 0.15s;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox { animation: none; }
  .screenshot img { transition: none; }
}

.screenshot__caption-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  margin-right: var(--space-2);
}

.screenshot figcaption {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.screenshot figcaption strong {
  font-weight: 500;
  color: var(--ink-muted);
}

/* ============================================================
   DESCRIPTION (long-form)
   ============================================================ */
.description__body {
  max-width: var(--max-prose);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--ink);
}

.description__body p { margin: 0 0 var(--space-5); }

.description__body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 4.6em;
  float: left;
  line-height: 0.82;
  padding-top: 0.08em;
  padding-right: 0.08em;
  padding-left: 0;
  color: var(--accent);
  font-weight: 400;
  font-feature-settings: "kern", "liga";
}

.description__body em {
  font-style: italic;
  color: var(--ink);
}

.description__body .marginalia {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  display: block;
  margin: var(--space-7) 0 var(--space-3);
}

/* ============================================================
   SUPPORT (inside index.html)
   ============================================================ */
.support__block {
  max-width: var(--max-prose);
}

.support__block + .support__block {
  margin-top: var(--space-8);
}

.support__subheading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin: 0 0 var(--space-5);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.support__subheading .ornament {
  color: var(--accent);
  font-style: italic;
  margin-right: var(--space-2);
}

.support__note {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}

.support__note strong {
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
}

/* Steps list */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: var(--space-5) 0 var(--space-5) calc(3rem + var(--space-4));
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--space-5);
  width: 3rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  text-align: right;
}

.steps li strong {
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
}

/* FAQ accordion */
.faq {
  border-top: 1px solid var(--rule);
  margin: 0;
}

.faq details {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-5) 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: var(--space-7);
  font-weight: 400;
  line-height: 1.25;
  transition: color 0.2s;
}

.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { display: none; }

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details[open] summary { color: var(--accent); }

.faq details p {
  margin: var(--space-4) 0 0;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 58ch;
}

/* Contact block */
.contact-card {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--rule);
  background: var(--paper-elevated);
  max-width: var(--max-prose);
  font-family: var(--font-serif);
}

.contact-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin-bottom: var(--space-2);
}

.contact-card__email {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.005em;
  display: inline-block;
}

.contact-card__email:hover { text-decoration: underline; }

.contact-card__body {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================================
   STANDALONE PAGE (privacy, terms)
   ============================================================ */
.page {
  padding: clamp(var(--space-7), 7vw, var(--space-9)) var(--gutter) var(--space-10);
  max-width: var(--max-wide);
  margin: 0 auto;
}

.page__header {
  max-width: var(--max-prose);
  margin: 0 auto var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--rule);
}

.page__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin: 0 0 var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.page__title {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 0.95;
  margin: 0 0 var(--space-5);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.page__deck {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-muted);
  font-style: italic;
  max-width: 36rem;
  margin: 0;
}

.page__body {
  max-width: var(--max-prose);
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--ink);
}

.page__body > section {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--rule);
}

.page__body > section:last-of-type { border-bottom: none; }
.page__body > section:first-of-type { padding-top: 0; }

.page__body h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin: 0 0 var(--space-4);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.page__body h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  margin: var(--space-5) 0 var(--space-2);
  color: var(--ink);
}

.page__body p { margin: 0 0 var(--space-4); }
.page__body > section p:last-child { margin-bottom: 0; }

.page__body ul, .page__body ol {
  padding-left: var(--space-5);
  margin: 0 0 var(--space-5);
}

.page__body li { margin-bottom: var(--space-3); }

.return-home {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  text-decoration: none;
  margin-top: var(--space-9);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  width: 100%;
}

.return-home:hover {
  color: var(--accent);
  text-decoration: none;
}

.return-home__arrow {
  font-family: var(--font-serif);
  font-size: 1.2em;
  transition: transform 0.2s;
}

.return-home:hover .return-home__arrow {
  transform: translateX(-4px);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  padding: var(--space-7) var(--gutter);
  margin-top: var(--space-9);
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

.site-footer__cta {
  display: flex;
  width: max-content;
  margin: 0;
}

.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6) var(--space-8);
}

.site-footer__mark {
  display: block;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.site-footer__mark-img {
  height: 1.75rem;
  width: auto;
  display: block;
}

/* Same light/dark toggle pattern as the header wordmark: explicit
   data-theme wins over the system preference. */
.site-footer__mark-img--dark { display: none; }
:root[data-theme="dark"] .site-footer__mark-img--light { display: none; }
:root[data-theme="dark"] .site-footer__mark-img--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer__mark-img--light { display: none; }
  :root:not([data-theme="light"]) .site-footer__mark-img--dark { display: block; }
}

.site-footer__meta {
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.site-footer__meta a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}

.site-footer__meta a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer__top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  align-self: center;
  transition: color 0.2s, border-color 0.2s;
}

.site-footer__top:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer__top-arrow {
  font-family: var(--font-serif);
  font-size: 1.15em;
  transition: transform 0.2s ease;
}

.site-footer__top:hover .site-footer__top-arrow {
  transform: translateY(-3px);
}

@media (max-width: 760px) {
  .hero .cta {
    display: flex;
    width: 100%;
    justify-content: center;
  }
  .hero__layout > .hero__cta { justify-self: stretch; }
}

@media (max-width: 760px) {
  .site-footer {
    text-align: center;
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
  }
  .site-footer__cta { order: -1; }
}

/* ============================================================
   RESPONSIVE HEADER WRAP
   ============================================================ */
@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
    padding: var(--space-4) var(--gutter);
    gap: var(--space-4);
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    gap: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--rule);
    justify-content: flex-start;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .cta, .theme-toggle { display: none; }
  body { background: white; color: black; }
}
