/* Robb Health v2 — base: tokens, nav, hero, marquee, buttons */
:root {
  --ink: #0e1f16;
  --ink-2: #16291e;
  --paper: #f6f8f3;
  --card: #ffffff;
  --green: #2d7a2d;
  --green-deep: #1a5c1a;
  --mint: #cfe8cf;
  --mint-soft: #e8f1e6;
  --text-dim: #5c6b5e;
  --text-on-dark: rgba(246, 248, 243, 0.92);
  --dim-on-dark: rgba(246, 248, 243, 0.55);
  --hair-dark: rgba(246, 248, 243, 0.14);
  --hair-light: #dde6dc;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Schibsted Grotesk", -apple-system, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--green); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }

.serif { font-family: var(--serif); font-weight: 400; }
.serif em { font-style: italic; }

/* grain overlay */
.grain {
  position: fixed; inset: -50%; z-index: 999; pointer-events: none;
  width: 200%; height: 200%; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(2) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(2%, -1%); }
  100% { transform: translate(-1%, 2%); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* eyebrow */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 11px; font-weight: 600; color: var(--green);
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--green); }
.on-dark .kicker { color: #7fc97f; }
.on-dark .kicker::before { background: #7fc97f; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.nav.scrolled {
  background: rgba(14, 31, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 36px;
  box-shadow: 0 1px 0 rgba(246,248,243,0.08);
}
.nav-logo { display: inline-flex; align-items: center; gap: 10px; }
.nav-logo svg { height: 30px; width: auto; }
.nav-logo .heart-fill { fill: #f6f8f3; }
.nav-logo .ecg-line { stroke: var(--ink); }
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1.02;
  font-weight: 700; letter-spacing: -0.02em; font-size: 13px; color: #f6f8f3;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--dim-on-dark);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #fff; }
.nav-cta, .nav-links a.nav-cta {
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: #f6f8f3; padding: 9px 20px; border-radius: 100px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover, .nav-links a.nav-cta:hover { background: var(--mint); color: var(--ink); transform: translateY(-1px); }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; z-index: 102; }
.nav-burger span { width: 22px; height: 2px; background: #f6f8f3; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 101;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 32px; gap: 8px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--serif); font-size: 38px; color: var(--text-on-dark);
  padding: 8px 0; border-bottom: 1px solid var(--hair-dark);
}

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100svh;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding: 120px 36px 0;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 20%, rgba(45, 122, 45, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 50% at 15% 85%, rgba(26, 92, 26, 0.25), transparent 55%),
    var(--ink);
}
.hero-rings {
  position: absolute; right: -12%; top: 50%; transform: translateY(-50%);
  width: 56vw; max-width: 880px; aspect-ratio: 1; opacity: 0.5; pointer-events: none;
}
.hero-rings circle { fill: none; stroke: rgba(127, 201, 127, 0.13); stroke-width: 1; }
.hero-inner { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; width: 100%; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(54px, 8.4vw, 124px);
  line-height: 0.98; letter-spacing: -0.015em;
  color: var(--text-on-dark); margin-top: 26px;
  text-wrap: balance;
}
.hero h1 .accent { font-style: italic; color: #8fd48f; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; }
.hero-sub {
  margin-top: 30px; max-width: 460px;
  font-size: 17px; line-height: 1.65; color: var(--dim-on-dark);
}
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 42px; flex-wrap: wrap; }
.btn-solid {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 16px 32px; border-radius: 100px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-solid:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(45,122,45,0.35); }
.btn-solid svg { transition: transform 0.25s ease; }
.btn-solid:hover svg { transform: translateX(4px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-on-dark); font-size: 15px; font-weight: 500;
  padding: 16px 28px; border-radius: 100px;
  border: 1px solid var(--hair-dark);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-ghost:hover { border-color: rgba(246,248,243,0.45); background: rgba(246,248,243,0.05); }

/* ECG line across hero */
.hero-ecg {
  position: absolute; left: 0; right: 0; bottom: 17vh; z-index: 1;
  width: 100%; height: 120px; opacity: 0.6; pointer-events: none;
}
.hero-ecg path {
  fill: none; stroke: rgba(127, 201, 127, 0.5); stroke-width: 1.6;
  stroke-linejoin: round; stroke-linecap: round;
}

/* marquee */
.marquee {
  position: relative; z-index: 2;
  border-top: 1px solid var(--hair-dark);
  margin-top: auto;
  padding: 22px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span {
  display: inline-flex; align-items: center; gap: 56px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim-on-dark); white-space: nowrap;
}
.marquee-track span i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); display: inline-block; font-style: normal;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* generic reveal helper (GSAP sets final state) */
[data-reveal] { opacity: 0; transform: translateY(36px); }
.no-js [data-reveal], .reduced-motion [data-reveal] { opacity: 1; transform: none; }
