@font-face {
  font-family: Brunson;
  src: url('./assets/Brunson.ttf') format('truetype');
  font-display: swap;
}

:root {
  --ink: #1c2a21;
  --ink-soft: #55615a;
  --green: #6b8f6b;
  --sage: #a1b5a0;
  --sage-tint: #eef2ed;
  --pink: #ddbbd8;
  --pink-tint: #f7eef5;
  --paper: #ffffff;
  --mist: #f6f5f2;
  --line: rgba(28, 42, 33, .12);
  --device: #5fc6bd;
  --device-deep: #46aaa1;
  --wrap: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 56px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -80px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Type ---------- */

h1, h2, .display {
  font-family: Brunson, Impact, 'Arial Narrow', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: .01em;
  margin: 0;
}
h1 { font-size: clamp(3.6rem, 11vw, 8rem); }
h2 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h3 { font-size: 1.18rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin: 0; }

.eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; color: var(--ink-soft); letter-spacing: -.01em; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: .88rem;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current='page'] { color: var(--ink); background: var(--mist); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s;
}
.button:hover { background: #2c3f33; }
.button:active { transform: scale(.97); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { background: var(--mist); }
.link { color: var(--green); text-decoration: none; font-weight: 500; }
.link::after { content: ' \203A'; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

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

.hero { padding: clamp(56px, 9vw, 104px) 0 0; text-align: center; }
.hero .lead { max-width: 560px; margin: 26px auto 0; }
.hero .actions { justify-content: center; margin-top: 30px; }
.hero-photo {
  display: block;
  margin: clamp(44px, 7vw, 76px) auto 0;
  border-radius: 28px;
  overflow: hidden;
  background: #fbeee4;
}
.hero-photo img { width: 100%; height: auto; }

/* ---------- Sections ---------- */

.section { padding: clamp(84px, 12vw, 150px) 0; }
.section.tint { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 68px); }
.section-head .lead { margin-top: 20px; }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.figure { padding: 34px 24px 0 0; }
.figure + .figure { padding-left: 28px; border-left: 1px solid var(--line); }
.figure .display { font-size: clamp(3rem, 8vw, 5.6rem); }
.figure .display small { font-size: .42em; margin-left: .12em; color: var(--green); }
.figure p { margin-top: 12px; color: var(--ink-soft); max-width: 240px; }

/* ---------- Device demo ---------- */

.how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 84px); align-items: start; }
.demo {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--paper);
  border-radius: 28px;
  padding: 36px 24px 28px;
  text-align: center;
}
.section:not(.tint) .demo { background: var(--mist); }
.device { width: min(200px, 56%); margin: 0 auto; overflow: visible; }
.device .body, .device .cap { fill: var(--device); transition: fill .5s var(--ease); }
.device .ring { stroke: var(--device); transition: stroke .5s var(--ease); }
.device .shade { fill: var(--device-deep); transition: fill .5s var(--ease); }
.device .top { transition: transform .7s var(--ease); }
.device .led { fill: #fff6d6; }
.device .glow { fill: #ffe9a3; opacity: 0; }
.device .sparks path { stroke: var(--green); stroke-width: 7; stroke-linecap: round; fill: none; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .35s var(--ease), transform .5s var(--ease); }
.demo.on .device .top { transform: translateY(-46px); }
.demo.on .device .sparks path { opacity: 1; transform: none; }
.demo.on .device .sparks { animation: buzz 1.1s ease-in-out infinite; }
.demo.on .device .glow { animation: flash 1.1s ease-in-out infinite; }
@keyframes flash { 0%, 100% { opacity: 0; } 50% { opacity: .95; } }
@keyframes buzz { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.demo-status { margin-top: 22px; font-size: .92rem; color: var(--ink-soft); min-height: 1.5em; }
.demo .button { margin-top: 14px; min-width: 190px; }
.swatches { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.swatch {
  width: 30px; height: 30px; padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(28, 42, 33, .14);
  background: var(--c);
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px transparent;
  transition: box-shadow .25s;
}
.section:not(.tint) .swatch { box-shadow: 0 0 0 3px var(--mist), 0 0 0 4px transparent; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.section:not(.tint) .swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--mist), 0 0 0 5px var(--ink); }
.swatch-name { margin-top: 12px; font-size: .85rem; color: var(--ink-soft); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 0 8px; padding: 30px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: Brunson, Impact, sans-serif; font-size: 2.2rem; line-height: 1; color: var(--sage); }
.steps h3 { font-size: 1.3rem; }
.steps p { margin-top: 8px; color: var(--ink-soft); grid-column: 2; }

/* ---------- Included ---------- */

.included { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 84px); align-items: start; }
.price { font-size: clamp(6rem, 17vw, 12rem); color: var(--pink); line-height: .85; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows span { color: var(--ink-soft); }

/* ---------- Panel ---------- */

.panel {
  background: var(--pink-tint);
  border-radius: 32px;
  padding: clamp(44px, 8vw, 96px) clamp(26px, 6vw, 80px);
  text-align: center;
}
.panel.sage { background: var(--sage-tint); }
.panel .lead { max-width: 520px; margin: 22px auto 30px; }
.panel .actions { justify-content: center; }

/* ---------- Guide ---------- */

.guide-hero { padding: clamp(52px, 9vw, 110px) 0 clamp(44px, 6vw, 72px); }
.guide-hero .lead { max-width: 560px; margin-top: 24px; }
.guide-hero .actions { margin-top: 30px; }

.chapters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.chapters ul { list-style: none; margin: 0 auto; padding: 9px 24px; max-width: var(--wrap); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chapters ul::-webkit-scrollbar { display: none; }
.chapters a {
  display: block;
  white-space: nowrap;
  font-size: .88rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.chapters a:hover { color: var(--ink); }
.chapters a.active { background: var(--ink); color: #fff; }

.chapter { padding: clamp(72px, 10vw, 128px) 0; scroll-margin-top: calc(var(--header-h) + 48px); }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter-num { font-family: Brunson, Impact, sans-serif; font-size: 1.5rem; line-height: 1; color: var(--sage); display: block; margin-bottom: 14px; }
.chapter-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.chapter-head .lead { margin-top: 18px; }

.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); }
.tip { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.tip p { margin-top: 8px; color: var(--ink-soft); }

.note { margin-top: 36px; background: var(--sage-tint); border-radius: 22px; padding: 26px 28px; }
.note h3 { margin-bottom: 10px; }
.note ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.note li + li { margin-top: 6px; }
.section.tint .note, .chapter.tint .note { background: var(--paper); }

.moments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.moment { background: var(--mist); border-radius: 24px; padding: 30px 28px 32px; }
.moment.strong { background: var(--ink); color: #fff; }
.moment .when { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); display: block; margin-bottom: 10px; }
.moment.strong .when { color: var(--sage); }
.moment h3 { font-size: 1.4rem; margin-bottom: 16px; }
.moment ol { margin: 0; padding: 0; list-style: none; counter-reset: m; }
.moment li { counter-increment: m; position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.moment li::before { content: counter(m); position: absolute; left: 0; top: 12px; font-weight: 600; color: var(--ink); }
.moment li strong { color: var(--ink); font-weight: 600; }
.moment.strong li { border-top-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .74); }
.moment.strong li::before, .moment.strong li strong { color: #fff; }

.help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.help a { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px; transition: border-color .25s, transform .25s var(--ease); }
.help a:hover { border-color: var(--ink); }
.help a:active { transform: scale(.985); }
.help .display { font-size: 2.6rem; display: block; margin: 6px 0 6px; color: var(--ink); }
.help span { color: var(--ink-soft); font-size: .92rem; }

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

.footer { border-top: 1px solid var(--line); padding: 44px 0 52px; font-size: .85rem; color: var(--ink-soft); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer .brand img { height: 30px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer .fine { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 760px; }
.footer .fine + .fine { border: 0; margin-top: 10px; padding-top: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  body { font-size: 16.5px; }
  .how, .included { grid-template-columns: 1fr; }
  .demo { position: static; }
  .tips, .moments, .help { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr; }
  .figure, .figure + .figure { padding: 26px 0; border-left: 0; }
  .figure + .figure { border-top: 1px solid var(--line); }
  .figure { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; }
  .figure p { margin-top: 0; }
  .hero-photo { border-radius: 22px; }
  .rows li { grid-template-columns: 1fr; gap: 4px; }
  .steps li { grid-template-columns: 52px 1fr; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 20px; }
  .chapters ul { padding-left: 20px; padding-right: 20px; }
  .nav-links a { padding: 7px 10px; }
  .actions .button { width: 100%; }
  .panel { border-radius: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .demo.on .device .glow { opacity: .9; }
}
