:root {
  /* Breeze colors — see docs/DESIGN.md */
  --ink: #264F3B;
  --ink-soft: #2E6345;
  --muted: #637D6E;
  --accent: #57AB73;
  --accent-deep: #42A166;
  --mint: #A1DBBA;
  --hairline: #E6F0E8;
  --control-stroke: rgba(0, 0, 0, 0.06);
  --wash: #F7FAF8;
  --sans: "Avenir Next", "Nunito Sans", -apple-system, system-ui, sans-serif;
  --condensed: "Avenir Next Condensed", "Barlow Condensed", "Avenir Next", sans-serif;
  --k: 2.2; /* hero knob scale, set by script */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- Glass buy button ---------- */
.glass-buy {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 13px 0 30px; border-radius: 22px;
  text-decoration: none; color: var(--ink);
  font-family: var(--sans); font-weight: 600; font-size: 19px; letter-spacing: 0.1px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,252,248,0.92) 48%, rgba(232,246,237,0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(87, 171, 115, 0.22),
    0 14px 34px -10px rgba(66, 161, 102, 0.55),
    0 4px 10px -4px rgba(38, 79, 59, 0.12),
    inset 0 1px 0 #fff,
    inset 0 -8px 16px rgba(87, 171, 115, 0.12);
  transition: transform 0.2s cubic-bezier(.3,1.4,.5,1), box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.glass-buy::before { /* glassy top reflection */
  content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 48%;
  border-radius: 16px 16px 40% 40% / 16px 16px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0));
  z-index: -1; pointer-events: none;
}
.glass-buy .sheen { /* light sweeping across now and then */
  position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,0.9), rgba(255,255,255,0));
  transform: skewX(-18deg) translateX(-120%);
  animation: sweep 5.5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%, 70% { transform: skewX(-18deg) translateX(-120%); }
  100% { transform: skewX(-18deg) translateX(620%); }
}
.glass-buy .price {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 14px;
  background: linear-gradient(180deg, #74C48F, #4BA56B);
  color: #fff; font-weight: 600; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 2px 6px -2px rgba(38, 110, 66, 0.5);
}
.glass-buy:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow:
    0 0 0 1px rgba(87, 171, 115, 0.3),
    0 18px 42px -10px rgba(66, 161, 102, 0.65),
    0 4px 10px -4px rgba(38, 79, 59, 0.12),
    inset 0 1px 0 #fff,
    inset 0 -8px 16px rgba(87, 171, 115, 0.14);
}
.glass-buy:active { transform: scale(0.985); }
.once { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- Knob (the app's toggle, larger and glassier) ---------- */
.toggle {
  position: relative; display: block; width: 120px; height: 58px;
  border: 0; padding: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.track {
  position: absolute; inset: 0; border-radius: 29px; overflow: hidden;
  background: linear-gradient(#E3EDE6, #CFDFD5);
  border: 1px solid rgba(176, 201, 185, 0.8);
  box-shadow: inset 0 2px 5px rgba(38, 79, 59, 0.10), 0 1px 2px rgba(26, 69, 46, 0.06);
  transition: border-color 0.3s;
}
.track::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#94D6AB, #42A166); opacity: 0; transition: opacity 0.3s ease; }
.track::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 1.5px; height: 46%; border-radius: 28px 28px 14px 14px;
  background: linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.04));
}
.on .track { border-color: rgba(56, 143, 87, 0.45); }
.on .track::before { opacity: 1; }
.knob {
  position: absolute; top: 4.5px; left: 4.5px; width: 49px; height: 49px; border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #fff 0%, #FDFEFD 45%, #EEF6F1 100%);
  border: 0.6px solid rgba(135, 171, 148, 0.25);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0,0,0,0.08), inset 0 -2px 4px rgba(87, 171, 115, 0.08);
  transition: transform 0.45s cubic-bezier(.34, 1.4, .5, 1), box-shadow 0.3s;
}
.knob::after { content: ""; position: absolute; left: 12px; top: 3px; width: 25px; height: 11px; border-radius: 7px; background: rgba(255,255,255,0.95); filter: blur(2px); }
.on .knob { transform: translateX(62px); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0,0,0,0.08); }
.toggle.pressed .knob { transform: scaleX(1.06); }
.on .toggle.pressed .knob { transform: translateX(62px) scaleX(1.06); }

/* Tiny white glints around the top of the knob */
.spark {
  position: absolute; pointer-events: none; opacity: 0; z-index: 1;
  background: #fff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 0.8px rgba(56, 133, 87, 0.9));
  animation: blink var(--period) ease-in-out infinite; animation-delay: var(--delay);
}
@keyframes blink {
  0%, 84% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  90% { opacity: 1; transform: scale(1) rotate(12deg); }
  100% { opacity: 0; transform: scale(0.4) rotate(20deg); }
}

/* ---------- Stage ---------- */
.stage { position: relative; height: 330vh; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.halo {
  position: absolute; left: 50%; top: 50%; width: 900px; height: 600px; margin: -300px 0 0 -450px;
  background: radial-gradient(closest-side, rgba(161, 219, 186, 0.38), rgba(161, 219, 186, 0.10) 55%, rgba(255,255,255,0) 100%);
  pointer-events: none; animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.75; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }

.knob-wrap {
  position: absolute; left: 50%; top: 50%; width: 120px; height: 58px; margin: -29px 0 0 -60px;
  transform: scale(var(--k)); transform-origin: 50% 50%;
}
.above, .below { position: absolute; left: 0; right: 0; text-align: center; padding: 0 20px; }
.above { bottom: calc(50% + 29px * var(--k) + 30px); }
.below { top: calc(50% + 29px * var(--k) + 34px); }
.wordmark {
  margin: 0; font-family: var(--condensed); font-weight: 500;
  font-size: clamp(54px, 8vw, 84px); line-height: 1; letter-spacing: -1px; color: var(--ink-soft);
  text-shadow: 2px 0.5px 0 var(--mint), 0 0 28px rgba(87, 171, 115, 0.35), 0 0 60px rgba(161, 219, 186, 0.55);
}
.line { margin: 0 auto 26px; max-width: 430px; font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.5; color: var(--muted); font-weight: 500; }
.hint {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  color: var(--muted); opacity: 0.7; animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }

.green {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(#8FD3A7, #3F9E63);
  display: grid; place-items: center;
}
.green-copy { text-align: center; color: #fff; opacity: 0; padding: 0 20px; }
.green-copy .t { font-weight: 500; font-size: clamp(40px, 7vw, 76px); letter-spacing: -1px; text-shadow: 0 2px 20px rgba(20, 70, 40, 0.18); }
.green-copy .s { margin-top: 6px; font-size: clamp(18px, 2.2vw, 24px); opacity: 0.92; }

/* ---------- The sheet: the rest of the site ---------- */
.sheet {
  position: relative; z-index: 2; margin-top: -45vh;
  background: #fff; border-radius: 34px 34px 0 0;
  box-shadow: 0 -20px 60px -20px rgba(20, 70, 40, 0.35);
}
.features { padding: 90px 20px 30px; }
.wrap { max-width: 1080px; margin: 0 auto; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
h2 { margin: 8px 0 0; font-weight: 500; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.6px; line-height: 1.1; }
.lede { margin: 12px 0 0; max-width: 560px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.card { padding: 22px; border-radius: 18px; background: var(--wash); border: 0.5px solid var(--hairline); }
.card .icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; border: 1px solid var(--control-stroke); color: var(--accent); }
.card h3 { margin: 16px 0 0; font-weight: 600; font-size: 17px; }
.card p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 110px; }
.showcase.flip .text { order: 2; }
.shot { border-radius: 14px; overflow: hidden; border: 0.5px solid rgba(0,0,0,0.12); box-shadow: 0 30px 70px -30px rgba(28, 70, 46, 0.35), 0 2px 10px rgba(0,0,0,0.04); background: #fff; }
.popup-shot { max-width: 344px; justify-self: center; border-radius: 16px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.cta { text-align: center; padding: 140px 20px 120px; }
.cta .app-icon { width: 96px; height: 96px; margin: 0 auto 22px; }
.cta .points { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 30px; font-size: 14px; color: var(--muted); }
.cta .points span::before { content: "✓"; color: var(--accent); margin-right: 6px; font-weight: 600; }
footer { border-top: 0.5px solid var(--hairline); padding: 26px 20px 40px; font-size: 13px; color: var(--muted); text-align: center; }
footer a { text-decoration: none; color: var(--ink); }
footer a:hover { text-decoration: underline; }

/* ---------- Thank-you and notice pages ---------- */
.thanks-main {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.thanks-main > * { position: relative; }
.thanks-main .halo { position: absolute; }
.thanks-knob { width: 120px; height: 58px; transform: scale(1.5); margin: 10px 0 38px; }
.thanks-knob .toggle { cursor: default; }
.thanks-main h1 { margin: 0; font-weight: 600; font-size: clamp(36px, 6vw, 52px); letter-spacing: -0.8px; }
.thanks-main .line { margin: 10px auto 28px; }
.glass-buy.is-waiting { opacity: 0.55; pointer-events: none; }
.steps { margin: 44px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; text-align: left; font-size: 15px; color: var(--muted); }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: center; }
.steps li::before {
  content: counter(step); flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--wash); border: 1px solid var(--hairline);
}
.once a { color: var(--ink); }
body.simple { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--wash); }
.simple-card { max-width: 440px; text-align: center; background: #fff; border: 0.5px solid var(--hairline); border-radius: 20px; padding: 36px 28px; }
.simple-mark { font-family: var(--condensed); font-weight: 500; font-size: 30px; color: var(--ink-soft); }
.simple-card h1 { margin: 18px 0 0; font-size: 22px; font-weight: 600; }
.simple-card p { margin: 8px 0 22px; color: var(--muted); line-height: 1.5; }
.simple-card .back { color: var(--accent); font-weight: 600; text-decoration: none; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .showcase, .showcase.flip { grid-template-columns: 1fr; gap: 28px; margin-top: 80px; }
  .showcase.flip .text { order: 0; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .glass-buy { height: 54px; font-size: 17px; padding-left: 24px; }
  .line { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .spark, .halo, .hint, .glass-buy .sheen { animation: none; }
}
