/* KalorFit landing — dark theme matching the product (web app / TV wall).
   No frameworks, no external fonts: system stack, self-contained. */

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2129;
  --border: #30363d;
  --text: #ffffff;
  --muted: #d9d9d9;
  --coral: #ff4d00;
  --coral-dark: #d94000;
  /* the TV wall's effort-zone colors, used as accents */
  --z2: #42a5f5;
  --z3: #66bb6a;
  --z4: #ffa726;
  --z5: #ef5350;
  --radius: 14px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 4vw, 38px); }
h2 { color: var(--coral); text-transform: uppercase; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
strong { color: var(--text); }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: 0.02em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 20px; margin-left: 8px; font-size: 14px; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.langs { display: flex; gap: 4px; font-size: 13px; }
.langs a {
  color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px;
}
.langs a:hover { color: var(--text); }
.langs a.on { color: var(--text); font-weight: 700; background: var(--panel-2); }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn.primary { background: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn.ghost { border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.small { padding: 8px 16px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url("assets/hero.jpg") center 30% / cover no-repeat;
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0 0 0 42%;
  background: url("assets/brand-pattern.svg") center / 720px auto repeat;
  opacity: .72;
  mix-blend-mode: screen;
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0 0 0 42%;
  background: url("assets/brand-pattern.svg") center / 720px auto repeat;
  opacity: .72;
  mix-blend-mode: screen;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(13,17,23,.88) 0%, rgba(13,17,23,.55) 48%, rgba(13,17,23,.15) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(13,17,23,.12) 26%);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 110px 24px 130px;
  min-height: min(78vh, 720px); display: flex; flex-direction: column; justify-content: center;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px); font-weight: 800; max-width: 15em;
}
.hero h1 .accent { color: var(--coral); }
.hero .sub { max-width: 34em; font-size: clamp(16px, 1.9vw, 19px); color: #ffffff; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.heart { color: var(--coral); display: inline-block; }

/* the TV's five zone colors as a signature divider */
.zonebar { display: flex; height: 5px; }
.zonebar span { flex: 1; }
.zonebar .zr { background: var(--muted); }
.zonebar .z1 { background: #bdbdbd; }
.zonebar .z2 { background: var(--z2); }
.zonebar .z3 { background: var(--z3); }
.zonebar .z4 { background: var(--z4); }
.zonebar .z5 { background: var(--z5); }

/* Bold brand swatch: solid + outlined marks, inspired by the campaign system. */
.brand-pattern-band {
  height: clamp(92px, 11vw, 146px);
  background-color: #ffe4d4;
  background-image: url("assets/brand-pattern.svg");
  background-position: center;
  background-size: 620px auto;
  border-bottom: 1px solid #ffb38f;
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.alt {
  background-color: var(--panel);
  background-image:
    linear-gradient(rgba(11, 15, 20, .76), rgba(11, 15, 20, .84)),
    url("assets/brand-pattern.svg");
  background-position: center, center;
  background-size: auto, 680px auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 10px;
}
.lead { font-size: 18px; color: #f4f4f4; max-width: 44em; }

/* three feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative; overflow: hidden;
}
section.alt .card { background: var(--panel-2); }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.card.c-goal::before { background: var(--z3); }
.card.c-battle::before { background: var(--z4); }
.card.c-board::before { background: var(--z2); }
.card .cicon { margin-bottom: 12px; }
.card .cicon svg { width: 32px; height: 32px; fill: none; stroke-width: 1.7;
                   stroke-linecap: round; stroke-linejoin: round; }
.card.c-goal .cicon svg { stroke: var(--z3); }
.card.c-battle .cicon svg { stroke: var(--z4); }
.card.c-board .cicon svg { stroke: var(--z2); }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card p strong { color: var(--text); }

/* split rows: text beside an image */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 26px; }
.split.flip > .split-media { order: -1; }
.split-media img, .ph {
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.split ul { margin: 0; padding: 0; list-style: none; }
.split ul li { padding-left: 26px; position: relative; margin-bottom: 14px; color: var(--muted); }
.split ul li strong { color: var(--text); }
.split ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 13px;
  height: 19px;
  background: var(--coral);
  clip-path: polygon(54% 0, 100% 0, 68% 38%, 100% 38%, 25% 100%, 43% 54%, 8% 54%);
}

/* photo placeholders — swap for a real <img> when the shot is ready */
.ph {
  aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; text-align: center; padding: 24px;
  background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 12px, var(--panel-2) 12px, var(--panel-2) 24px);
  border-style: dashed; color: var(--muted); font-size: 14px;
}
.ph svg { width: 34px; height: 34px; fill: var(--muted); opacity: .8; }
.ph.tall { aspect-ratio: 3 / 4; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.member-phone {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 18px 8px 8px;
  overflow: hidden;
  color: #e6edf3;
  background: #05070a;
  border: 3px solid #080808;
  border-radius: 28px;
  box-shadow: 12px 12px 0 var(--coral);
}
.member-phone-speaker {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 26%;
  height: 5px;
  background: #30363d;
  border-radius: 999px;
  transform: translateX(-50%);
}
.member-ui {
  height: 100%;
  padding: 9px;
  overflow: hidden;
  background: #0d1117;
  border-radius: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.member-ui-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
}
.member-ui-brand img {
  width: 12px;
  height: 12px;
  border: 0 !important;
  box-shadow: none !important;
}
.member-ui-nav,
.member-ui-period {
  display: flex;
  gap: 3px;
  margin-top: 7px;
  overflow: hidden;
  white-space: nowrap;
}
.member-ui-nav span,
.member-ui-period span {
  padding: 3px 5px;
  color: #8b949e;
  font-size: 6px;
  border-radius: 4px;
}
.member-ui-nav span.on {
  color: #e6edf3;
  background: #21262d;
}
.member-ui-period span {
  border: 1px solid #30363d;
}
.member-ui-period span.on {
  color: #fff;
  background: #388bfd;
  border-color: #388bfd;
}
.member-ui-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}
.member-ui-stats > div {
  min-width: 0;
  padding: 7px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 7px;
}
.member-ui-stats b {
  display: block;
  overflow: hidden;
  color: #e6edf3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-ui-stats small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #8b949e;
  font-size: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-flame {
  display: inline-block;
  width: 7px;
  height: 9px;
  margin-left: 1px;
  vertical-align: -1px;
  background: #f85149;
  border-radius: 70% 30% 65% 35%;
  clip-path: polygon(54% 0, 88% 39%, 76% 25%, 100% 68%, 84% 100%, 18% 100%, 0 68%, 31% 27%, 34% 57%);
}
.member-ui-stats .goal {
  grid-column: 1 / -1;
}
.member-ui-stats i {
  display: block;
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  background: #21262d;
  border-radius: 3px;
}
.member-ui-stats em {
  display: block;
  width: 66%;
  height: 100%;
  background: #3fb950;
}
.member-ui-recent {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 7px;
}
.member-ui-recent span {
  color: #58a6ff;
  font-size: 5px;
}
.member-ui-session {
  position: relative;
  margin-top: 5px;
  padding: 7px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 7px;
}
.member-ui-session b,
.member-ui-session small {
  display: block;
}
.member-ui-session b {
  font-size: 7px;
}
.member-ui-session small {
  margin-top: 2px;
  color: #8b949e;
  font-size: 5px;
}
.member-ui-session strong {
  position: absolute;
  right: 7px;
  top: 50%;
  color: #e6edf3 !important;
  font-size: 6px;
  transform: translateY(-50%);
}
.armband-closeup {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}

/* what's in the box */
.box-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.box {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
section.alt .box { background: var(--panel-2); }
.box svg { width: 30px; height: 30px; stroke: var(--coral); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.box h3 { font-size: 16px; }
.box .tag { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.box p { color: var(--muted); font-size: 14px; margin: 0; }

/* privacy / no lock-in callouts */
.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.callout {
  border: 1px solid var(--border); border-left: 4px solid var(--z3);
  border-radius: var(--radius); padding: 24px; background: var(--panel);
}
.callout.hw { border-left-color: var(--z2); }
.callout p { color: var(--muted); margin: 0; }

/* closing */
.closing {
  position: relative;
  text-align: center;
  background-image:
    linear-gradient(135deg, rgba(11, 15, 20, .68), rgba(13, 17, 23, .86)),
    url("assets/brand-pattern.svg");
  background-size: auto, 600px auto;
}
.closing blockquote {
  margin: 0 auto 30px; max-width: 42em; font-size: clamp(18px, 2.6vw, 24px);
  line-height: 1.55; color: #c9d1d9; border: 0; font-style: italic;
}
.closing blockquote strong { color: var(--text); font-style: normal; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot .brand { font-size: 15px; }
.foot .brand img { width: 22px; height: 22px; }
.foot-spacer { flex: 1; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------- campaign art direction ---------- */
body {
  background: #090909;
}
h1, h2, h3, .btn, .brand {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
}
h1, h2 {
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .01em;
}
h2 {
  max-width: 21em;
  font-size: clamp(34px, 5vw, 54px);
  line-height: .98;
}
header {
  background: rgba(8, 8, 8, .94);
  border-bottom: 3px solid var(--coral);
}
.brand {
  font-size: 21px;
  letter-spacing: .06em;
}
.btn {
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.btn.primary {
  background: var(--coral);
  color: #080808;
  box-shadow: 4px 4px 0 #fff;
}
.btn.primary:hover {
  background: #ff6a2b;
}
.btn.ghost {
  border: 2px solid #fff;
  background: #090909;
}
.hero {
  border-bottom: 0;
}
.hero h1 {
  max-width: 12em;
  font-size: clamp(46px, 7vw, 82px);
  line-height: .91;
  text-shadow: 5px 5px 0 rgba(0, 0, 0, .7);
}
.hero h1 .accent {
  display: inline;
  color: var(--coral);
}
.hero .sub {
  padding-left: 16px;
  border-left: 4px solid var(--coral);
}
.zonebar {
  height: 7px;
  background: var(--coral);
}
.zonebar span {
  display: none;
}
.brand-pattern-band {
  position: relative;
  height: clamp(130px, 15vw, 190px);
  background-color: #ffe2d1;
  background-size: 610px auto;
  box-shadow: inset 0 -12px 0 var(--coral);
}
.brand-pattern-band::after {
  content: "";
  position: absolute;
  right: -4%;
  bottom: 0;
  width: 34%;
  height: 46%;
  background: var(--coral);
  clip-path: polygon(28% 100%, 100% 0, 100% 100%);
}
section {
  position: relative;
  overflow: hidden;
}
section > .wrap {
  position: relative;
  z-index: 1;
}
section:not(.alt) {
  color: #0a0a0a;
  background:
    linear-gradient(118deg, #fff0e7 0%, #ffe1d0 72%, #ffc5a7 100%);
  border-top: 0;
  border-bottom: 2px solid #0a0a0a;
}
section:not(.alt)::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -65px;
  width: 360px;
  height: 190px;
  background: var(--coral);
  clip-path: polygon(38% 100%, 100% 0, 100% 100%);
}
section.alt {
  background-color: #080808;
  background-image:
    linear-gradient(rgba(5, 5, 5, .72), rgba(5, 5, 5, .82)),
    url("assets/brand-pattern.svg");
  background-size: auto, 620px auto;
  border-top: 6px solid var(--coral);
  border-bottom: 6px solid var(--coral);
}
.kicker {
  display: inline-block;
  padding: 5px 10px;
  color: #fff;
  background: var(--coral);
  letter-spacing: .16em;
}
section:not(.alt) .lead,
section:not(.alt) .muted,
section:not(.alt) .split ul li,
section:not(.alt) .card p,
section:not(.alt) .box p,
section:not(.alt) .box .tag,
section:not(.alt) .callout p {
  color: #17110e;
}
section:not(.alt) strong,
section:not(.alt) h3 {
  color: #080808;
}
section:not(.alt) .split ul li strong,
section:not(.alt) .card p strong,
section:not(.alt) .box p strong,
section:not(.alt) .callout p strong {
  color: #080808;
}
.card,
.box,
.callout {
  border-radius: 6px;
}
section:not(.alt) .card,
section:not(.alt) .box,
section:not(.alt) .callout {
  background: rgba(255, 248, 243, .9);
  border: 2px solid #0a0a0a;
  box-shadow: 8px 8px 0 var(--coral);
}
section.alt .card,
section.alt .box {
  background: rgba(10, 10, 10, .9);
  border: 1px solid rgba(255, 77, 0, .55);
}
section.alt .lead,
section.alt .muted,
section.alt .split ul li,
section.alt .card p,
section.alt .box p,
section.alt .box .tag,
section.alt .callout p {
  color: #ffffff;
}
.card::before {
  height: 7px;
  background: var(--coral) !important;
}
.split-media img,
.ph {
  border-radius: 6px;
}
section:not(.alt) .split-media img,
section:not(.alt) .ph {
  border: 3px solid #0a0a0a;
  box-shadow: 12px 12px 0 var(--coral);
}
.callout h3 {
  display: flex;
  align-items: center;
  gap: 11px;
}
.callout-icon {
  display: inline-grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #080808;
  background: var(--coral);
  border-radius: 4px;
  transform: skew(-7deg);
}
.callout-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: skew(7deg);
}
.closing {
  border-top-width: 8px;
  background-image:
    linear-gradient(120deg, rgba(4, 4, 4, .65), rgba(4, 4, 4, .9)),
    url("assets/brand-pattern.svg");
  background-size: auto, 560px auto;
}
.closing blockquote {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  font-size: clamp(25px, 3.5vw, 40px);
  font-style: italic;
  line-height: 1.15;
  text-transform: uppercase;
}
.closing blockquote strong {
  color: var(--coral);
}
footer {
  background: #080808;
  border-top: 0;
}

/* Fixed backgrounds create a restrained parallax effect while content scrolls. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .hero-bg {
    background-attachment: fixed;
  }
  .brand-pattern-band {
    background-attachment: fixed;
  }
  section.alt,
  .closing {
    background-attachment: scroll, fixed;
  }
}

/* ---------- motion ---------- */
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.22); } 24% { transform: scale(1); } }
.heart { animation: beat 1.6s infinite; }
/* hidden-until-scrolled ONLY once JS has taken charge (body.reveal-ready):
   without JS — or in print — everything stays visible */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heart { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.flip > .split-media { order: 0; }
  .box-grid { grid-template-columns: 1fr 1fr; }
  .callouts { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .hero-inner { padding: 88px 24px 100px; min-height: 0; }
  .box-grid, .media-pair { grid-template-columns: 1fr; }
  .hero-bg { background-position: 62% 30%; }
  .hero-bg::before { left: 18%; background-size: 520px auto; opacity: .52; }
  .brand-pattern-band { background-size: 500px auto; }
}
