/* Tokens from the app (src/theme.ts). Green as text or under white text is the dark one:
   white on #2F9E6B has too little contrast for body sizes */
:root {
  color-scheme: light;
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --text: #1C2321;
  --muted: #5E6662;
  --border: rgba(28, 35, 33, 0.09);
  --primary: #2F9E6B;
  --primary-dark: #237A52;
  --primary-light: #E6F5EE;
  --track: #D0EBD9;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 4px 16px rgba(15, 31, 23, 0.06);
  --shadow-device: 0 24px 48px rgba(15, 31, 23, 0.16);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 20px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.narrow { max-width: 760px; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* Header: the glass of the app's tab bar, solid where blur isn't available */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 247, 0.96);
  border-bottom: 1px solid var(--border);
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(250, 250, 247, 0.78);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
  }
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.brand img { border-radius: 22.5%; box-shadow: 0 1px 4px rgba(15, 31, 23, 0.12); }
.site-nav { position: relative; display: none; gap: 8px; margin-left: auto; }
.nav-pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: 36px;
  border-radius: 999px;
  background: var(--primary-light);
  opacity: 0;
  transition: transform 400ms var(--ease), width 400ms var(--ease), opacity 200ms var(--ease);
  pointer-events: none;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current] { color: var(--primary-dark); }
.site-header .btn { margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease), transform 100ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-tinted { background: var(--primary-light); color: var(--primary-dark); }
.btn-tinted:hover { background: var(--track); color: #1A5C3D; }

/* Hero */
.hero {
  background: radial-gradient(120% 80% at 80% 0%, var(--primary-light) 0%, rgba(230, 245, 238, 0) 62%);
  padding-block: 48px 72px;
  overflow: hidden;
}
.hero-grid { display: grid; gap: 48px; }
.eyebrow {
  margin-bottom: 16px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 600;
}
h1 {
  font-size: clamp(2.5rem, 7.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}
.badge-link {
  display: inline-block;
  margin-top: 28px;
  border-radius: 10px;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.badge-link img { width: 180px; height: 60px; }

.badge-link:active { transform: scale(0.97); }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
}
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .icon { width: 18px; height: 18px; color: var(--primary); stroke-width: 2.5; }
.hero-device { position: relative; display: flex; justify-content: center; }
/* Light behind the device, so it stands in the page instead of on it */
.hero-device::before {
  content: "";
  position: absolute;
  inset: 8% -6% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 158, 107, 0.22), rgba(47, 158, 107, 0));
  filter: blur(24px);
  pointer-events: none;
}
.hero-device .phone { position: relative; }

/* Device: the frame of the store screenshots around a real screen of the app */
.phone {
  --w: clamp(232px, 70vw, 300px);
  width: var(--w);
  padding: calc(var(--w) * 0.02);
  border-radius: calc(var(--w) * 0.15);
  background: var(--text);
  box-shadow: var(--shadow-device);
}
.phone img {
  width: 100%;
  border-radius: calc(var(--w) * 0.13);
  background: var(--bg);
}

/* Sections */
.section { padding-block: 72px; }
.section-tint { background: #F3F7F3; }
.section-title {
  max-width: 20em;
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-lead {
  max-width: 36em;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
}
h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.steps .card, .features .card, .plan { transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }
.feature-icon, .step-num { transition: background-color 250ms var(--ease), color 250ms var(--ease); }

.steps, .features, .plans { display: grid; gap: 16px; margin-top: 40px; }
.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-dark);
}
.feature-icon .icon { width: 22px; height: 22px; }

.split { display: grid; gap: 48px; align-items: center; }
.split-device { display: flex; justify-content: center; }
.checks { display: grid; gap: 20px; margin-top: 32px; }
.checks li { display: flex; gap: 14px; color: var(--muted); }
.checks strong { color: var(--text); font-weight: 600; }
.checks .icon {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  stroke-width: 3;
}

/* Prices: the amount charged is the largest number on a plan */
.plan { padding: 28px 24px; }
.plan-pro { border: 2px solid var(--primary); }
.price { margin-top: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.card .price { color: var(--text); margin-top: 12px; }
.price-num { font-size: 2.5rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.price-unit { font-size: 1.0625rem; color: var(--muted); }
.card .price-note { margin-top: 4px; font-size: 15px; }
.plan-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}
.plan-list li { display: flex; gap: 10px; }
.plan-list .icon { margin-top: 3px; color: var(--primary); stroke-width: 2.5; }
.fineprint { max-width: 46em; margin-top: 24px; color: var(--muted); font-size: 14px; }

/* Questions */
.faq { margin-top: 32px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-block: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary { transition: color 200ms var(--ease); }
.faq summary:hover { color: var(--primary-dark); }
.faq-body { overflow: hidden; }
.faq details p { max-width: 40em; padding-bottom: 20px; color: var(--muted); }

.faq-more { margin-top: 24px; color: var(--muted); }

/* Closing call */
.cta { padding-block: 0 72px; }
.cta-inner {
  padding: 56px 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--primary-dark) 0%, #1F6E4A 100%);
  color: #FFFFFF;
  text-align: center;
}
.cta h2 {
  font-size: clamp(1.75rem, 4.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cta p { margin-top: 12px; font-size: 1.125rem; }
.cta .badge-link { margin-top: 28px; }
.cta .badge-link:focus-visible { outline-color: #FFFFFF; }
/* The badge has its own grey rim, which needs the light ring to stand on green */
.cta .badge-link img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* Footer */
.site-footer {
  padding-block: 32px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-legal { display: grid; gap: 8px; margin-top: 20px; }
.footer-legal p { max-width: 60em; }

/* Legal pages: the texts of the app's legal folder in the look of this site */
.legal { padding-block: 48px 72px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.legal h2 {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.legal h3 { margin-top: 24px; font-size: 1.0625rem; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 22px; list-style: disc; }
.legal li + li { margin-top: 6px; }
.legal .muted { margin-top: 8px; color: var(--muted); }
.legal .links { margin-top: 40px; color: var(--muted); }

/* Motion comes with script.js in two kinds: .motion moves, .calm ("reduce motion") only fades */
.motion, .calm { scroll-behavior: auto; }
.motion [tabindex="-1"]:focus, .calm [tabindex="-1"]:focus { outline: none; }
.motion .site-header, .calm .site-header { border-bottom-color: transparent; }
.motion .site-header.scrolled, .calm .site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(15, 31, 23, 0.06);
}


/* While a question closes it is still [open], the arrow already turns back */
.motion .faq details[open]:not(.is-open) summary::after { transform: translateY(-3px) rotate(45deg); }

.motion .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease), box-shadow 250ms var(--ease);
}
.motion .split-device.reveal, .motion .cta-inner.reveal { transform: translateY(28px) scale(0.97); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .reveal.settled { transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }

.calm .reveal { opacity: 0; transition: opacity 700ms var(--ease), box-shadow 250ms var(--ease); }
.calm .reveal.in { opacity: 1; }
.calm .nav-pill { transition: opacity 250ms var(--ease); }

/* The first screen arrives in the order it is read, the device last */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
.motion .hero-copy > * { animation: rise 700ms var(--ease) both; }
.calm .hero-copy > * { animation: appear 700ms var(--ease) both; }
.motion .hero-copy > :nth-child(2), .calm .hero-copy > :nth-child(2) { animation-delay: 70ms; }
.motion .hero-copy > :nth-child(3), .calm .hero-copy > :nth-child(3) { animation-delay: 140ms; }
.motion .hero-copy > :nth-child(4), .calm .hero-copy > :nth-child(4) { animation-delay: 210ms; }
.motion .hero-copy > :nth-child(5), .calm .hero-copy > :nth-child(5) { animation-delay: 280ms; }
.motion .hero-device .phone { animation: arrive 900ms var(--ease) 180ms both; }
.calm .hero-device .phone { animation: appear 900ms var(--ease) 180ms both; }
.motion .hero-device::before, .calm .hero-device::before { animation: appear 1200ms var(--ease) 300ms both; }

/* Hover only where a pointer hovers, a finger would leave cards stuck in it */
@media (hover: hover) {
  .steps .card:hover, .features .card:hover, .plans .plan:hover { box-shadow: 0 16px 36px rgba(15, 31, 23, 0.10); }
  .features .card:hover .feature-icon, .steps .card:hover .step-num { background: var(--primary); color: #FFFFFF; }
  .badge-link:hover { box-shadow: 0 10px 24px rgba(15, 31, 23, 0.18); }
  .motion .steps .card:hover, .motion .features .card:hover, .motion .plans .plan:hover { transform: translateY(-4px); }
  .motion .badge-link:hover { transform: translateY(-2px); }
  .motion .badge-link:active { transform: scale(0.97); }
}

@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); align-items: start; }
  .card .price-note { min-height: 3em; }
  .section { padding-block: 96px; }
  .cta { padding-bottom: 96px; }
  .cta-inner { padding-block: 72px; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .site-header .btn { margin-left: 0; }
  .hero { padding-block: 72px 96px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 64px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
  .plans { max-width: 820px; }
  .section { padding-block: 112px; }
}

/* Nothing moves or scales for "reduce motion", fades and colours stay */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active, .badge-link:active { transform: none; }
  .faq summary::after { transition: none; }
}

@media print {
  .site-header, .cta, .skip { display: none; }
}
