/* Puttsy — puttsy.app
   The app, as a website. Tokens mirror constants/Colors.tsx (light palette)
   and the type rules in constants/Typography.tsx. No frameworks, no build. */

:root {
  /* Colors.tsx PALETTE (light) — exact values, app token names */
  --cream: #F7F1E4;         /* warm scorecard paper (page) */
  --beige-soft: #F0E7D4;    /* second paper tone (tracks, wells) */
  --card: #FFFCF4;          /* card paper — lighter than the page */
  --pine: #22493A;          /* deep pine — primary */
  --pine-lift: #2F6049;     /* secondary / hover pine */
  --pine-soft: #E3EADF;     /* pine tint (chips, soft fills) */
  --tan: #B98A54;           /* tan / leather — accent */
  --tan-soft: #F1E4CE;      /* tan tint (chips, soft fills) */
  --sage: #4E8C66;
  --sage-soft: #DEE9DC;
  --ink: #231F1A;           /* text primary */
  --ink-soft: #5A5044;      /* text secondary */
  --muted: #8D8471;         /* text muted */
  --hair: #E5DAC3;          /* warm ruled hairline (border.light) */
  --border-medium: #D8CBB0;
  --green-text: #2A5C45;    /* pine text on pine tint */
  --primary-text: #F8F3E7;  /* cream text on pine */
  --bg-tertiary: #EDE3CE;

  /* SHADOWS — warm #3A2E18, never neutral black */
  --shadow-soft: 0 2px 6px rgba(58, 46, 24, 0.05);
  --shadow-sm: 0 3px 10px rgba(58, 46, 24, 0.08);
  --shadow-md: 0 6px 18px rgba(58, 46, 24, 0.12);

  /* RADIUS */
  --radius-card: 14px;
  --radius-card-lg: 16px;
  --radius-hero: 18px;
  --radius-pill: 9999px;

  /* Type — Nunito is the app's warm sans; serif is display-only */
  --sans: "Nunito", "Avenir Next", Avenir, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Display titles only: Instrument Serif ships as a single 400 cut. */
h1, h2.display, .serif {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--pine);
}

a { color: var(--green-text); }
a:hover { color: var(--pine); }

strong { font-weight: 800; }

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

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* The numeral rule: every number is the warm sans, bold, tabular. */
.num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Eyebrow — Typography.eyebrow: small, 800, letterspaced uppercase */
.eyebrow {
  font-size: 0.72rem;               /* ~11.5px */
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 8px;
}

/* Caption — Typography.caption: 12.5px, 600, muted */
.caption {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

/* ---- Paper cards — the app surface ---- */

.card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-soft);
}

/* Section label — the app's monthHeader / section label: a muted caption
   sitting just outside its card, never a heavy heading. */
.block-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin: 28px 4px 8px;
}

/* ---- Chips / pills — the app's smallChip language ---- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}
.chip-pine-soft { background: var(--pine-soft); color: var(--green-text); }
.chip-tan-soft { background: var(--tan-soft); color: var(--ink-soft); }
.chip-outline {
  background: var(--card);
  border: 1px solid var(--hair);
  color: var(--ink-soft);
}

/* ---- Header — app paper chrome: mark + brand left, section anchors +
   pine CTA pill right. Legal lives in the footer only. ---- */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--hair);
  background: var(--cream);
}
header.site .bar {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
header.site .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--pine);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}
header.site .brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--hair);
}
header.site nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
header.site nav a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
header.site nav a:hover { color: var(--pine); background: var(--bg-tertiary); }
.nav-cta {
  background: var(--pine);
  color: var(--primary-text);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--pine-lift); color: var(--primary-text); }

/* Anchored sections clear the sticky header */
section[id] { scroll-margin-top: 72px; }

/* ---- Hero ---- */

.hero {
  text-align: center;
  padding: 56px 24px 52px;
  border-bottom: 1px solid var(--hair);
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.7rem);
  margin-bottom: 14px;
}
.hero h1 em { font-style: italic; color: var(--tan); }
.hero .promise {
  max-width: 540px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* The peeking gopher — first child of a relative anchor; the opaque card
   paints over everything below its top edge, exactly like the app. */
.peek-anchor { position: relative; }
.peek {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.peek-over {           /* head + paws over the card's top edge */
  width: 62px;         /* aspect 470/492 → ~65px tall, ~15px sunk */
  top: -50px;
  right: 30px;
}
.peek-chart {          /* same peek, one paw holding up the trend */
  width: 88px;         /* aspect 680/526 → ~68px tall, ~16px sunk */
  top: -52px;
  right: 26px;
}
.peek-anchor > .card { position: relative; z-index: 1; }

/* Stat strip — Home's signature card: big tabular numbers over muted
   labels, thin vertical hairlines between. */
.hero-strip {
  max-width: 440px;
  margin: 44px auto 0;   /* clearance for the head above the card */
  text-align: left;
}
.stat-strip {
  display: flex;
  align-items: center;
  padding: 18px 0;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat .num {
  font-size: 1.95rem;    /* Typography.statLarge */
  line-height: 1.15;
  color: var(--ink);
}
.stat .lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--hair);
}
.strip-caption {
  margin: 6px 4px 0;
}

.hero .cta { margin-top: 32px; }

/* App Store badge — the app's primary action: a pine pill, cream text */
.badge-appstore .apple-mark {
  width: 26px;
  height: 32px;
  flex: none;
}
.badge-appstore .badge-text { display: flex; flex-direction: column; }
.badge-appstore {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  background: var(--pine);
  color: var(--primary-text);
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 12px 30px;
  line-height: 1.25;
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: background 0.15s ease;
}
.badge-appstore:hover { background: var(--pine-lift); color: var(--primary-text); }
.badge-appstore .small {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}
.badge-appstore .big { display: block; font-size: 1.12rem; font-weight: 800; }
.hero .soon, .cta-again .soon { margin-top: 12px; }

/* ---- Feature cards ---- */

.features { padding: 40px 0 8px; }
.feature-card {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 36px 40px;
  margin-bottom: 28px;
  border-radius: var(--radius-hero);
}
.feature-card.flip { flex-direction: row-reverse; }
.feature-card .shot { flex: 0 0 264px; }

/* Phone-ish frame: a well of the second paper tone around the screenshot */
.phone {
  background: var(--beige-soft);
  border: 1px solid var(--hair);
  border-radius: 34px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.phone img { border-radius: 26px; }

.feature-card .copy h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--pine);
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.12;
  margin-bottom: 12px;
}
.feature-card .copy p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 48ch;
}

/* ---- How it works — three numbered steps as app cards ---- */

.how {
  padding: 48px 24px 8px;
  border-top: 1px solid var(--hair);
  text-align: center;
}
.how h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 28px;
}
.steps {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.step { padding: 22px 22px 24px; }
.step .step-num {
  display: block;
  font-size: 1.95rem;
  line-height: 1.15;
  color: var(--tan);
  margin-bottom: 8px;
}
.step h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 6px;
}
.step p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---- FAQ — one paper card, questions as ruled rows ---- */

.faq {
  padding: 48px 24px 16px;
  text-align: center;
}
.faq h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 24px;
}
.faq-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  padding: 6px 24px;
}
.faq-card .qa {
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}
.faq-card .qa:first-child { border-top: 0; }
.faq-card .q {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.faq-card .a {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* ---- Honest by design — the app's footnote cards ---- */

.honest {
  padding: 56px 24px 64px;
  border-top: 1px solid var(--hair);
  text-align: center;
}
.honest h2 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 24px;
}
.honest h2 em { font-style: italic; color: var(--tan); }
.honest-anchor {
  max-width: 620px;
  margin: 56px auto 0;   /* clearance: the chart-peek's head lives up here */
}
.honest-card {
  text-align: left;
  padding: 6px 24px;
}
.honest-card .rule-row {
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}
.honest-card .rule-row:first-child { border-top: 0; }
.honest-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.honest-card .rule-row.last p {
  color: var(--green-text);
  font-weight: 700;
}
.honest .footnote {
  max-width: 620px;
  margin: 8px auto 0;
  text-align: left;
  padding: 0 4px;
}

/* ---- Bottom CTA ---- */

.cta-again {
  text-align: center;
  padding: 8px 24px 64px;
}

/* ---- Content pages (privacy / terms / support) ---- */

main.page { padding: 44px 24px 56px; }
main.page > .wrap-narrow > h1,
main.page h1 { font-size: clamp(2.1rem, 5vw, 2.7rem); margin-bottom: 6px; }
main.page .updated {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Each numbered section: muted label outside, paper card under it */
.block .card { padding: 18px 22px; }
.block .card p { margin-bottom: 12px; font-size: 0.95rem; color: var(--ink-soft); }
.block .card p:last-child { margin-bottom: 0; }
.block .card strong { color: var(--ink); }

/* Callout — the app's info tint (pine on pine-soft) */
.callout {
  background: var(--pine-soft);
  border: 1px solid var(--hair);
  border-radius: var(--radius-card-lg);
  padding: 16px 20px;
  margin: 20px 0 4px;
}
.callout p { font-size: 0.95rem; color: var(--green-text); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--pine); }

/* Ruled table — label left / value right, thin warm rules (share-card look) */
.ruled { margin: 4px 0; }
.ruled .row {
  display: flex;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
}
.ruled .row:first-child { border-top: 0; }
.ruled .rlabel {
  flex: 0 0 168px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
}
.ruled .rvalue {
  flex: 1;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Ruled list — plain items separated by the same warm rules */
.ruled-list { list-style: none; margin: 4px 0; }
.ruled-list li {
  padding: 11px 0;
  border-top: 1px solid var(--hair);
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.ruled-list li:first-child { border-top: 0; }

/* Footnote — small, muted, factual */
.footnote {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

/* ---- Footer ---- */

footer.site {
  border-top: 1px solid var(--hair);
  padding: 28px 24px 36px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
footer.site .links { margin-bottom: 8px; }
footer.site a { color: var(--ink-soft); text-decoration: none; margin: 0 10px; }
footer.site a:hover { color: var(--pine); }

/* ---- Responsive ---- */

@media (max-width: 760px) {
  .feature-card, .feature-card.flip {
    flex-direction: column;
    gap: 28px;
    padding: 28px 22px;
    text-align: center;
  }
  .feature-card .shot { flex-basis: auto; width: min(250px, 74vw); }
  .feature-card .copy p { margin: 0 auto; }
  .feature-card .chip-row { justify-content: center; }
  .hero-strip { max-width: 400px; }
  .ruled .row { flex-direction: column; gap: 2px; }
  .ruled .rlabel { flex-basis: auto; }
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 620px) {
  header.site nav { display: none; }
}

@media (max-width: 390px) {
  .peek-over { width: 52px; top: -42px; right: 22px; }
  .peek-chart { width: 72px; top: -43px; right: 18px; }
  .stat .num { font-size: 1.7rem; }
}
