:root {
  --ink: #061510;
  --ink-soft: #0c241c;
  --moss: #1f4d3a;
  --fern: #2f6b52;
  --mist: #d7ebe0;
  --paper: #eef6f1;
  --pulse: #ff5a3d;
  --pulse-soft: #ff8a72;
  --glow: rgba(47, 107, 82, 0.45);
  --text: #e8f4ed;
  --muted: rgba(232, 244, 237, 0.68);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 107, 82, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 90, 61, 0.12), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 42%, #0a1c16 100%);
  font-family: var(--sans);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--pulse);
  color: #fff;
  border-radius: 0.4rem;
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(6, 21, 16, 0.72);
  border-bottom: 1px solid rgba(215, 235, 224, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: block;
  border-radius: 0.42rem;
  box-shadow: 0 0 0 1px rgba(215, 235, 224, 0.12);
}

.logo-text span,
.logo > span:not(.logo-text) {
  color: var(--pulse-soft);
}

.footer-inner .logo {
  display: inline-flex;
}

.nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.install-btn {
  border: 1px solid rgba(215, 235, 224, 0.28);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.install-btn:hover {
  border-color: var(--pulse-soft);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  padding: clamp(2.5rem, 8vh, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vh, 5.5rem);
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  right: -8%;
  top: 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, rgba(255, 90, 61, 0.28), transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(47, 107, 82, 0.5), transparent 60%);
  filter: blur(8px);
  animation: breathe 7s ease-in-out infinite;
}

.hrv-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  width: 100%;
  height: clamp(120px, 22vh, 220px);
  color: rgba(255, 90, 61, 0.55);
  opacity: 0.9;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.brand-mark {
  margin: 0 0 1rem;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
  background: linear-gradient(120deg, #fff 10%, var(--mist) 45%, var(--pulse-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandIn 1.1s var(--ease) both;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 4.6vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  animation: rise 1s 0.12s var(--ease) both;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 30ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  animation: rise 1s 0.22s var(--ease) both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 1s 0.32s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pulse), #ff734f);
  color: #1a0a07;
}

.btn-ghost {
  border-color: rgba(215, 235, 224, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(215, 235, 224, 0.5);
}

.section {
  padding: clamp(4rem, 12vh, 7.5rem) clamp(1.25rem, 4vw, 3rem);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--pulse-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 2.5rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.guide {
  background:
    linear-gradient(180deg, transparent, rgba(15, 42, 32, 0.55) 20%, rgba(15, 42, 32, 0.55) 80%, transparent);
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.guide-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(215, 235, 224, 0.12);
}

.step-index {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fern);
  padding-top: 0.35rem;
}

.guide-steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.guide-steps p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.recover {
  position: relative;
}

.topic-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
}

.topic {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(215, 235, 224, 0.14);
}

.topic h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.topic p {
  margin: 0;
  color: var(--muted);
}

.app {
  background:
    radial-gradient(700px 360px at 85% 20%, rgba(255, 90, 61, 0.14), transparent 60%),
    linear-gradient(180deg, transparent, rgba(8, 28, 21, 0.8));
}

.app-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.app-points {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
}

.app-points li {
  position: relative;
  padding-left: 1.15rem;
}

.app-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 0 0 rgba(255, 90, 61, 0.55);
  animation: ping 2.4s ease-out infinite;
}

.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 34rem;
}

.waitlist input {
  flex: 1 1 14rem;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 235, 224, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  outline: none;
}

.waitlist input::placeholder {
  color: rgba(232, 244, 237, 0.45);
}

.waitlist input:focus {
  border-color: rgba(255, 138, 114, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 90, 61, 0.18);
}

.form-note {
  min-height: 1.4em;
  margin: 0.75rem 0 0;
  color: var(--mist);
  font-size: 0.92rem;
}

.app-panel {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(100%, 280px);
  border-radius: 2rem;
  padding: 0.7rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(215, 235, 224, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: floatY 5.5s ease-in-out infinite;
}

.phone-notch {
  width: 38%;
  height: 0.55rem;
  margin: 0.2rem auto 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
}

.phone-screen {
  border-radius: 1.4rem;
  padding: 1.4rem 1.2rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(31, 77, 58, 0.55), rgba(6, 21, 16, 0.92));
  min-height: 360px;
}

.phone-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.phone-score {
  margin: 0.4rem 0 0;
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--pulse-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.phone-sub {
  margin: 0.35rem 0 1.6rem;
  color: var(--mist);
  font-size: 0.95rem;
}

.phone-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 0.4rem;
  height: 8rem;
}

.phone-bars span {
  display: block;
  height: var(--h);
  border-radius: 999px 999px 0.3rem 0.3rem;
  background: linear-gradient(180deg, var(--pulse-soft), var(--fern));
  transform-origin: bottom;
  animation: barRise 1.4s var(--ease) both;
}

.phone-bars span:nth-child(2) { animation-delay: 0.05s; }
.phone-bars span:nth-child(3) { animation-delay: 0.1s; }
.phone-bars span:nth-child(4) { animation-delay: 0.15s; }
.phone-bars span:nth-child(5) { animation-delay: 0.2s; }
.phone-bars span:nth-child(6) { animation-delay: 0.25s; }
.phone-bars span:nth-child(7) { animation-delay: 0.3s; }

.site-footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid rgba(215, 235, 224, 0.1);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-inner p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.copy {
  font-size: 0.85rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes barRise {
  from { transform: scaleY(0.2); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 61, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(255, 90, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 61, 0); }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-panel {
    order: -1;
  }

  .topic-rail {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
