/* =====================================================================
 * Couchette — landing page styles
 *
 * Quiet-luxury palette + typography matching the in-app brand identity
 * (Option C). Built mobile-first; everything degrades cleanly without
 * JavaScript. No build step required — drop these files on a static
 * host (Vercel / Netlify / Cloudflare Pages) and they work.
 * ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Brand palette — matches the Option C identity mark. */
  --midnight-top: #11182A;
  --midnight-bot: #090D18;
  --midnight-deep: #050810;
  --cream: #F3ECDA;
  --cream-2: #E8DDC0;
  --cream-line: rgba(243, 236, 218, 0.42);
  --cream-mute: rgba(243, 236, 218, 0.6);
  --cream-whisper: rgba(243, 236, 218, 0.28);
  --brass: #C7A052;
  --brass-hi: #E9C884;
  --brass-dim: rgba(199, 160, 82, 0.45);
  --brass-mute: rgba(199, 160, 82, 0.65);
  --burgundy: #6E2A3E;

  /* Type families */
  --font-serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-serif-body: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Layout tokens */
  --max-width: 960px;
  --gutter: clamp(20px, 5vw, 48px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--midnight-top) 0%, var(--midnight-bot) 60%),
    var(--midnight-deep);
  color: var(--cream);
  font-family: var(--font-serif-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /* Defensive against any rogue child overflowing horizontally on
     narrow viewports — keeps the page from showing a horizontal
     scroll on mobile if a single unbreakable word sneaks in. */
  overflow-x: hidden;
}

p, h1, h2, h3, dd {
  /* Long names like "Caledonian" or URL-shaped strings should break
     gracefully rather than push the layout sideways on a 360-px
     viewport. */
  overflow-wrap: break-word;
}

a {
  color: var(--brass-hi);
  text-decoration: none;
  border-bottom: 1px solid var(--brass-dim);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--cream);
  border-bottom-color: var(--cream-line);
}

p {
  margin: 0 0 1.1em;
  color: var(--cream-2);
}

/* ── Typography ─────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--brass);
  text-transform: uppercase;
  margin: 0;
}

.eyebrow--cream {
  color: var(--cream-mute);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--cream);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 9vw, 88px);
  text-wrap: balance;
  hyphens: auto;
}

h2 {
  font-size: clamp(26px, 5vw, 48px);
  letter-spacing: -0.005em;
  text-wrap: balance;
  hyphens: auto;
}

h3 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 500;
  hyphens: auto;
}

/* Hidden by default; revealed under the mobile breakpoint to force
   an extra wrap point in the hero headline so "overnight train"
   doesn't try to fit on one line at narrow widths. */
.mobile-only { display: none; }
@media (max-width: 480px) {
  .mobile-only { display: inline; }
}

/* Fixed-size fallback for narrow phones — `vw`-based clamps can
   feed back into document width when content overflows, producing
   too-large fonts on the smallest viewports. Pinning explicit sizes
   here short-circuits that loop. */
@media (max-width: 480px) {
  h1 { font-size: 30px; line-height: 1.12; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .subtitle { font-size: 16px; max-width: 30ch; }
  .hero { padding: 64px 0 80px; }
  .hero__mark { width: 72px; height: 72px; margin-bottom: 28px; }
  .section { padding: 56px 0; }
  .pricing__fineprint { font-size: 11px; }
  .compartment__row dt { font-size: 10px; letter-spacing: 0.24em; }
  .compartment__row dd { font-size: 16px; }
}

.italic {
  font-style: italic;
  color: var(--brass-hi);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
}

.subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--cream-2);
  max-width: 36ch;
  margin: 0 auto;
  line-height: 1.55;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ── Layout primitives ──────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 720px;
}

.rule {
  height: 1px;
  background: var(--brass-dim);
  border: 0;
  margin: 0;
}

.rule--soft {
  background: var(--cream-line);
}

.spacer-sm { height: 24px; }
.spacer-md { height: 48px; }
.spacer-lg { height: 96px; }
.spacer-xl { height: 144px; }

/* ── Navigation ─────────────────────────────────────────────────── */

.site-nav {
  padding: 26px 0;
  border-bottom: 1px solid rgba(199, 160, 82, 0.14);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0;
  color: var(--cream);
}

.site-nav__brand:hover {
  color: var(--cream);
}

.site-nav__brand svg {
  width: 34px;
  height: 34px;
}

.site-nav__wordmark {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.18em;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-mute);
  border-bottom: 0;
}

.site-nav__links a:hover {
  color: var(--brass-hi);
}

@media (max-width: 540px) {
  .site-nav__links {
    gap: 16px;
  }
  .site-nav__links a {
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .site-nav__wordmark {
    font-size: 16px;
  }
}

@media (max-width: 460px) {
  /* On the smallest phones, drop the in-page anchor links from the
     nav — they're rediscoverable on scroll anyway — and keep just
     the persistent off-page destinations. */
  .site-nav__links a.is-anchor {
    display: none;
  }
  .site-nav__wordmark {
    font-size: 15px;
    letter-spacing: 0.16em;
  }
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
  padding: clamp(72px, 12vw, 160px) 0 clamp(96px, 14vw, 180px);
  text-align: center;
}

.hero__mark {
  display: inline-block;
  width: 96px;
  height: 96px;
  margin-bottom: 40px;
}

.hero__title {
  margin-bottom: 24px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding: 14px 28px;
  border: 1px solid var(--brass);
  background: rgba(199, 160, 82, 0.06);
  color: var(--brass-hi);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--brass);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero__cta:hover {
  background: rgba(199, 160, 82, 0.14);
  color: var(--cream);
}

.hero__cta-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-whisper);
}

/* ── Sections ──────────────────────────────────────────────────── */

.section {
  padding: clamp(64px, 10vw, 120px) 0;
  border-top: 1px solid rgba(199, 160, 82, 0.12);
}

.section__head {
  text-align: center;
  margin-bottom: clamp(48px, 8vw, 80px);
}

.section__head .eyebrow {
  margin-bottom: 16px;
}

.section__head .subtitle {
  margin-top: 18px;
}

/* ── Three-step (the ritual) ───────────────────────────────────── */

.ritual {
  display: grid;
  gap: clamp(36px, 6vw, 56px);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 720px) {
  .ritual {
    grid-template-columns: 1fr;
  }
}

.ritual__step {
  text-align: center;
}

.ritual__step .number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--brass);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 24px;
}

/* ── Compartment (features list) ───────────────────────────────── */

.compartment {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--brass-dim);
  border-bottom: 1px solid var(--brass-dim);
}

.compartment__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(199, 160, 82, 0.14);
  align-items: baseline;
}

.compartment__row:last-child {
  border-bottom: 0;
}

.compartment__row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
}

.compartment__row dd {
  margin: 0;
  color: var(--cream-2);
  font-family: var(--font-serif-body);
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .compartment__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ── Pricing ───────────────────────────────────────────────────── */

.pricing {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 780px) {
  .pricing {
    grid-template-columns: 1fr;
  }
}

.tier {
  padding: 32px 28px;
  border: 1px solid var(--brass-dim);
  background: rgba(199, 160, 82, 0.02);
  position: relative;
}

.tier--featured {
  border: 1.5px solid var(--brass);
  background: rgba(199, 160, 82, 0.06);
}

.tier__badge {
  position: absolute;
  top: -10px;
  left: 28px;
  padding: 4px 10px;
  background: var(--midnight-deep);
  border: 1px solid var(--brass);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--brass);
}

.tier__name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--cream);
  margin: 0 0 8px;
}

.tier__price {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.1;
  color: var(--cream);
  margin: 0;
}

.tier__period {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 15px;
  color: var(--cream-mute);
  margin: 6px 0 0;
}

.tier__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--brass);
  text-transform: uppercase;
  margin-top: 18px;
}

.pricing__fineprint {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(199, 160, 82, 0.12);
  font-size: 12px;
  line-height: 1.6;
  color: var(--cream-whisper);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Quote / pull-out ─────────────────────────────────────────── */

.pullquote {
  text-align: center;
  padding: clamp(64px, 10vw, 120px) 0;
  border-top: 1px solid rgba(199, 160, 82, 0.12);
  border-bottom: 1px solid rgba(199, 160, 82, 0.12);
}

.pullquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.45;
  color: var(--cream);
  max-width: 24ch;
  margin: 0 auto;
}

.pullquote__attribution {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--brass);
  text-transform: uppercase;
}

/* ── Footer ───────────────────────────────────────────────────── */

.site-footer {
  padding: 56px 0 80px;
  border-top: 1px solid rgba(199, 160, 82, 0.18);
  margin-top: 80px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: end;
}

@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 0;
}

.site-footer__brand svg {
  width: 32px;
  height: 32px;
}

.site-footer__wordmark {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.18em;
}

.site-footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .site-footer__links {
    justify-content: center;
  }
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-mute);
  border-bottom: 0;
}

.site-footer__links a:hover {
  color: var(--brass-hi);
}

.site-footer__legal {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--cream-whisper);
  text-transform: uppercase;
  grid-column: 1 / -1;
  text-align: center;
}

/* ── Long-form (privacy, terms, support) ──────────────────────── */

.longform {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px var(--gutter) 120px;
}

.longform header {
  margin-bottom: 56px;
  text-align: center;
}

.longform header .eyebrow {
  margin-bottom: 18px;
}

.longform header h1 {
  font-size: clamp(36px, 6vw, 52px);
  margin-bottom: 14px;
}

.longform header .updated {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--cream-mute);
  text-transform: uppercase;
}

.longform h2 {
  font-size: clamp(22px, 3.2vw, 28px);
  margin: 56px 0 18px;
  padding-top: 28px;
  border-top: 1px solid rgba(199, 160, 82, 0.18);
}

.longform h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.longform h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--cream);
}

.longform p,
.longform li {
  color: var(--cream-2);
  font-size: 16px;
  line-height: 1.7;
}

.longform ul,
.longform ol {
  margin: 0 0 1.2em;
  padding-left: 20px;
}

.longform li {
  margin-bottom: 8px;
}

.longform li strong {
  color: var(--cream);
  font-weight: 600;
}

.longform .lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--cream);
  border-left: 1px solid var(--brass);
  padding-left: 20px;
  margin: 24px 0 36px;
}

.longform a {
  border-bottom: 1px solid var(--brass-dim);
}

/* ── FAQ ──────────────────────────────────────────────────────── */

.faq details {
  border-bottom: 1px solid rgba(199, 160, 82, 0.18);
  padding: 22px 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--cream);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--brass);
  margin-left: 16px;
}

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

.faq details > *:not(summary) {
  margin-top: 16px;
  color: var(--cream-2);
  font-size: 16px;
  line-height: 1.7;
}
