/* =========================================================================
   desti — marketing site styles
   Brand: sage #6B8A2A · cream #FAEEDA · deep ink #2b3318
   Display: Fraunces (700) · Body: Outfit
   Shared across index.html, privacy.html, terms.html
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --ink: #2b3318;
  --cream: #faeeda;
  --sage: #6b8a2a;
  --sage-deep: #4d6a1c;      /* AA-contrast sage for inline links/small text */
  --paper: #fffdf7;          /* lifted card surface */
  --panel: #f1e3c8;          /* deeper sand for alternating sections */
  --ink-muted: rgba(43, 51, 24, 0.66);
  --ink-soft: rgba(43, 51, 24, 0.42);
  --line: rgba(43, 51, 24, 0.14);
  --line-strong: rgba(43, 51, 24, 0.28);
  --sage-tint: rgba(107, 138, 42, 0.12);
  --shadow-sm: 0 1px 2px rgba(43, 51, 24, 0.06);
  --shadow-md: 0 18px 40px -24px rgba(43, 51, 24, 0.45);
  --shadow-lg: 0 40px 80px -40px rgba(43, 51, 24, 0.55);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1140px;
  --container-narrow: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* heavy, decelerating settle */
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);  /* top bevel on cream cards */
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  background-color: var(--cream);
  /* faint grain for warmth/depth */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--panel { background: var(--panel); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 2px;
  background: var(--sage);
  border-radius: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.h-display {
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 { font-size: clamp(2rem, 4.6vw, 3.15rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.015em; }

.lede {
  font-size: clamp(1.12rem, 1.9vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-muted);
  font-weight: 400;
  max-width: 46ch;
}

.section__head { max-width: 56ch; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section__head .lede { margin-top: 1.25rem; }

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--sage);
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.06em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--primary {
  background: var(--sage);
  color: var(--cream);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover {
  background: var(--sage-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--on-ink {
  background: var(--cream);
  color: var(--ink);
}
.btn--on-ink:hover { background: #fff; transform: translateY(-2px); }

/* Nested trailing arrow ("button-in-button"): a circular chip flush to the
   inner right padding, tinted from the button's own text color. */
.btn--arrow { padding-right: 0.6em; }
.btn__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  margin-left: 0.1em;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  transition: transform 0.45s var(--ease-out), background-color 0.3s var(--ease);
}
.btn__chip svg { width: 0.95em; height: 0.95em; display: block; }
.btn--arrow:hover .btn__chip {
  background: color-mix(in srgb, currentColor 28%, transparent);
  transform: translate(2px, -1px) scale(1.04);
}
/* Physical press: settle the whole pill, ease the chip back in. */
.btn:active { transform: translateY(0) scale(0.985); }
.btn--arrow:active .btn__chip { transform: translate(1px, 0) scale(1); }

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}
.nav__brand { font-size: 1.6rem; }
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  list-style: none;
  padding: 0;
}
.nav__links a:not(.nav__cta) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  position: relative;
  padding-block: 0.3rem;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta { margin-left: 0.5rem; padding: 0.6em 1.2em; font-size: 0.95rem; white-space: nowrap; }
.nav__links--legal { display: none; }

@media (max-width: 760px) {
  /* On phones the sticky nav keeps just the wordmark + CTA; the text links
     (What it is / How it works / About / Privacy / Terms) live in the footer. */
  .nav__links li:not(:has(.nav__cta)) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  /* soft sage glow top-right */
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(107, 138, 42, 0.18), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
}
.hero__copy { max-width: 44rem; }
.hero h1 { margin-top: 1.5rem; }
.hero h1 .accent { color: var(--sage); font-style: italic; padding-right: 0.08em; }
.hero__lede { margin-top: 1.75rem; }
.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1rem;
  align-items: center;
}
.store-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.store-note .apple {
  display: inline-flex;
  width: 1.15em; height: 1.15em;
  color: var(--ink);
}
.hero__meta {
  margin-top: 2.5rem;
  display: flex;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  flex-wrap: wrap;
}
.hero__meta .stat { display: flex; flex-direction: column; }
.hero__meta .stat b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1;
}
.hero__meta .stat span {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: 0.35rem;
}

/* ---------- Logo strip / trust ---------- */
.marquee-note {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Feature / explainer split ---------- */
.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split p + p { margin-top: 1.1rem; }
.split .body-lg { font-size: 1.12rem; color: var(--ink-muted); }
.split .body-lg strong { color: var(--ink); font-weight: 600; }

/* ---------- How it works (numbered steps) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  counter-reset: step;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 1.85rem;
  position: relative;
  box-shadow: var(--highlight), 0 1px 2px rgba(43, 51, 24, 0.05);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out);
}
.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--highlight), var(--shadow-md);
  border-color: var(--line-strong);
}
.step__no {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--sage);
  line-height: 1;
  display: block;
  margin-bottom: 1.1rem;
  transition: transform 0.45s var(--ease-out);
}
.step:hover .step__no { transform: translateY(-2px); }
.step h3 { margin-bottom: 0.6rem; }
.step p { color: var(--ink-muted); font-size: 1rem; }

/* ---------- Value cards ---------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}
.card {
  flex: 1 1 280px;
  max-width: 340px;
  padding: 1.9rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.45s var(--ease-out), background-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  background: var(--paper);
  box-shadow: var(--highlight), var(--shadow-md);
  border-color: var(--line-strong);
}
.card .ic {
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--sage-tint);
  color: var(--sage-deep);
  margin-bottom: 1.15rem;
  transition: transform 0.45s var(--ease-out), background-color 0.3s var(--ease);
}
.card:hover .ic {
  transform: scale(1.08) rotate(-3deg);
  background: color-mix(in srgb, var(--sage) 20%, transparent);
}
.card .ic svg { width: 1.4rem; height: 1.4rem; }
.card h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-muted); font-size: 0.98rem; }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about p { color: var(--ink-muted); font-size: 1.08rem; }
.about p + p { margin-top: 1.15rem; }
.about p strong { color: var(--ink); font-weight: 600; }
.factcard {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(250, 238, 218, 0.12);
}
.factcard dl { display: grid; gap: 1.15rem; }
.factcard dt {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 238, 218, 0.6);
  margin-bottom: 0.2rem;
}
.factcard dd {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
}
.factcard dd a { color: var(--cream); }
.factcard .rule { height: 1px; background: rgba(250, 238, 218, 0.16); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--cream);
  border-radius: clamp(20px, 4vw, 32px);
  padding: clamp(2.75rem, 7vw, 5rem) clamp(1.75rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(250, 238, 218, 0.1);
}
.cta-band::after {
  content: "";
  position: absolute;
  bottom: -40%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(107, 138, 42, 0.4), transparent 60%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: var(--cream); max-width: 18ch; margin-inline: auto; }
.cta-band .lede { color: rgba(250, 238, 218, 0.78); margin: 1.25rem auto 2rem; }
.cta-band .hero__actions { justify-content: center; }
.cta-band .store-note { color: rgba(250, 238, 218, 0.7); }
.cta-band .store-note .apple { color: var(--cream); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(250, 238, 218, 0.72);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer a { color: rgba(250, 238, 218, 0.72); text-decoration: none; }
.footer a:hover { color: var(--cream); }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.75rem;
  border-bottom: 1px solid rgba(250, 238, 218, 0.16);
}
.footer__brand .wordmark { color: var(--cream); font-size: 1.9rem; }
.footer__brand p {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  max-width: 30ch;
  color: rgba(250, 238, 218, 0.6);
}
.footer__col h4 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 238, 218, 0.5);
  margin-bottom: 1rem;
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.65rem; }
.footer__col a { font-size: 0.97rem; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.88rem;
  color: rgba(250, 238, 218, 0.55);
}
.footer__bottom .sep { color: rgba(250, 238, 218, 0.3); }

/* ---------- Legal pages ---------- */
.legal-hero {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-top: 1rem;
}
.legal-hero .updated {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.legal-hero .updated b { color: var(--ink); font-weight: 600; }

.legal-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.toc {
  position: sticky;
  top: 92px;
  font-size: 0.9rem;
}
.toc h4 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.toc ol { list-style: none; padding: 0; display: grid; gap: 0.55rem; counter-reset: toc; }
.toc a {
  color: var(--ink-muted);
  text-decoration: none;
  display: block;
  line-height: 1.35;
  transition: color 0.2s var(--ease);
}
.toc a:hover { color: var(--sage-deep); }

.prose { max-width: var(--container-narrow); }
.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  letter-spacing: -0.015em;
  margin-top: 2.75rem;
  margin-bottom: 0.9rem;
  scroll-margin-top: 90px;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.prose h2 .num {
  font-size: 0.92rem;
  font-family: var(--body);
  font-weight: 700;
  color: var(--sage);
  letter-spacing: 0;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}
.prose p { margin-bottom: 1rem; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.15rem 1.2rem; padding: 0; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.3rem; }
.prose li::marker { color: var(--sage); }
.prose strong { font-weight: 600; }
.prose a { color: var(--sage-deep); font-weight: 500; }
.prose .callout {
  background: var(--sage-tint);
  border: 1px solid color-mix(in srgb, var(--sage) 32%, transparent);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.6rem;
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  background: var(--panel);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prose td a { word-break: break-word; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  text-decoration: none;
  color: var(--sage-deep);
}
.back-link:hover { text-decoration: underline; }

/* ---------- Reveal animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); filter: blur(6px); }
[data-reveal] {
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out),
    filter 0.85s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__copy { max-width: 100%; }
  .split { grid-template-columns: 1fr; gap: 1.5rem; }
  .about__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .nav__links { gap: 1rem; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__meta { gap: 1.5rem; }
}

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

/* ---------- Print (legal pages) ---------- */
@media print {
  .nav, .footer, .toc, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
  .legal-layout { grid-template-columns: 1fr; }
  .prose { max-width: none; }
}
