/* Homepage styles. Colors and fonts mirror the iOS app (CookieTheme.swift):
   DM Serif Display for headings, Atkinson Hyperlegible for everything else. */

:root {
  --page: #f7f1e7;          /* ckPage */
  --surface: #faf6ef;       /* ckSurface */
  --frosted: #fcfaf6;       /* ckFrosted */
  --ink: #1c2b21;           /* ckInkGreen */
  --ink-2: #48514a;         /* secondary text, 7:1+ on page and sage */
  --sage: #e3e8da;
  --sage-deep: #d4dcc8;     /* ckCardSage */
  --hairline: rgba(28, 43, 33, 0.14);
  --amber: #b0661f;         /* ckAmberAccent */
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --radius: 22px;
  --shadow: 0 24px 50px -24px rgba(28, 43, 33, 0.35);
}

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

html {
  scroll-padding-top: 88px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--frosted);
  padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.shell {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.4;
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--ink-2);
  max-width: 34ch;
}
.lede strong { color: var(--ink); }

/* Buttons + links */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 700; white-space: nowrap;
  border-radius: 14px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn-store {
  background: var(--ink); color: var(--frosted);
  padding: 15px 26px 15px 22px;
  font-size: 1.0625rem;
  min-height: 56px;
}
.btn-store svg { width: 24px; height: 24px; flex: none; }
.btn-store:hover { background: #2a3f31; transform: translateY(-1px); }
.btn-small { padding: 10px 18px 10px 14px; min-height: 44px; font-size: 0.9375rem; border-radius: 12px; }
.btn-small svg { width: 18px; height: 18px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.text-link svg { width: 16px; height: 16px; }
.text-link:hover { color: var(--amber); }

.pricing { margin-top: 12px; color: var(--ink-2); font-size: 0.9375rem; }

/* Wordmark */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.wordmark-wave { width: 41px; height: 28px; flex: none; color: var(--ink); }
.wordmark-type { height: 27px; width: 220px; flex: none; }
.wordmark-lg { gap: 12px; }
.wordmark-lg .wordmark-wave { width: 38px; height: 26px; }
.wordmark-lg .wordmark-type { height: 25px; width: 203px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 231, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.header-row {
  display: flex; align-items: center; gap: 28px;
  min-height: 76px;
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  white-space: nowrap; text-decoration: none; font-size: 0.9375rem; font-weight: 700;
  padding: 8px 0;
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; }

/* Phone frames around real screenshots */
.phone {
  background: #121a15;
  padding: 9px;
  border-radius: 46px;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #3a463e;
}
.phone img { border-radius: 38px; width: 100%; }
.phone-sm { border-radius: 36px; padding: 7px; }
.phone-sm img { border-radius: 30px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  background:
    radial-gradient(60% 70% at 85% 25%, rgba(255, 252, 244, 0.95), rgba(255, 252, 244, 0) 70%),
    linear-gradient(180deg, #f3ebdd 0%, var(--page) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  font-size: clamp(3rem, 6.4vw, 5.5rem);
  max-width: 12ch;
  margin-bottom: 26px;
}
.hero .lede { margin-bottom: 30px; }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px 28px; margin-top: 26px;
}
.rating {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  background: var(--frosted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 16px 8px 14px;
  font-size: 0.9375rem;
}
.rating:hover { border-color: var(--ink); }
.rating .stars { color: var(--amber); letter-spacing: 2px; font-size: 1rem; }
.rating strong { font-size: 1.0625rem; }
.rating-count { color: var(--ink-2); }

.hero-visual {
  position: relative;
  display: flex; justify-content: flex-end;
  padding-right: 4%;
}
.phone-hero { width: min(330px, 80%); transform: rotate(1.5deg); }
/* "Try saying" card, overlapping the phone's lower-left edge. */
.try-card {
  position: absolute; left: 0; bottom: 12%; z-index: 1;
  width: min(300px, 52%);
  background: var(--frosted);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: 0 22px 44px -22px rgba(28, 43, 33, 0.45);
}
.try-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 10px;
}
.try-label svg { width: 26px; height: 18px; color: var(--ink); }
.try-card li {
  font-size: 1.0625rem; line-height: 1.35; padding: 9px 0;
  border-top: 1px solid var(--hairline);
}
.try-card li:first-child { border-top: 0; padding-top: 2px; }

/* Press bar */
.press {
  border-block: 1px solid var(--hairline);
  background: var(--surface);
  padding: 22px 0 10px;
}
.press-row {
  display: flex; align-items: center; gap: 24px 36px; flex-wrap: wrap;
}
.press-row .eyebrow { margin: 0; }
.press-logos {
  display: flex; flex-wrap: wrap; gap: 14px; flex: 1;
  justify-content: space-between;
}
.press-logo {
  display: flex; align-items: center; justify-content: center;
  height: 56px; padding: 8px 16px; border-radius: 12px;
}
.press-logo img { height: 40px; width: auto; }
.press-logo:hover { outline: 2px solid var(--ink); outline-offset: 2px; }

.press-more { padding: 10px 0 12px; }
.press-more summary {
  cursor: pointer; font-weight: 700; font-size: 0.9375rem;
  width: max-content; padding: 6px 0;
  text-decoration: underline; text-underline-offset: 5px;
}
.press-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; padding: 16px 0 12px;
}
.press-list li {
  background: var(--frosted); border: 1px solid var(--hairline);
  border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.press-kind { font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; }
.press-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 6px; }
.press-links a { font-weight: 700; text-underline-offset: 4px; }

/* Bands */
.band { padding: 96px 0; }
.band-tight { padding: 0 0 96px; }
.band-sage { background: var(--sage); }
.band-surface { background: var(--surface); border-block: 1px solid var(--hairline); }
.band h2 { font-size: clamp(2.5rem, 4.6vw, 3.75rem); margin-bottom: 20px; }
.band h2.eyebrow { font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.14em; line-height: 1.4; margin-bottom: 18px; }

/* Conversation */
.convo-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 48px; align-items: center;
}
.convo-copy h2 { font-size: clamp(2.25rem, 3.6vw, 3.25rem); }
.convo-flow {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 0.8fr) 1fr;
  align-items: center;
  gap: 20px;
}
.convo-step { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.convo-step .phone { width: 100%; max-width: 250px; }
.chip {
  display: inline-block;
  background: var(--frosted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700; font-size: 0.9375rem;
}
.chip-strong { background: var(--ink); color: var(--frosted); border-color: var(--ink); }
.convo-ask { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bubble {
  background: var(--frosted);
  border-radius: 20px 20px 20px 6px;
  padding: 14px 18px;
  font-size: 1.125rem; line-height: 1.35;
  box-shadow: 0 10px 24px -14px rgba(28, 43, 33, 0.4);
}
.convo-arrow { width: 40px; height: 40px; align-self: flex-end; }

/* Tools */
.tools-grid {
  display: grid; grid-template-columns: 1fr 2.4fr; gap: 40px;
}
.tools-copy h2 { font-size: clamp(2.25rem, 3.6vw, 3.25rem); }
.tools {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.tool { display: flex; flex-direction: column; gap: 24px; }
.tool-text { display: flex; gap: 14px; align-items: flex-start; min-height: 96px; }
.tool-text p { color: var(--ink-2); font-size: 0.9375rem; margin-top: 4px; }
.tool-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--frosted);
  display: grid; place-items: center;
}
.tool-icon svg { width: 22px; height: 22px; }
/* Show the top of each screen and fade the bottom edge into the page, so the
   crop reads as deliberate instead of cut off. */
.phone-crop {
  aspect-ratio: 923 / 1300;
  overflow: hidden;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  padding-bottom: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  box-shadow: inset 0 0 0 1.5px #3a463e;
}
.phone-crop img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Demo */
.demo-grid {
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 64px; align-items: center;
}
.video-frame { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: #121a15; }
.video-ratio { position: relative; padding-top: 177.78%; }
.video-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-copy .lede { max-width: 42ch; }
.transcript { margin-top: 28px; }
.transcript summary {
  cursor: pointer; font-weight: 700; width: max-content;
  text-decoration: underline; text-underline-offset: 5px; padding: 6px 0;
}
.transcript-content {
  margin-top: 14px; padding: 20px 22px;
  background: var(--frosted); border: 1px solid var(--hairline); border-radius: 16px;
  max-height: 380px; overflow-y: auto;
}
.transcript-content p + p { margin-top: 12px; }

/* Accessibility */
.access-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 56px; align-items: start;
}
.access-copy h2 { max-width: 14ch; }
.access-copy .lede { max-width: 40ch; }
.access-badges {
  display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 32px;
}
.access-badges li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9375rem; font-weight: 700; line-height: 1.2;
}
.badge-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sage-deep);
  display: grid; place-items: center;
}
.badge-icon svg { width: 22px; height: 22px; }
.badge-text { font-family: var(--serif); font-size: 1.125rem; }

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote {
  background: var(--frosted);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.quote blockquote p {
  font-family: var(--serif); font-style: italic;
  font-size: 1.25rem; line-height: 1.3;
}
.quote figcaption { font-weight: 700; color: var(--ink-2); text-align: right; }
.quote-feature {
  grid-column: 1 / -1;
  background: var(--sage);
  border-color: transparent;
  padding: 30px 32px;
  position: relative;
}
.quote-feature blockquote p { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.quote-feature::before {
  content: "\201C";
  font-family: var(--serif);
  font-size: 5rem; line-height: 0.6;
  color: var(--ink);
  display: block; height: 28px;
}

.voices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.voices .quote blockquote p { font-size: 1.125rem; }

/* Closing */
.closing {
  border-top: 1px solid var(--hairline);
  padding: 44px 0;
}
.closing-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 14px 40px;
}
.closing-actions { grid-column: 2; grid-row: 1 / span 2; }
.closing h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); margin: 0; }
@media (min-width: 1081px) { .closing h2 { white-space: nowrap; } }
.closing-copy .pricing { margin-top: 6px; }
.closing-actions {
  display: grid; grid-template-columns: auto auto; align-items: center;
  gap: 10px 28px;
}
.closing-actions .fine { grid-column: 1 / -1; width: 0; min-width: 100%; font-size: 0.875rem; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 22px 0 40px; font-size: 0.9375rem; color: var(--ink-2); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-links a { text-underline-offset: 4px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 18px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tools-copy h2 { max-width: none; }
  .convo-grid, .access-grid { grid-template-columns: 1fr; }

  .voices { grid-template-columns: repeat(2, 1fr); }
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 48px; height: 48px; padding: 12px;
    background: transparent; border: 1px solid var(--hairline); border-radius: 12px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--frosted);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--hairline); }

  .hero { padding: 36px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { flex-direction: column; align-items: center; gap: 0; }
  .try-card { position: relative; left: auto; bottom: auto; width: min(340px, 100%); margin-top: -64px; }
  .hero-visual { justify-content: center; padding-right: 0; }
  .phone-hero { width: min(290px, 74%); transform: none; }

  .demo-grid { grid-template-columns: 1fr; gap: 36px; }
  .video-frame { max-width: 340px; width: 100%; margin-inline: auto; }
}

@media (max-width: 700px) {
  body { font-size: 1rem; }
  .band { padding: 64px 0; }
  .band-tight { padding: 0 0 64px; }
  .wordmark-wave { width: 29px; height: 20px; }
  .wordmark-type { height: 18px; width: 146px; }

  .press-logos { justify-content: flex-start; }
  .press-logo { height: 48px; padding: 6px 12px; }
  .press-logo img { height: 34px; }

  /* Conversation stacks: step, question, answer. */
  .convo-flow { grid-template-columns: 1fr; gap: 28px; }
  .convo-step .phone { max-width: 230px; }
  .convo-ask { align-items: center; }
  .convo-arrow { align-self: center; transform: rotate(90deg); }

  /* Tools become a swipeable row so three tall phones don't stack. */
  .tools {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 8px; margin-inline: -16px; padding-inline: 16px;
    scroll-padding-inline: 16px;
  }
  .tool { scroll-snap-align: start; }
  .tool-text { min-height: 0; }

  .quotes, .voices { grid-template-columns: 1fr; }
  .closing-row { grid-template-columns: 1fr; justify-items: start; }
  .closing-actions { grid-column: auto; grid-row: auto; margin-top: 10px; }
  .closing-actions { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .hero-grid, .closing-row { grid-template-columns: minmax(0, 1fr); }
  .btn, .text-link { white-space: normal; }
  .btn-store { padding: 14px 18px 14px 16px; font-size: 1rem; gap: 10px; }
  .btn-store svg { width: 20px; height: 20px; }
  .rating { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn-store:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --ink-2: #1c2b21; --hairline: rgba(28, 43, 33, 0.5); }
}
