/* ==========================================================================
   BuffBird — pre-launch site.
   Brand spine from the BuffBird Design System (pistachio → bird green → ink),
   pushed to a high-end register: a near-black stage where the real app
   screens are the product shots, heavy condensed display type taken from the
   app's own headings, mono numerals for every piece of data.
   ========================================================================== */

/* Self-hosted variable fonts: no third-party requests, so no visitor data leaves the site */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrainsmono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrainsmono-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Dark stage */
  --ink-0: #070908;
  --ink-1: #0c100d;
  --ink-2: #131915;
  --app: #0a0d0b;
  --app-card: #1a2029;
  --app-raised: #242c36;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --on-dark: #f2f5ee;
  --on-dark-muted: #a9b6ab;
  --faint: #7d887f;        /* 5.2:1 on the stage */

  /* Brand */
  --green: #8bc34a;        /* app accent, text-safe on dark (9:1) */
  --green-600: #78a64b;    /* button face */
  --green-700: #4d7229;    /* text-safe on paper and pistachio (5.3:1) */
  --green-900: #3e5a22;
  --pistachio: #dceac6;
  --pistachio-pale: #eef4e3;
  --amber: #f0c43c;

  /* Light */
  --paper: #f7f8f4;
  --ink: #171c18;
  --ink-80: #2a332c;
  --muted: #5e6a60;

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --page: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --r-panel: 28px;
  --r-card: 16px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2b332d var(--ink-0);
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--on-dark);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  background: var(--green);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, dl, dd, ol, blockquote, figure {
  margin: 0;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

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

[id] {
  scroll-margin-top: 88px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.honey {
  position: absolute;
  left: -9999px;
}

.nowrap {
  white-space: nowrap;
}

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

.display,
.h-xxl,
.h-xl,
.cond {
  font-family: var(--font-display);
  font-stretch: 72%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

.display {
  font-size: clamp(56px, min(9.2vw, 15.5vh), 148px);
  line-height: 0.88;
}

.display--hero {
  font-size: clamp(46px, min(7.4vw, 12.5vh), 124px);
}

.display .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.display .line > span {
  display: block;
}

.h-xxl {
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.9;
}

.h-xl {
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 0.92;
}

.cond {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead {
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
  color: var(--on-dark-muted);
  max-width: 44ch;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--on-dark-muted);
}

.accent {
  color: var(--green);
}

.amber {
  color: var(--amber);
  font-weight: 600;
}

.muted {
  color: var(--on-dark-muted);
}

.faint {
  color: var(--faint);
  font-size: 12px;
}

.small {
  font-size: 15px;
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.985);
}

/* Dark ink on green, always: 5:1 on the button face */
.btn--green {
  background: var(--green);
  color: var(--ink);
}

.btn--green:hover {
  background: #9bd05c;
  transform: translateY(-1px);
}

.btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* --- Nav ------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(7, 9, 8, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}

.nav.is-hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav__brand img:first-child {
  width: 34px;
}

.nav__wordmark {
  width: 96px;
}

.nav__links {
  display: flex;
  gap: 36px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--on-dark);
}

@media (max-width: 880px) {
  .nav__links {
    display: none;
  }

  .nav__wordmark {
    width: 84px;
  }
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 88px;
  overflow: hidden;
  isolation: isolate;
}

/* The phone screen lights the room: one soft green source behind the device */
.hero__light {
  position: absolute;
  z-index: -1;
  right: -10%;
  top: 8%;
  width: min(1100px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(139, 195, 74, 0.22), rgba(139, 195, 74, 0.06) 55%, transparent 72%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.line--accent {
  color: var(--green);
}

.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.phone {
  position: relative;
  width: min(330px, 72vw);
  aspect-ratio: 940 / 1584;
  padding: 10px;
  border-radius: 48px;
  background: linear-gradient(160deg, #2a302c, #0e110f 45%, #1b201c);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 50px 100px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 38px;
}

.phone--hero {
  transform: rotateY(calc(-14deg + var(--tilt, 0) * 14deg)) rotateX(calc(4deg - var(--tilt, 0) * 4deg));
  transform-style: preserve-3d;
  transition: transform 0.15s linear;
}

.chip-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: var(--r-card);
  background: rgba(19, 25, 21, 0.78);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--on-dark-muted);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}

.chip-card .mono {
  font-size: 21px;
  line-height: 1.2;
}

.chip-card--set {
  left: -16%;
  bottom: 12%;
}

.chip-card--week {
  right: -4%;
  top: 16%;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.ring-mini {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 var(--ring, 1turn), rgba(255, 255, 255, 0.1) 0);
}

.ring-mini::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ink-2);
}

.ring-mini .mono {
  position: relative;
  font-size: 13px;
  color: var(--on-dark);
}

/* Short laptop screens: keep the signup form inside the first viewport */
@media (min-width: 961px) and (max-height: 780px) {
  .hero {
    padding-top: 92px;
    padding-bottom: 48px;
  }

  .hero__copy {
    gap: 22px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 110px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__stage {
    margin-top: 12px;
  }

  .chip-card--set {
    left: 0;
  }

  .chip-card--week {
    right: 0;
  }
}

/* --- Waitlist form --------------------------------------------------------- */

.waitlist {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.waitlist__row {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.waitlist__row:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(139, 195, 74, 0.18);
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--on-dark);
  font-size: 16px;
  caret-color: var(--green);
}

.waitlist input::placeholder {
  color: var(--faint);
}

.waitlist input:focus {
  outline: none;
}

.waitlist__label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-dark);
}

.waitlist__note a,
.footer__links a {
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(242, 245, 238, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}

.waitlist__note a:hover,
.footer__links a:hover {
  color: var(--green);
  text-decoration-color: currentColor;
}

.waitlist__note {
  margin: 12px 0 0 20px;
  font-size: 14px;
  color: var(--faint);
}

.waitlist__error {
  margin: 8px 0 0 20px;
  font-size: 15px;
  color: #ff8a7a;
}

.waitlist__error:empty {
  display: none;
}

.waitlist.is-error .waitlist__row {
  border-color: #ff8a7a;
}

.waitlist.is-loading .waitlist__row {
  opacity: 0.7;
}

.waitlist__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(23, 28, 24, 0.25);
  border-top-color: var(--ink);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.waitlist__success {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--r-card);
  background: rgba(139, 195, 74, 0.08);
  border: 1px solid rgba(139, 195, 74, 0.45);
}

.waitlist__success img {
  width: 44px;
}

.waitlist__success b {
  display: block;
  color: var(--on-dark);
  font-weight: 600;
}

.waitlist__success span {
  font-size: 15px;
  color: var(--on-dark-muted);
}

@media (max-width: 520px) {
  .waitlist__row {
    flex-direction: column;
    border-radius: 24px;
  }

  .waitlist__row .btn {
    width: 100%;
  }
}

/* --- Statement ------------------------------------------------------------- */

.statement {
  padding: clamp(96px, 14vw, 200px) 0;
  border-top: 1px solid var(--line);
}

.statement__text {
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.statement__text .w {
  opacity: var(--o, 0.18);
  transition: opacity 0.15s linear;
}

/* --- Scroll story ---------------------------------------------------------- */

.story {
  position: relative;
  height: 420vh;
  background: var(--ink-1);
  border-top: 1px solid var(--line);
}

.story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
}

.story__phone-col {
  display: grid;
  place-items: center;
  position: relative;
}

.story__phone-col::before {
  content: "";
  position: absolute;
  width: 130%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(139, 195, 74, 0.14), transparent 70%);
  z-index: 0;
}

.phone--story {
  width: min(340px, 30vw, 44vh);
  z-index: 1;
}

.phone--story img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease-out);
}

.phone--story img.is-active {
  opacity: 1;
  transform: none;
}

.story__index {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.story__index li {
  position: relative;
  padding-top: 14px;
  transition: color 0.4s var(--ease);
}

.story__index li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--line-2);
}

.story__index li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--green);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
}

.story__index li.is-active {
  color: var(--on-dark);
}

.story__steps {
  position: relative;
  min-height: 330px;
}

.story__step {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease-out);
  pointer-events: none;
}

.story__step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.story__shot {
  display: none;
  border-radius: 32px;
}

.story__num {
  font-size: 13px;
  color: var(--green);
}

@media (max-width: 860px) {
  .story {
    height: auto;
  }

  .story__sticky {
    position: relative;
    height: auto;
    padding: 96px 0;
  }

  .story__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .story__phone-col {
    display: none;
  }

  .story__index {
    display: none;
  }

  .story__steps {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 72px;
  }

  .story__step {
    position: relative;
    opacity: 1;
    transform: none;
  }

  .story__shot {
    display: block !important;
    width: min(280px, 72vw);
    margin-top: 12px;
    padding: 8px;
    border-radius: 40px;
    background: #1b201c;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
  }
}

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

.light {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.light .lead {
  color: var(--muted);
}

.light .accent {
  color: var(--green-700);
}

/* --- App panel (the interface re-implementations) ------------------------- */

.app-panel {
  border-radius: var(--r-panel);
  background: var(--app);
  color: #fff;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
}

/* --- History (heatmap) ----------------------------------------------------- */

.light:has(.history) {
  padding: clamp(96px, 12vw, 168px) 0;
}

.history {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.history__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* The divider sits above the "Example of stats" caption so it reads as the stats heading */
.history__label {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(23, 28, 24, 0.14);
  color: var(--muted);
}

.history__label + .history__stats {
  margin-top: -14px;
  padding-top: 0;
  border-top: 0;
}

.history__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 16px 40px;
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(23, 28, 24, 0.14);
}

.history__stats dt {
  font-size: 13px;
  color: var(--muted);
}

.history__stats dd {
  margin-top: 6px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  color: var(--green-700);
}

.history__stats small {
  font-size: 16px;
}

.history__panel {
  justify-self: end;
  width: 100%;
  max-width: 520px;
}

.heatmap {
  --cell: clamp(26px, 3.2vw, 44px);
  --gap: clamp(5px, 0.6vw, 8px);
  display: grid;
  justify-content: center;
  gap: 10px;
}

.heatmap__days,
.heatmap__grid {
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  gap: var(--gap);
}

.heatmap__days {
  font-size: 12px;
  color: var(--on-dark-muted);
  text-align: center;
}

.cell {
  position: relative;
  width: var(--cell);
  height: var(--cell);
  border-radius: 6px;
  background: var(--app-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cells are visible by default; only a scripted page stages their entrance */
.js .cell {
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease), background-color 0.3s var(--ease);
  transition-delay: calc(var(--i, 0) * 18ms);
}

.js .is-visible .cell {
  transform: none;
  opacity: 1;
}

.cell--trained {
  background: var(--green-600);
  border-color: transparent;
}

.cell--rest {
  background: #7a6a3a;
  border-color: rgba(240, 196, 60, 0.6);
}

.cell b {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  box-shadow: 0 0 0 2px var(--app);
}

.heatmap__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--on-dark-muted);
}

.heatmap__legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--app-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sw--trained {
  background: var(--green-600);
  border-color: transparent;
}

.sw--rest {
  background: #7a6a3a;
  border-color: rgba(240, 196, 60, 0.6);
}

@media (max-width: 960px) {
  .history {
    grid-template-columns: minmax(0, 1fr);
  }

  .history__panel {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .history__stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Effort ---------------------------------------------------------------- */

.effort {
  padding: clamp(96px, 12vw, 168px) 0;
  background:
    radial-gradient(60% 80% at 0% 100%, rgba(139, 195, 74, 0.08), transparent 60%),
    var(--ink-0);
}

.effort__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.effort__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.effort__tools {
  display: grid;
  gap: 16px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 14px;
}

.chip {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--app-card);
  color: #9ba1a6;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}

.chip:hover {
  background: var(--app-raised);
  color: #fff;
}

.chip:active {
  transform: scale(0.97);
}

.chip.is-on,
.chip.is-on:hover {
  background-color: var(--green);
  background-image: linear-gradient(180deg, #9ccf5f, var(--green-600));
  border-color: transparent;
  color: #13200b;
  font-weight: 600;
}

.rest {
  display: flex;
  align-items: center;
  gap: 24px;
}

.rest__ring {
  position: relative;
  flex-shrink: 0;
  width: 112px;
  height: 112px;
}

.rest__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rest__track,
.rest__arc {
  fill: none;
  stroke-width: 8;
}

.rest__track {
  stroke: rgba(255, 255, 255, 0.1);
}

.rest__arc {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: var(--dash, 0);
}

.rest__count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
}

.rest__title {
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .effort__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .chips {
    grid-template-columns: 1fr 1fr;
  }

  .rest {
    gap: 18px;
  }

  .rest__ring {
    width: 88px;
    height: 88px;
  }

  .rest__count {
    font-size: 22px;
  }
}

/* --- How it works ---------------------------------------------------------- */

.how {
  padding: clamp(96px, 12vw, 168px) 0;
  border-top: 1px solid rgba(23, 28, 24, 0.08);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 80px);
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(23, 28, 24, 0.16);
}

.step__num {
  font-size: 13px;
  color: var(--green-700);
}

.step h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.step p:not(.step__num) {
  color: var(--muted);
}

.strip {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--app);
  color: #9ba1a6;
  font-size: 14px;
}

.strip .cond {
  color: #fff;
  font-size: 19px;
}

.strip .accent {
  color: var(--green);
  font-size: 16px;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Meet Buff ------------------------------------------------------------- */

.buff {
  padding: clamp(96px, 12vw, 168px) 0;
  background: var(--pistachio);
  color: var(--ink);
  color-scheme: light;
}

.buff__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.buff__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.buff__head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.buff__head img {
  width: clamp(84px, 9vw, 120px);
}

.buff .lead {
  color: var(--ink-80);
}

.buff__quote {
  font-size: 19px;
  font-style: italic;
  color: var(--ink-80);
}

.buff__panel {
  justify-self: end;
  width: 100%;
  max-width: 500px;
}

.milestone {
  margin: 18px 0 16px;
  padding: 16px 18px;
  border-radius: var(--r-card);
  border: 1px solid rgba(240, 196, 60, 0.7);
  background: linear-gradient(180deg, rgba(240, 196, 60, 0.08), transparent);
  color: #fff;
}

.badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 8px;
  border-radius: var(--r-card);
  background: var(--app-card);
  text-align: center;
  font-size: 13px;
  color: #9ba1a6;
}

.badge b {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.badge__icon {
  font-size: 28px;
  line-height: 1.2;
  filter: grayscale(1) opacity(0.5);
}

.badge.is-earned {
  background: linear-gradient(180deg, rgba(240, 196, 60, 0.22), rgba(240, 196, 60, 0.06));
  border: 1px solid rgba(240, 196, 60, 0.6);
  color: var(--amber);
}

.badge.is-earned .badge__icon {
  filter: none;
}

@media (max-width: 960px) {
  .buff__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .buff__panel {
    justify-self: stretch;
    max-width: none;
  }
}

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

.faq {
  padding: clamp(96px, 12vw, 168px) 0;
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq details {
  border-bottom: 1px solid rgba(23, 28, 24, 0.14);
}

.faq details:first-child {
  border-top: 1px solid rgba(23, 28, 24, 0.14);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(3px) rotate(-135deg);
}

.faq details p {
  padding: 0 0 26px;
  max-width: 60ch;
  color: var(--muted);
}

@media (max-width: 860px) {
  .faq__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Final ----------------------------------------------------------------- */

.final {
  position: relative;
  padding: clamp(120px, 16vw, 220px) 0;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.final__light {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -40%;
  width: min(1400px, 140vw);
  aspect-ratio: 1.6;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(139, 195, 74, 0.2), rgba(139, 195, 74, 0.05) 60%, transparent 75%);
}

.final__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.final__mark {
  width: 76px;
}

.display--final {
  font-size: clamp(52px, 8.4vw, 132px);
  max-width: 12ch;
}

.final .lead {
  max-width: none;
}

.waitlist--final {
  text-align: left;
  margin-top: 12px;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 120px;
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: start;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 15px;
}

.footer__small {
  grid-column: 1 / -1;
  max-width: none !important;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

.footer img {
  width: 120px;
}

.footer p {
  max-width: 60ch;
  color: var(--on-dark-muted);
  font-size: 15px;
}

.footer__small {
  font-size: 13px !important;
  color: var(--faint) !important;
}

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

.float-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.2);
  translate: -50% 140%;
  opacity: 0;
  visibility: hidden;
  transition: translate 0.5s var(--ease-out), opacity 0.3s var(--ease), background-color 0.2s var(--ease);
}

.float-cta.is-shown {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
}

.float-cta:hover {
  background: #9bd05c;
}

/* --- Legal pages ----------------------------------------------------------- */

.legal__head {
  padding: 168px 0 72px;
  border-bottom: 1px solid var(--line);
}

.legal__head .h-xxl {
  margin-bottom: 24px;
}

.legal__updated {
  margin-top: 28px;
  font-size: 13px;
  color: var(--faint);
}

.legal__body {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: clamp(32px, 6vw, 96px);
  padding-top: 72px;
  padding-bottom: 120px;
}

.legal__toc {
  position: sticky;
  top: 104px;
  align-self: start;
}

.legal__toc ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.legal__toc a {
  color: var(--on-dark-muted);
  text-decoration: none;
}

.legal__toc a:hover {
  color: var(--green);
}

.legal__article section + section {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.legal__article h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.legal__article h3 {
  margin: 28px 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.legal__article p,
.legal__article li,
.legal__article address {
  color: var(--on-dark-muted);
  font-style: normal;
  max-width: 68ch;
}

.legal__article p + p,
.legal__article p + ul,
.legal__article ul + p,
.legal__article address + p,
.legal__article p + address {
  margin-top: 16px;
}

.legal__article ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.legal__article strong {
  color: var(--on-dark);
  font-weight: 600;
}

.legal__article address {
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--ink-2);
  border: 1px solid var(--line);
  line-height: 1.7;
}

.legal__article a {
  color: var(--green);
  text-underline-offset: 3px;
}

.legal__table {
  overflow-x: auto;
  margin: 8px 0 20px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
}

.legal__table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.legal__table th,
.legal__table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal__table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  background: var(--ink-2);
}

.legal__table tr:last-child td {
  border-bottom: 0;
}

.legal__table td {
  color: var(--on-dark-muted);
}

/* Phones: the purpose table becomes stacked cards instead of scrolling sideways */
@media (max-width: 600px) {
  .legal__table {
    overflow: visible;
    border: 0;
  }

  .legal__table table {
    min-width: 0;
  }

  .legal__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .legal__table tr {
    display: block;
    margin-bottom: 12px;
    padding: 6px 0;
    border-radius: var(--r-card);
    border: 1px solid var(--line);
    background: var(--ink-2);
  }

  .legal__table td {
    display: block;
    padding: 8px 16px;
    border: 0;
  }

  .legal__table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
  }
}

@media (max-width: 860px) {
  .legal__body {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 48px;
  }

  .legal__toc {
    position: static;
  }

  .legal__head {
    padding-top: 128px;
  }
}

/* --- 404 ------------------------------------------------------------------- */

.notfound {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.notfound__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.notfound .nav__brand {
  margin-bottom: 24px;
}

.notfound__code {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--green);
}

/* --- Motion ---------------------------------------------------------------- */

.js .display .line > span {
  transform: translateY(105%);
  transition: transform 1.1s var(--ease-out);
}

.js .is-loaded .display .line > span {
  transform: none;
}

.js .is-loaded .display .line + .line > span {
  transition-delay: 0.12s;
}

.js .hero__copy > :not(h1),
.js .hero__stage {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out);
}

.js .is-loaded .hero__copy > :not(h1) {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}

.js .is-loaded .hero__stage {
  opacity: 1;
  transform: none;
  transition-delay: 0.2s;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s var(--ease), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.d-1 {
  --d: 100ms;
}

.d-2 {
  --d: 200ms;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .js .display .line > span,
  .js .hero__copy > :not(h1),
  .js .hero__stage,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .phone--hero {
    transform: none;
  }

  .cell {
    opacity: 1;
    transform: none;
  }

  .statement__text .w {
    opacity: 1;
  }
}
