/* styles.css — the one stylesheet for timepact.app.
 *
 * Tokens mirror the app itself (design/components/theme.jsx and
 * shared/.../TimePactColors.kt): warm cream paper, deep forest "seal"
 * green, clay for spend accents, Newsreader for headlines and Inter
 * Tight for everything else. Light and dark follow the visitor's
 * system preference; the green band and the CTA keep the constant
 * brand green in both modes. No JavaScript anywhere on the site —
 * the FAQ runs on <details>, everything else is plain flow.
 */

:root {
  --bg: #F7F4ED;
  --bg-soft: #F3F0E9;
  --card: #FFFDF7;
  --card-alt: #F9F6EE;
  --line: rgba(20, 24, 26, 0.08);
  --line-2: rgba(20, 24, 26, 0.16);
  --text: #2A2A26;
  --muted: #55544C;
  --faint: rgba(42, 42, 38, 0.45);
  --seal: #197037;           /* constant brand green (buttons, band) */
  --seal-deep: #145C2E;
  --accent: #197037;         /* readable green for text/links per mode */
  --green-tint: rgba(58, 120, 74, 0.10);
  --clay: #A34D00;
  --on-seal: #F7F4ED;
  --band-sub: #DCE7D8;
  --shadow: 0 24px 60px -30px rgba(20, 24, 26, 0.35);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter Tight", -apple-system, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181A;
    --bg-soft: #0E110F;
    --card: #1A1F22;
    --card-alt: #1F2528;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.15);
    --text: rgba(255, 255, 255, 0.95);
    --muted: rgba(255, 255, 255, 0.62);
    --faint: rgba(255, 255, 255, 0.40);
    --accent: #8EC899;
    --green-tint: rgba(148, 196, 140, 0.14);
    --clay: #E3A072;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- fonts (self-hosted, see build.mjs FONTS) ---------- */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--text); }

::selection { background: var(--green-tint); }

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

.wrap {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  padding: 10px 16px;
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- header / footer ---------- */

.site-head { border-bottom: 1px solid var(--line); }

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { border-radius: 8px; }

.head-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.head-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.head-nav a:hover { color: var(--text); }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding-block: 40px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.foot-nav { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }
.foot-line { margin-bottom: 6px; }
.fine { color: var(--faint); font-size: 0.85rem; margin: 0; }

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

.cta {
  display: inline-block;
  background: var(--seal);
  color: var(--on-seal);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 120ms ease;
}
a.cta:hover { background: var(--seal-deep); color: var(--on-seal); }

.cta-soon {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-2);
  font-weight: 500;
  cursor: default;
}

/* ---------- hero ---------- */

.hero { padding-block: 72px 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  margin-bottom: 0.35em;
}

.hero .sub {
  font-size: 1.3rem;
  color: var(--muted);
  max-width: 26em;
  margin-bottom: 1.6em;
}

.price-line {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 14px;
}

.hero-phone { justify-self: center; }

/* ---------- phone frame ---------- */

.phone {
  width: min(300px, 78vw);
  aspect-ratio: 822 / 1720;
  border: 1px solid var(--line-2);
  border-radius: 38px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.phone-sm { width: min(260px, 72vw); }

/* Per-screenshot crop nudges (the same job srcY does in the Play-panel
 * pipeline): pull vertically-centered UI into the visible band. */
.crop-overlay img { object-position: 0 56%; }
.crop-ring img { object-position: 0 44%; }

/* ---------- calm strip ---------- */

.calm-strip {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: 18px;
}
.calm-strip .wrap {
  display: flex;
  justify-content: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---------- sections ---------- */

.section { padding-block: 80px 0; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.section-intro { color: var(--muted); max-width: 42em; }

/* ---------- how it works ---------- */

.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 26px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step .num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--accent);
}

.step h3 { font-size: 1.35rem; margin-bottom: 0.2em; }
.step p { color: var(--muted); font-size: 0.98rem; }

.step .phone {
  width: 100%;
  margin-top: auto;
  border-radius: 26px 26px 0 0;
  border-bottom: 0;
  box-shadow: none;
  aspect-ratio: 822 / 980;
}

/* ---------- feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
  margin-top: 40px;
}
.feature .phone { justify-self: center; }
.feature p { color: var(--muted); max-width: 36em; }

/* ---------- green band ---------- */

.band {
  background: var(--seal);
  color: var(--on-seal);
  margin-top: 80px;
  padding-block: 72px;
}
.band .eyebrow { color: var(--band-sub); }
.band h2 { color: var(--on-seal); font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.band p { color: var(--band-sub); max-width: 36em; }
.band-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}
.band .phone {
  border-color: rgba(247, 244, 237, 0.35);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.5);
}

/* ---------- privacy ---------- */

.privacy-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 20px;
}
.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  font-weight: 500;
  text-align: center;
}

/* ---------- pricing ---------- */

.pricing-card {
  max-width: 560px;
  margin: 40px auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 44px 40px;
  text-align: center;
}
.price-big {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  line-height: 1.05;
}
.price-after { color: var(--muted); margin: 6px 0 22px; }
.price-points {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  color: var(--muted);
}
.price-points li { padding-block: 4px; }
.pricing-card .fine { margin-top: 18px; }

/* ---------- FAQ ---------- */

.faq { max-width: 720px; }

.faq details { border-bottom: 1px solid var(--line-2); }

.faq summary {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 150ms ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 22px; max-width: 40em; }

/* ---------- close ---------- */

.close-sec {
  text-align: center;
  padding-block: 104px 8px;
}
.close-sec h2 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); }
.close-sec p { color: var(--muted); margin-bottom: 1.8em; }

/* ---------- prose (markdown pages + simple pages) ---------- */

.prose {
  max-width: 700px;
  padding-block: 56px 0;
}
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 0.6em; }
.prose h2 { font-size: 1.45rem; margin: 2.2em 0 0.5em; }
.prose li { margin-block: 6px; }
.prose p, .prose li { line-height: 1.7; }
.prose strong { font-weight: 600; }

/* ---------- press kit ---------- */

.press-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 28px;
  margin: 28px 0 8px;
}
.press-facts dt { font-weight: 600; }
.press-facts dd { margin: 0; color: var(--muted); }

.press-assets {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.press-assets img {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--card);
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 10px;
}
.press-assets li { font-size: 0.9rem; color: var(--muted); }
.press-assets li > a:first-child { display: block; margin-bottom: 8px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding-block: 48px 40px; }
  .hero-grid, .band-grid, .feature { grid-template-columns: 1fr; gap: 40px; }
  .hero-phone, .feature .phone, .band .phone { justify-self: center; }
  .steps { grid-template-columns: 1fr; }
  .step { padding-bottom: 0; }
  .step .phone { aspect-ratio: 822 / 760; }
  .privacy-cards { grid-template-columns: repeat(2, 1fr); }
  .press-assets { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 60px 0; }
  .head-nav { gap: 16px; }
}
