/* ==========================================================================
   Tables — marketing site styles
   Ported from the Claude Design "Tables" design system. Design tokens are the
   source of truth; component classes below compose them. Exact visual values
   are preserved from the original design.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700;800&family=Zilla+Slab:wght@400;500;600;700&display=swap");

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Base neutrals (warm paper & soft ink) */
  --paper: #FBFAF7;
  --canvas: #F2EFE8;
  --tile-neutral: #EFEBE3;
  --line: #DDD8CE;
  --border: #E4E0D8;
  --divider: #F0EDE6;
  --ink: #2B2A28;
  --ink-soft: #6B6862;
  --ink-muted: #8A867E;

  /* Feedback / brand hues: saturated FILL + pale TINT + deep TEXT */
  --sage: #B7CDAE;   --sage-tint: #E8EFE2;   --sage-text: #33472C;
  --butter: #F0D999; --butter-tint: #FAF1D6; --butter-text: #665012;
  --blush: #E9AFAB;  --blush-tint: #F7E3E1;  --blush-text: #6E2E2A;
  --sky: #A9C7E0;    --sky-tint: #E4EEF6;    --sky-text: #274963;
  --lilac: #C7BEE0;  --lilac-tint: #EEEAF6;  --lilac-text: #453963;

  --clay: #B24A3F;

  --paper-90: rgba(242, 239, 232, 0.86);

  /* Type */
  --font-display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-ui: "Libre Franklin", system-ui, -apple-system, sans-serif;

  /* Radii */
  --radius-card: 14px;
  --radius-pill: 999px;

  /* Motion */
  --dur-fade: 180ms;
  --ease-standard: ease;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout */
  --page-max: 1160px;
  --page-pad: 40px;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sky-text); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3 { margin: 0; }

/* ---- Type helpers -------------------------------------------------------- */
.disp { font-family: var(--font-display); font-weight: 600; }
.lf   { font-family: var(--font-ui); }

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---- Layout -------------------------------------------------------------- */
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.section { padding-top: 76px; padding-bottom: 40px; }

.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: 44px; line-height: 1.1; margin-top: 14px; }
.section-head p {
  font-size: 18px; line-height: 1.55; color: var(--ink-soft);
  margin: 12px auto 0; max-width: 520px;
}

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper-90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 16px var(--page-pad);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__link {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.nav__link:hover { color: var(--ink); }

/* Brand mark (2x2 colour grid + wordmark) */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand__mark {
  display: grid;
  grid-template-columns: repeat(2, 13px);
  grid-template-rows: repeat(2, 13px);
  gap: 2.5px;
}
.brand__mark > span { border-radius: 3px; }
.brand__mark > :nth-child(1) { background: var(--sage); }
.brand__mark > :nth-child(2) { background: var(--butter); }
.brand__mark > :nth-child(3) { background: var(--sky); }
.brand__mark > :nth-child(4) { background: var(--lilac); }
.brand__name { font-size: 20px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: var(--paper);
  padding: 15px 24px; border-radius: var(--radius-pill);
  transition: background var(--dur-fade) var(--ease-standard);
}
.btn:hover { background: #000; color: var(--paper); }
.btn--sm { padding: 10px 18px; gap: 8px; font-size: 14px; font-weight: 600; }
.btn--lg { padding: 16px 28px; }
.btn__store {
  display: flex; flex-direction: column; line-height: 1.1; text-align: left;
}
.btn__store small { font-size: 11px; opacity: 0.8; }
.btn__store strong { font-size: 18px; font-weight: 600; }

/* ---- Cards --------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

/* ---- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); background: var(--paper); }
.footer__inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: 36px var(--page-pad);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer__links { display: flex; align-items: center; gap: 28px; }
.footer__links a { font-size: 14px; color: var(--ink-soft); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { font-size: 14px; color: var(--ink-muted); }

/* ==========================================================================
   Landing page
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.hero { max-width: var(--page-max); margin: 0 auto; padding: 8px var(--page-pad) 0; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 40px; min-height: 640px;
}
.hero__copy { padding: 48px 0; }
.hero__eyebrow { color: var(--ink-muted); display: block; margin-bottom: 20px; }
.hero h1 { font-size: 66px; line-height: 1.03; letter-spacing: -0.01em; }
.hero__lede {
  font-size: 19px; line-height: 1.55; color: var(--ink-soft);
  margin: 26px 0 40px; max-width: 440px;
}
.hero__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero__note { font-size: 14px; color: var(--ink-muted); max-width: 170px; line-height: 1.4; }

.hero__art {
  position: relative; align-self: stretch;
  display: flex; align-items: center; justify-content: center;
}
.hero__art-bg { position: absolute; inset: 24px 0; background: var(--sky-tint); border-radius: 26px; overflow: hidden; }
.hero__art-bg::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 220px; height: 220px; border-radius: 26px;
  background: var(--sage); opacity: 0.35; transform: rotate(12deg);
}
.hero__art-bg::after {
  content: ""; position: absolute; bottom: -30px; left: -30px;
  width: 150px; height: 150px; border-radius: 20px;
  background: var(--butter); opacity: 0.4; transform: rotate(-8deg);
}

/* Phone frame — holds a real screenshot or the placeholder */
.phone {
  position: relative; z-index: 1;
  width: 300px; aspect-ratio: 300 / 636;
  background: #111; border-radius: 46px;
  padding: 11px;
  filter: drop-shadow(0 30px 60px rgba(43, 42, 40, 0.22));
}
.phone__screen {
  position: relative; width: 100%; height: 100%;
  background: var(--canvas); border-radius: 36px; overflow: hidden;
}
.phone__screen img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
}
.phone__notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; background: #111; border-radius: 999px; z-index: 2;
}

/* ---- Feature grid -------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  border-radius: var(--radius-card);
  padding: 30px 28px; min-height: 190px;
  display: flex; flex-direction: column;
}
.feature__mark {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
}
.feature__title { font-size: 24px; color: var(--ink); margin: 18px 0 8px; }
.feature__body { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.feature--sage   { background: var(--sage-tint); }
.feature--sage   .feature__mark { background: var(--sage);   color: var(--sage-text); }
.feature--butter { background: var(--butter-tint); }
.feature--butter .feature__mark { background: var(--butter); color: var(--butter-text); }
.feature--sky    { background: var(--sky-tint); }
.feature--sky    .feature__mark { background: var(--sky);    color: var(--sky-text); }
.feature--lilac  { background: var(--lilac-tint); }
.feature--lilac  .feature__mark { background: var(--lilac);  color: var(--lilac-text); }
.feature--blush  { background: var(--blush-tint); }
.feature--blush  .feature__mark { background: var(--blush);  color: var(--blush-text); }

/* ---- How it works -------------------------------------------------------- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.mode {
  border-radius: var(--radius-card); padding: 34px 32px;
  position: relative; overflow: hidden;
}
.mode--sky  { background: var(--sky-tint); }
.mode--sage { background: var(--sage-tint); }
.mode__eyebrow { opacity: 0.9; }
.mode--sky  .mode__eyebrow, .mode--sky  .mode__title, .mode--sky  .mode__body { color: var(--sky-text); }
.mode--sage .mode__eyebrow, .mode--sage .mode__title, .mode--sage .mode__body { color: var(--sage-text); }
.mode__title { font-size: 32px; margin: 8px 0 10px; }
.mode__body { font-size: 15.5px; line-height: 1.55; opacity: 0.9; margin: 0; max-width: 360px; }
.mode__big { position: absolute; right: 30px; top: 24px; font-size: 64px; color: var(--sky); opacity: 0.5; }
.mode__tiles { position: absolute; right: 30px; top: 28px; display: grid; grid-template-columns: repeat(2, 18px); gap: 4px; }
.mode__tiles > span { width: 18px; height: 18px; border-radius: 4px; background: var(--sage); }
.mode__tiles > :nth-child(2), .mode__tiles > :nth-child(3) { opacity: 0.5; }

.answers { padding: 34px 32px; }
.answers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 22px; }
.answer__title { font-size: 21px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.answer__body { font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.answer__demo { margin-bottom: 16px; }

.badge {
  font-size: 11px; font-weight: 600; color: var(--lilac-text);
  background: var(--lilac-tint); padding: 3px 10px; border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

/* Mini answer demos */
.demo-mc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 88px; }
.demo-mc > span { aspect-ratio: 1; border-radius: 8px; background: var(--tile-neutral); border: 2px solid var(--line); }
.demo-mc > .is-correct { background: var(--sage); border-color: var(--sage); }
.demo-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 88px; }
.demo-pad > span { aspect-ratio: 1; border-radius: 6px; background: var(--paper); border: 2px solid var(--line); }
.demo-pad > .is-active { background: var(--ink); border-color: var(--ink); }
.demo-voice { width: 88px; height: 52px; display: flex; align-items: center; }

/* ---- Progress / mastery -------------------------------------------------- */
.progress__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.progress h2 { font-size: 44px; line-height: 1.1; margin: 14px 0 18px; }
.progress__lede { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 22px; max-width: 440px; }
.legend { display: flex; gap: 22px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend .is-m { background: var(--sage); }
.legend .is-l { background: var(--butter); }
.legend .is-n { background: var(--tile-neutral); box-shadow: inset 0 0 0 1px var(--line); }

.mastery { padding: 28px; }
.mastery__grid { display: grid; grid-template-columns: 16px repeat(12, 1fr); gap: 4px; align-items: center; }
.mastery__grid .head {
  font-family: var(--font-ui); font-weight: 600; font-size: 9px; line-height: 1;
  display: grid; place-items: center;
}
.mastery__grid .head--col { color: var(--ink-muted); }
.mastery__grid .head--row { color: var(--ink-soft); }
.mastery__grid .cell { aspect-ratio: 1; border-radius: 3px; }
.mastery__grid .cell--m { background: var(--sage); }
.mastery__grid .cell--l { background: var(--butter); }
.mastery__grid .cell--n { background: var(--tile-neutral); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- Privacy band -------------------------------------------------------- */
.promise {
  background: var(--lilac-tint); border-radius: 22px;
  padding: 64px 56px; text-align: center; position: relative; overflow: hidden;
}
.promise h2 { font-size: 46px; line-height: 1.08; margin: 16px auto 18px; max-width: 660px; color: var(--ink); }
.promise__lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin: 0 auto 36px; max-width: 560px; }
.chips { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.chip {
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: var(--radius-pill);
}
.promise__link { font-size: 14px; color: var(--lilac-text); margin: 26px 0 0; }
.promise__link a { color: var(--lilac-text); font-weight: 600; text-decoration: underline; }

/* ---- Final CTA ----------------------------------------------------------- */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; }
.final__mark {
  display: grid; grid-template-columns: repeat(2, 20px); grid-template-rows: repeat(2, 20px);
  gap: 4px; margin-bottom: 28px;
}
.final__mark > span { border-radius: 4px; }
.final__mark > :nth-child(1) { background: var(--sage); }
.final__mark > :nth-child(2) { background: var(--butter); }
.final__mark > :nth-child(3) { background: var(--sky); }
.final__mark > :nth-child(4) { background: var(--lilac); }
.final h2 { font-size: 52px; line-height: 1.05; margin: 0 0 18px; max-width: 640px; }
.final__lede { font-size: 18px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 34px; max-width: 460px; }

/* ==========================================================================
   Content pages (privacy, support)
   ========================================================================== */
.page { max-width: 760px; margin: 0 auto; padding: 72px var(--page-pad) 96px; }
.page--narrow { max-width: 720px; }
.page h1 { font-size: 52px; line-height: 1.05; margin: 16px 0 18px; }
.page__lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px; max-width: 520px; }
.page__meta { font-size: 13px; color: var(--ink-muted); margin: 0 0 44px; }

/* Highlighted callout box */
.callout { border-radius: var(--radius-card); padding: 28px 30px; margin-bottom: 40px; }
.callout--sage { background: var(--sage-tint); }
.callout--sage .callout__title, .callout--sage p { color: var(--sage-text); }
.callout--sky { background: var(--sky-tint); text-align: center; padding: 32px; }
.callout--sky .callout__title, .callout--sky p { color: var(--sky-text); }
.callout__title { font-size: 22px; margin-bottom: 8px; }
.callout p { font-size: 16px; line-height: 1.6; margin: 0; }

/* Privacy sections */
.prose-section { margin-bottom: 34px; }
.prose-section h2 { font-size: 26px; margin: 0 0 10px; }
.prose-section p { font-size: 16px; line-height: 1.65; color: var(--ink-soft); margin: 0; }

.page__contact { border-top: 1px solid var(--border); margin-top: 44px; padding-top: 28px; }
.page__contact p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 22px 24px; cursor: pointer;
  background: none; border: 0; text-align: left; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
}
.faq-item__icon {
  flex-shrink: 0; color: var(--ink-soft); display: grid; place-items: center;
  transition: transform var(--dur-fade);
}
.faq-item[open] .faq-item__icon,
.faq-item.is-open .faq-item__icon { transform: rotate(180deg); }
.faq-item__body {
  overflow: hidden;
  transition: max-height var(--dur-fade) var(--ease-standard);
  max-height: 0;
}
.faq-item.is-open .faq-item__body { max-height: 320px; }
.faq-item__body p { font-size: 16px; line-height: 1.65; color: var(--ink-soft); margin: 0 24px 22px; }

/* ---- Scroll reveal (progressive enhancement) -----------------------------
   Content is only hidden when JS is present (.js is set synchronously in the
   <head>). Without JS, .reveal elements render normally — never hidden. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  :root { --page-pad: 24px; }
  .hero__grid { grid-template-columns: 1fr; gap: 8px; min-height: 0; }
  .hero__copy { padding: 40px 0 8px; }
  .hero h1 { font-size: 48px; }
  .hero__art { padding-bottom: 48px; }
  .features { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .answers__grid { grid-template-columns: 1fr; gap: 30px; }
  .progress__grid { grid-template-columns: 1fr; gap: 32px; }
  .section-head h2, .progress h2 { font-size: 34px; }
  .promise { padding: 44px 28px; }
  .promise h2 { font-size: 34px; }
  .final h2 { font-size: 38px; }
  .nav__links { gap: 18px; }
  .page h1 { font-size: 40px; }
}

@media (max-width: 560px) {
  .nav__links .nav__link { display: none; }
  .nav__links .nav__link--keep { display: inline-flex; }
  .hero h1 { font-size: 38px; }
  .hero__cta { gap: 14px; }
  .answers { padding: 26px 22px; }
  .mastery { padding: 18px; }
}
