/* Nodfolk sales site. White and navy. Same layout and motion as before. */
:root {
  --white: #FFFFFF;
  --soft: #F3F5F9;       /* alternating sections */
  --navy: #0B1F44;       /* headings, buttons, panels. 16.5:1 on white */
  --navy-2: #16305F;     /* rows inside navy panels */
  --navy-3: #22407A;     /* hover */
  --text: #3B4A66;       /* body text on white, 8.6:1 */
  --muted: #5B6884;      /* small print on white, 5.7:1 */
  --dim: #6B7792;        /* large dimmed headline words, 4.6:1 */
  --on-navy: #C9D4EC;    /* body text on navy, 10.9:1 */
  --on-navy-2: #9FB0D3;  /* small print on navy, 7.2:1 */
  --line: #E2E7F0;
  --line-2: #CBD3E1;
  --stop: #B42318;       /* only on the cancel button in the phone */
  --radius-lg: 24px;
  --wrap: 1160px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-size: 112.5%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0; background: var(--white); color: var(--navy);
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.04; letter-spacing: -0.03em; color: var(--navy); }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 900; max-width: 13ch; }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; max-width: 18ch; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; max-width: 60ch; }
a { color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--white); padding: 10px 14px; border-radius: 10px; z-index: 10; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
.band-navy :focus-visible, .desk :focus-visible { outline-color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--navy); color: var(--white); border: 1.5px solid var(--navy);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms;
}
.btn:hover { background: var(--navy-3); border-color: var(--navy-3); transform: translateY(-1px); box-shadow: 0 12px 28px -12px rgba(11, 31, 68, 0.55); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--soft); border-color: var(--navy); box-shadow: none; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 0.9rem; }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 300ms; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--navy); }
.brand-mark path { fill: var(--white); }
.top nav { display: flex; gap: 26px; margin-left: auto; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 10px 0; transition: color 200ms; }
.top nav a:hover { color: var(--navy); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 120px; }
.spot {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px circle at var(--x, 70%) var(--y, 30%), rgba(34, 64, 122, 0.10), transparent 60%);
}
.hero::after { /* faint grid that fades out toward the edges */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.8;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 70%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.lede { font-size: 1.18rem; color: var(--text); margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Headline rises word by word on load, wrapping naturally at any width */
.rise .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.rise .w > span { display: inline-block; transform: translateY(110%); animation: rise 850ms var(--ease) forwards; animation-delay: calc(var(--i) * 45ms); }
.rise .dim > span { color: var(--dim); }
@keyframes rise { to { transform: none; } }
.fade-in { opacity: 0; transform: translateY(14px); animation: fade 900ms var(--ease) 450ms forwards; }
.desk.fade-in { animation-delay: 600ms; }
@keyframes fade { to { opacity: 1; transform: none; } }

/* The desk panel: the one dark element in the hero */
.desk {
  margin: 0; color: var(--white); background: linear-gradient(180deg, #0F2652, var(--navy));
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: 0 40px 80px -36px rgba(11, 31, 68, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.desk-bar { display: flex; justify-content: space-between; align-items: center; color: var(--on-navy-2); font-size: 0.85rem; font-weight: 500; padding: 2px 4px 16px; }
.desk-title { display: inline-flex; align-items: center; gap: 8px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--white); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.desk-clock { font-variant-numeric: tabular-nums; }

.nod { display: flex; align-items: center; gap: 18px; background: var(--white); color: var(--navy); border-radius: 16px; padding: 22px; border: 1.5px solid var(--white); transition: background 300ms, color 300ms; }
.nod-mark { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.nod-mark svg { width: 30px; height: 30px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nod-mark .bang { color: var(--navy); font-weight: 900; font-size: 1.8rem; line-height: 1; }
.nod-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.1; color: var(--navy); }
.nod-detail { margin: 4px 0 0; color: var(--text); }
.nod.is-warn { background: transparent; border-style: dashed; border-color: var(--on-navy); }
.nod.is-warn .nod-name { color: var(--white); }
.nod.is-warn .nod-mark { background: var(--white); }
.nod.is-warn .nod-detail { color: var(--on-navy); }
.nod.is-new { animation: nod 900ms var(--ease); }
.nod.is-new .nod-mark { animation: pop 900ms var(--ease); }
@keyframes nod { 0% { transform: translateY(-8px); opacity: 0.3; } 35% { transform: translateY(3px); opacity: 1; } 100% { transform: none; } }
@keyframes pop { 0% { transform: scale(0.5) rotate(-20deg); } 45% { transform: scale(1.12); } 100% { transform: none; } }

.feed { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 12px; background: var(--navy-2); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 10px 12px; font-size: 0.92rem; }
.feed li.is-in { animation: slide 600ms var(--ease); }
@keyframes slide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.av { width: 38px; height: 38px; border-radius: 50%; background: #2A4A86; display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; color: var(--white); }
.who { display: flex; flex-direction: column; line-height: 1.25; font-weight: 700; }
.who small { color: var(--on-navy-2); font-weight: 400; font-size: 0.8rem; }
.when { color: var(--on-navy-2); font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.tag { font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; color: var(--white); }
.tag.ok { background: rgba(255, 255, 255, 0.12); }
.tag.ok::before { content: '\2713\00a0'; }
.tag.warn { border: 1px dashed var(--on-navy); }
.tag.warn::before { content: '!\00a0'; }

/* ---------- Bands ---------- */
.band { padding: 120px 0; border-top: 1px solid var(--line); }
.band h2 { margin-bottom: 48px; }
.band-light { background: var(--soft); border-top: 0; }
.band-navy { background: var(--navy); color: var(--white); border-top: 0; }
.band-navy h2, .band-navy h3 { color: var(--white); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.split h3 { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 2px solid var(--navy); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ticks li { position: relative; padding-left: 30px; max-width: 52ch; color: var(--text); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 0.42em; width: 14px; height: 8px; border-left: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: rotate(-45deg); }

/* Only hidden when JavaScript is running, so nothing stays invisible if it fails. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.js .reveal.is-seen { opacity: 1; transform: none; }

/* ---------- Member story: phone changes as you scroll ---------- */
.members-intro { max-width: 760px; }
.members-intro h2 { margin-bottom: 24px; }
.members-intro p { color: var(--text); font-size: 1.12rem; }

.story { display: grid; grid-template-columns: 1fr 380px; gap: 80px; margin-top: 64px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding-left: 28px; border-left: 2px solid var(--line); transition: border-color 500ms; }
.step.is-active { border-left-color: var(--navy); }
/* Dimmed steps stay readable: lighter text, not see-through text */
.step h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; color: var(--dim); transition: color 500ms; }
.step p { color: var(--muted); font-size: 1.1rem; transition: color 500ms; }
.step.is-active h3 { color: var(--navy); }
.step.is-active p { color: var(--text); }
.step .mini { display: none; }

.phone { position: sticky; top: calc(50vh - 290px); align-self: start; margin: 0; width: 100%; height: 580px; background: var(--navy); border-radius: 48px; padding: 12px; box-shadow: 0 50px 100px -50px rgba(11, 31, 68, 0.6); }
.phone-screen { position: relative; height: 100%; background: var(--soft); color: var(--navy); border-radius: 38px; overflow: hidden; }
.screen { position: absolute; inset: 0; padding: 34px 20px 22px; display: flex; flex-direction: column; gap: 12px; font-size: 0.86rem; opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 450ms var(--ease), transform 450ms var(--ease); }
.screen.is-active { opacity: 1; transform: none; }
.ph-title { font-weight: 800; font-size: 1.15rem; margin: 0; letter-spacing: -0.01em; }
.ph-sub { color: var(--text); margin: 0 0 4px; }
.ph-opt { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; line-height: 1.4; }
.ph-opt small { color: var(--text); }
.ph-opt.is-picked { border: 2px solid var(--navy); }
.radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); margin-top: 2px; }
.is-picked .radio { border-color: var(--navy); box-shadow: inset 0 0 0 4px var(--white); background: var(--navy); }
.ph-chips { display: flex; gap: 8px; }
.ph-chips span { flex: 1; text-align: center; background: var(--white); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 4px; font-weight: 700; }
.ph-chips .is-picked { border: 2px solid var(--navy); }
.ph-card { background: var(--white); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; }
.ph-card p { margin: 0 0 8px; }
.ph-h { font-weight: 800; font-size: 1rem; }
.ph-card dl { margin: 6px 0 12px; display: grid; gap: 6px; }
.ph-card dl div { display: flex; justify-content: space-between; }
.ph-card dt { color: var(--text); }
.ph-card dd { margin: 0; font-weight: 700; }
.ph-btn { display: block; text-align: center; background: var(--navy); color: var(--white); font-weight: 700; padding: 14px; border-radius: 12px; margin-top: auto; }
.ph-btn-stop { background: var(--stop); }
.ph-link { display: block; text-align: center; color: var(--navy); font-weight: 700; padding: 4px; text-decoration: underline; }

.extras { list-style: none; margin: 80px 0 0; padding: 32px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; color: var(--text); }
.extras li { padding-left: 26px; position: relative; }
.extras li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--navy); }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.trio > div { padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.trio h3 { margin-bottom: 12px; }
.trio p { color: var(--on-navy); }

/* ---------- Founding gyms ---------- */
.founding { display: grid; grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: start; }
.founding h2 { margin-bottom: 28px; }
.founding-copy p { color: var(--text); font-size: 1.08rem; }
.founding-copy .contact { margin-top: 28px; }

.form, .thanks { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--navy); background: var(--white);
  border: 1.5px solid var(--line-2); border-radius: 12px; min-height: 50px; padding: 10px 14px; width: 100%;
  transition: border-color 200ms, box-shadow 200ms;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9AA6BE; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11, 31, 68, 0.14); }
.field [aria-invalid='true'] { border-color: var(--stop); border-width: 2px; }
.field .err, .form-error { color: var(--stop); font-size: 0.88rem; font-weight: 500; margin: 0; } /* 6.1:1 on soft */
.field .err::before, .form-error::before { content: '! '; font-weight: 800; }
.fine { font-size: 0.82rem; color: var(--muted); margin: 0; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks { text-align: center; padding: 48px 30px; animation: fade 700ms var(--ease); }
.thanks-mark { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; animation: pop 900ms var(--ease); }
.thanks-mark svg { width: 32px; height: 32px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.thanks h3 { font-size: 1.6rem; margin-bottom: 10px; }
.thanks p { margin: 0 auto; color: var(--text); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 90px; font-size: 0.9rem; }
.foot a { color: var(--text); }
.foot .brand { margin-right: auto; }

/* ---------- Smaller screens ---------- */
@media (max-width: 960px) {
  .hero { padding: 56px 0 80px; }
  .hero-grid, .founding { grid-template-columns: 1fr; gap: 48px; }
  .split, .trio, .extras { grid-template-columns: 1fr; gap: 36px; }
  .band { padding: 80px 0; }
  .top nav { display: none; }
  .top .btn-small { margin-left: auto; }
  /* The scrolling phone becomes a small screen under each step */
  .story { grid-template-columns: 1fr; margin-top: 40px; }
  .phone { display: none; }
  .step, .step.is-active { min-height: 0; border-left-color: var(--navy); padding: 0 0 0 22px; margin-bottom: 56px; }
  .step h3 { color: var(--navy); }
  .step p { color: var(--text); }
  .step .mini { display: block; position: relative; max-width: 330px; height: 470px; margin-top: 20px; background: var(--soft); color: var(--navy); border: 10px solid var(--navy); border-radius: 40px; overflow: hidden; }
  .step .mini .screen { opacity: 1; transform: none; }
  .extras { margin-top: 24px; }
}
@media (max-width: 520px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .feed li { grid-template-columns: 34px 1fr auto; }
  .feed .when { display: none; }
  .av { width: 34px; height: 34px; }
  .nod { padding: 18px; gap: 14px; }
  .nod-name { font-size: 1.3rem; }
  .form { padding: 22px; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Reduced motion: everything still ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise .w > span, .fade-in, .reveal { animation: none !important; transform: none !important; opacity: 1 !important; transition: none !important; }
  .nod.is-new, .nod.is-new .nod-mark, .feed li.is-in, .thanks, .thanks-mark, .live { animation: none !important; }
  .screen, .step, .step h3, .step p { transition: none; }
  .spot { display: none; }
}
