/* ==========================================================================
   Stacking Stones — one shared stylesheet for every page
   The look is taken from the Save it app itself: the system font, a pale
   green-grey ground, white cards with 20px corners and pill-shaped buttons.
   Colours, type and spacing are set once below (the "tokens").
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Colours — light (from the app's palette; "soft" is darker than the app's grey so it passes contrast) */
  --ground: #F4F6F4;        /* page background */
  --surface: #FFFFFF;       /* cards */
  --ink: #121815;           /* text */
  --soft: #5B655E;          /* secondary text */
  --accent: #1B4B3A;        /* forest green: buttons and links */
  --accent-hover: #143A2D;
  --on-accent: #FFFFFF;
  --accent-soft: #E3ECE6;   /* gauge track, quiet fills */
  --line: #DFE5E1;

  /* App band: each app brings its own colours (Save it = its welcome screen) */
  --band-from: #43604A;
  --band-to: #182A1E;
  --on-band: #FFFFFF;
  --on-band-soft: #C9D8CF;

  /* Type: the system font, as in the app. Nothing to download. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-s: 0.9375rem;
  --text-m: 1.0625rem;                                     /* body, 17px as in the app */
  --text-l: 1.25rem;
  --title-s: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --title-m: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --title-l: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);

  /* Space and shape */
  --section: clamp(3.5rem, 3rem + 4vw, 7rem);
  --radius: 1.25rem;                                       /* 20px, the app's card radius */
  --wrap: 76rem;
  --measure: 38rem;

  /* Light only, like the app. Add a dark set here once the app has a dark mode. */
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-m);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.soft { color: var(--soft); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  background: var(--ink); color: var(--ground);
  padding: 0.75rem 1.25rem; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand {
  font-weight: 650; letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 2.75rem; white-space: nowrap;
}
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0 -0.75rem 0 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.75rem;
  color: var(--soft); text-decoration: none; border-radius: 999px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Buttons: pill-shaped, as in the app ---------- */
.button, .pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.button:hover, .pill:hover { background: var(--accent-hover); }
.button:active, .pill:active { transform: scale(0.98); }
.pill.on-band { background: var(--on-band); color: #12261E; }
.pill.on-band:hover { background: #E3ECE6; }

/* Large two-tone statements: dark first sentence, continuing in grey */
.statement { font-size: var(--title-l); line-height: 1.05; letter-spacing: -0.035em; font-weight: 650; text-wrap: balance; }
.lead { font-size: var(--text-l); color: var(--soft); max-width: var(--measure); }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { padding-block: clamp(2rem, 1.5rem + 3vw, 4.5rem) var(--section); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
.hero .text { display: grid; gap: 1.5rem; justify-items: start; }
.hero .app-id { font-weight: 650; font-size: 1.25rem; letter-spacing: -0.01em; }
.hero .app-id img { width: 3rem; height: 3rem; border-radius: 0.75rem; }
.hero .statement { font-size: clamp(2.125rem, 1.4rem + 3.1vw, 3.75rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 0.5rem; }
.quiet { display: inline-flex; align-items: center; min-height: 3rem; font-weight: 600; }
@media (min-width: 60rem) { .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; } }

/* A live slice of Save it: the Goal detail card, rebuilt from the app's own gauge */
.goal {
  background: var(--surface); border-radius: calc(var(--radius) + 0.5rem);
  padding: 1.25rem 1.25rem 1.5rem; display: grid; gap: 1rem;
  width: 100%; max-width: 26rem; justify-self: center; margin: 0;
  box-shadow: 0 1px 2px rgb(18 24 21 / 0.04), 0 12px 32px rgb(18 24 21 / 0.07);
}
.goal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.goal-name { font-weight: 650; font-size: 1.125rem; }
.example { font-size: 0.8125rem; color: var(--soft); background: var(--ground); border-radius: 999px; padding: 0.25rem 0.625rem; }
.gauge { width: 100%; max-width: 16.25rem; height: auto; justify-self: center; overflow: visible; }
.gauge .ticks line { stroke: var(--accent-soft); stroke-width: 2; stroke-linecap: round; }
.gauge .track, .gauge .fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge .track { stroke: var(--accent-soft); }
.gauge .fill { stroke: var(--accent); }
.gauge .mark { fill: var(--soft); font: 600 11px var(--font); }
.gauge .value { fill: var(--ink); font: 650 46px var(--font); letter-spacing: -1.5px; }
.gauge .caption { fill: var(--soft); font: 400 15px var(--font); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin: 0; }
.tiles div { background: var(--ground); border-radius: var(--radius); padding: 0.875rem 1rem; display: grid; gap: 0.125rem; }
.tiles dt { font-size: 0.8125rem; color: var(--soft); order: 2; }
.tiles dd { margin: 0; font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; order: 1; }

/* How it works: three real screens, each with one line of text */
.steps { padding-bottom: var(--section); }
.step-list { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step-list li { display: grid; gap: 0.5rem; align-content: start; counter-increment: step; }
.step-list .screen { width: 100%; max-width: 13rem; margin-bottom: 1rem; }
.step-list h3 { font-size: var(--text-l); }
.step-list h3::before { content: counter(step) ". "; color: var(--soft); }
.step-list p { color: var(--soft); max-width: 22rem; }
@media (min-width: 48rem) { .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } .step-list .screen { max-width: 17rem; } }

/* Who makes it */
.belief { padding-block: var(--section); }
.belief .wrap { display: grid; gap: 2.5rem; }
.belief .eyebrow { font-size: var(--text-m); font-weight: 600; letter-spacing: 0; color: var(--soft); margin-bottom: 1rem; }
.belief .big { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; text-wrap: pretty; }
.promises { display: grid; margin: 0; padding: 0; list-style: none; align-content: start; }
.promises li { display: grid; gap: 0.125rem; padding-block: 1rem; border-top: 1px solid var(--line); color: var(--soft); }
.promises li:last-child { border-bottom: 1px solid var(--line); }
.promises strong { color: var(--ink); font-weight: 600; }
@media (min-width: 60rem) { .belief .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 4rem; } }

/* ==========================================================================
   App band (Home and Apps): each app brings its own colour
   ========================================================================== */
.band { background: linear-gradient(160deg, var(--band-from), var(--band-to)); color: var(--on-band); padding-block: clamp(3.5rem, 3rem + 5vw, 8rem); }
.band a:not(.pill) { color: var(--on-band); }
.band .wrap { display: grid; gap: 2.5rem; }
.band .intro { display: grid; gap: 1.25rem; align-content: end; }
.band .side { display: grid; gap: 2rem; justify-items: start; align-content: end; }
.app-id { display: flex; align-items: center; gap: 1rem; }
.app-id img { width: 4rem; height: 4rem; border-radius: 1rem; }
.band h2 { font-size: clamp(2.5rem, 1.6rem + 4vw, 5rem); letter-spacing: -0.04em; line-height: 1; font-weight: 700; }
.band .tag { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); letter-spacing: -0.02em; font-weight: 600; color: var(--on-band-soft); }
.band .what { font-size: 1.1875rem; max-width: 34rem; }
.band .intro .tag { max-width: 24rem; }
.facts { display: grid; margin: 0; width: 100%; max-width: 40rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.875rem; border-top: 1px solid rgb(255 255 255 / 0.18); }
.facts dt { color: var(--on-band-soft); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
@media (min-width: 60rem) {
  .band .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 4rem; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-intro { padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.page-intro .wrap { display: grid; gap: 1.25rem; justify-items: start; }
.page-intro h1 { font-size: var(--title-l); line-height: 1.05; letter-spacing: -0.035em; }

/* ---------- Apps page ---------- */
.app { scroll-margin-top: 1rem; }
.app-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section); padding-block: var(--section); }
.app-body > * { min-width: 0; }
.status { color: var(--on-band); font-weight: 600; }
.block-title { font-size: var(--title-m); letter-spacing: -0.03em; margin-bottom: 2rem; }

/* Screenshot row: swipe sideways on phones, side by side on wide screens */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(15rem, 66vw); gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0.25rem 0.25rem 2.5rem; margin: 0; list-style: none;
}
.shots li { scroll-snap-align: start; }
.screen {
  aspect-ratio: 9 / 19.5; border-radius: 2.25rem; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(18 24 21 / 0.04), 0 12px 32px rgb(18 24 21 / 0.07);
}
.screen img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 60rem) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; overflow: visible; }
}

.features { display: grid; column-gap: 3rem; margin: 0; padding: 0; list-style: none; }
.features li { border-top: 1px solid var(--line); padding-block: 1.25rem 1.75rem; display: grid; gap: 0.375rem; align-content: start; }
.features h4 { font-size: var(--text-l); }
.features p { color: var(--soft); }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pricing {
  display: grid; gap: 1rem; justify-items: start; max-width: 32rem;
  padding: 2rem 1.75rem; background: var(--surface); border-radius: calc(var(--radius) + 0.5rem);
}
.pricing p { color: var(--soft); }
.pricing .eyebrow { color: var(--soft); font-weight: 600; }
.pricing .price { color: var(--ink); font-size: var(--title-m); font-weight: 700; letter-spacing: -0.035em; line-height: 1; overflow-wrap: anywhere; }
.pricing .price-alt { color: var(--ink); font-size: var(--text-l); font-weight: 600; margin-top: -0.5rem; }

.app-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.app-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.more-apps { padding-block: 0 var(--section); }
.more-apps p { font-size: var(--title-s); font-weight: 600; letter-spacing: -0.02em; color: var(--soft); }

/* ---------- Support ---------- */
.contact { display: grid; gap: 1rem; justify-items: start; padding-bottom: var(--section); }
.contact .address { color: var(--soft); }
.faq { padding-bottom: var(--section); }
.faq-list { max-width: 48rem; background: var(--surface); border-radius: calc(var(--radius) + 0.5rem); padding: 0.5rem 1.5rem; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.75rem; padding-block: 1rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--text-m); line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--ground); color: var(--ink);
  font-weight: 400; font-size: 1.25rem; line-height: 1; transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-bottom: 1.25rem; color: var(--soft); max-width: var(--measure); display: grid; gap: 0.75rem; }

/* ---------- Legal pages ---------- */
.legal { padding-bottom: var(--section); }
.legal .wrap { display: grid; gap: 2rem; }
.meta { color: var(--soft); font-size: var(--text-s); }
/* Draft marker on legal pages: remove before go-live once the texts are reviewed */
.draft-note {
  max-width: var(--measure); padding: 1rem 1.25rem; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--ink); font-weight: 600;
}
.toc { max-width: var(--measure); padding: 1.5rem; background: var(--surface); border-radius: var(--radius); }
.toc h2 { font-size: var(--text-s); color: var(--soft); font-weight: 600; letter-spacing: 0; margin-bottom: 0.5rem; }
.toc ol { margin: 0; padding-left: 1.5rem; }
.toc a { display: inline-block; padding-block: 0.375rem; }
.prose { max-width: var(--measure); display: grid; gap: 1rem; }
.prose h2 { font-size: var(--title-s); margin-top: 2rem; scroll-margin-top: 1rem; }
.prose h3 { font-size: var(--text-m); margin-top: 0.5rem; }
.prose ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.25rem; }
.placeholder-note { color: var(--soft); font-style: italic; }

/* ---------- 404 ---------- */
.not-found { padding-block: clamp(4rem, 3rem + 7vw, 9rem); }
.not-found .wrap { display: grid; gap: 1.5rem; justify-items: start; }
.not-found h1 { font-size: var(--title-l); letter-spacing: -0.035em; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem; color: var(--soft); font-size: var(--text-s); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Motion (only where it explains something) ---------- */
/* The gauge sweeps up to its value once, like in the app. It starts a third full (never
   empty), so link previews and search engines always see a filled gauge. */
@keyframes sweep { from { stroke-dashoffset: 300; } }
.gauge .fill { animation: sweep 1.2s cubic-bezier(0.33, 1, 0.68, 1); }

/* Respect the "reduce motion" setting: everything rests in its final state */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
