/* StrivHealth Coaching. Every value here comes from DESIGN.md. */

:root {
  --ink: #1d1d1f;
  --secondary: #6e6e73;
  --paper: #ffffff;
  --canvas: #f5f5f7;
  --hairline: #d6d6d6;
  --field-border: #86868b;
  --green: #0f7a4a;
  --green-pressed: #0b5f39;
  --green-on-dark: #35c07f;
  --error: #b3261e;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side: 20px;
  --band: 64px;
  --gap: 16px;
}

@media (min-width: 768px) {
  :root { --side: 40px; --band: 96px; --gap: 20px; }
}
@media (min-width: 1100px) {
  :root { --side: 80px; --band: 120px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

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

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-pressed); text-decoration: underline; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); padding: 12px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

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

h1 {
  font-size: clamp(40px, 5vw + 20px, 72px);
  font-weight: 700; line-height: 1.07; letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(28px, 2.5vw + 18px, 44px);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
}
h3 {
  font-size: clamp(21px, 0.5vw + 19px, 24px);
  font-weight: 600; line-height: 1.2; letter-spacing: normal;
}
.lead {
  font-size: clamp(19px, 0.4vw + 17.5px, 21px);
  line-height: 1.4; letter-spacing: normal;
}
.small { font-size: 14px; line-height: 1.4; letter-spacing: normal; }
.muted { color: var(--secondary); }
.label {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--green);
}

/* ---------- Layout ---------- */

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--side); }
.narrow { max-width: 640px; }
.narrow.mid { margin-left: auto; margin-right: auto; }

.band { padding: var(--band) 0; background: var(--paper); }
.band.grey { background: var(--canvas); }

.stack > * + * { margin-top: 16px; }
.stack > h2 + *, .stack > h1 + * { margin-top: 20px; }
.stack > .label + * { margin-top: 12px; }
.stack > .actions { margin-top: 28px; }
.stack > h3 { margin-top: 40px; }
.stack > h2:not(:first-child) { margin-top: 64px; }
.stack > .label + h2:not(:first-child) { margin-top: 12px; }

.center { text-align: center; }
.center .narrow, .center.narrow { margin-left: auto; margin-right: auto; }

.hero { padding: 64px 0 var(--band); }
@media (min-width: 768px) { .hero { padding-top: 96px; } }
.hero .lead { max-width: 640px; margin-left: auto; margin-right: auto; }
.hero h1 { max-width: 900px; margin-left: auto; margin-right: auto; }

.actions { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.actions .arrow { align-self: center; padding: 12px 0; }
@media (min-width: 560px) {
  .actions { flex-direction: row; align-items: center; gap: 24px; }
  .center .actions { justify-content: center; }
}

.grid { display: grid; gap: var(--gap); margin-top: 32px; }
@media (min-width: 768px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .grid.four { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Top bar ---------- */

.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.top-in { display: flex; align-items: center; gap: 12px; min-height: 52px; }

.brand {
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
  min-height: 48px; color: var(--ink); font-size: 19px; letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.brand b { font-weight: 700; }

.nav a {
  display: flex; align-items: center; min-height: 48px;
  color: var(--ink); font-size: 21px;
}
.nav a[aria-current="page"] { font-weight: 600; }

.menu-btn {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: none; border: 0; min-height: 48px; padding: 0 4px 0 8px; cursor: pointer;
}

/* Phones: links live in a panel under the bar. Without scripts the panel stays open. */
@media (max-width: 767px) {
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    padding: 8px var(--side) 16px;
  }
  .js .nav { display: none; }
  .js .nav.open { display: block; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .top { position: static; }
  html:not(.js) .nav { position: static; padding: 0 0 8px; border: 0; flex-basis: 100%; }
  html:not(.js) .top-in { flex-wrap: wrap; }
}
@media (min-width: 768px) {
  .menu-btn { display: none; }
  .nav { order: 0; }
  .nav ul { display: flex; gap: 32px; margin-right: 12px; }
  .nav a { font-size: 15px; }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 24px; border-radius: 999px;
  background: var(--green); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; text-align: center;
}
.btn:hover { background: var(--green-pressed); color: #fff; text-decoration: none; }
.btn.outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }
.btn.small-pill { min-height: 36px; padding: 8px 16px; font-size: 15px; }
.btn.full { width: 100%; }

/* Small pill in the top bar keeps a 48px press area. */
.top .btn.small-pill { position: relative; }
.top .btn.small-pill::after { content: ""; position: absolute; inset: -6px 0; }

.arrow::after { content: " \203A"; }

/* ---------- Cards ---------- */

.card { background: var(--canvas); border-radius: 28px; padding: 28px; }
.band.grey .card { background: var(--paper); }
.card > * + * { margin-top: 12px; }

.price { font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.price span { font-size: 17px; font-weight: 400; color: var(--secondary); letter-spacing: -0.01em; }

.under { margin-top: 24px; }

/* ---------- Photos ---------- */

.photo { margin: 0; border-radius: 28px; overflow: hidden; background: var(--canvas); }
.band.grey .photo { background: var(--paper); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.tall { aspect-ratio: 3 / 4; }
.photo.square { aspect-ratio: 1 / 1; }

.hero-photo { aspect-ratio: 4 / 5; max-width: 880px; margin: 48px auto 0; }
.hero-photo img { object-position: 50% 85%; }
@media (min-width: 768px) { .hero-photo { aspect-ratio: 6 / 5; margin-top: 64px; } }

.about-photo { aspect-ratio: 1 / 1; max-width: 520px; margin: 48px auto 0; }

.split { display: grid; gap: 40px; }
.split .photo { max-width: 480px; width: 100%; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .split .photo { justify-self: end; }
}

/* Training photo strip. Without scripts it is a strip you swipe or scroll
   sideways; with animation on a wide screen it slides as you scroll down. */
.gallery { margin-top: 40px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery-track { display: flex; gap: var(--gap); width: max-content; padding: 0 var(--side); }
.gallery .photo { flex: none; width: min(70vw, 320px); scroll-snap-align: center; }
@media (min-width: 900px) {
  .gallery { margin-top: 64px; }
  .gallery .photo { width: 340px; }
  .gallery-track { padding: 0 max(var(--side), calc((100vw - 1200px) / 2 + var(--side))); }
}
.gallery.sliding { overflow: hidden; }

/* ---------- Lists ---------- */

.ticks > li { position: relative; padding-left: 32px; }
.ticks > li + li { margin-top: 12px; }
.ticks > li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 7px; height: 13px; border: solid var(--green); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.plain > li + li { margin-top: 8px; }
.plain > li { position: relative; padding-left: 20px; }
.plain > li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}

.steps { counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 56px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--green); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.steps h3 { padding-top: 7px; }
.steps p { margin-top: 8px; }
@media (min-width: 1000px) {
  .steps > li { padding-left: 0; padding-top: 56px; }
  .steps h3 { padding-top: 0; }
}

/* ---------- Questions ---------- */

.faq { margin-top: 32px; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 56px; padding: 16px 40px 16px 0; display: flex; align-items: center;
  font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: normal;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--green);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 20px; max-width: 640px; }

/* ---------- Form ---------- */

.form { max-width: 560px; margin: 0 auto; text-align: left; }
.field + .field { margin-top: 28px; }
.field > label, .field > .q { display: block; font-size: 15px; font-weight: 600; letter-spacing: normal; }
.help { display: block; font-size: 14px; color: var(--secondary); margin-top: 4px; letter-spacing: normal; }

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field textarea {
  display: block; width: 100%; margin-top: 8px;
  min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--field-border); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }

fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field + .field, .field + fieldset.field { margin-top: 28px; }
fieldset.field legend { padding: 0; font-size: 15px; font-weight: 600; letter-spacing: normal; }

.choices { margin-top: 8px; display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--field-border); border-radius: 12px;
}
.choice input, .check input {
  flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--green);
}
.choice:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

.check, .field > label.check { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 0; cursor: pointer; font-size: 17px; font-weight: 400; letter-spacing: -0.01em; }
.check span { padding-top: 1px; }

.form .btn { margin-top: 32px; }

.status {
  margin-top: 20px; padding: 16px 20px; border-radius: 12px;
  background: var(--canvas); color: var(--ink);
}
.band.grey .status { background: var(--paper); }
.status.error { color: var(--error); }

.todo {
  display: inline-block; font-size: 14px; color: var(--error);
  background: #fdecea; border-radius: 6px; padding: 1px 6px; letter-spacing: normal;
}

/* ---------- Legal text ---------- */

.legal h2 { font-size: clamp(28px, 2vw + 20px, 40px); }
.legal h3 { font-size: 21px; }
.legal .plain { margin-top: 12px; }

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

.foot { background: var(--ink); color: #fff; padding: 64px 0 48px; }
.foot a { color: var(--green-on-dark); }
.foot a:hover { color: #fff; }
.foot .brand { color: #fff; margin: 0; }
.foot > .wrap > * + * { margin-top: 16px; }
.foot .small { color: #d6d6d6; max-width: 640px; }
.foot .todo { background: #4a1f1b; color: #ffb4ab; }
.foot-links a { display: inline-flex; align-items: center; min-height: 48px; }

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

/* On pages with animation the top of the page starts hidden and rises in.
   The "motion" switch is only ever set by the small script in the page head,
   which also removes it after 4 seconds if the animation has not started. */
.motion .hero .stack > *, .motion .hero .photo { opacity: 0; }
[data-words] span { display: inline-block; }

.btn { transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) {
  .card { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
  .card:hover { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Top bar on very narrow phones ---------- */

.top .btn.small-pill { white-space: nowrap; }
@media (max-width: 359px) {
  .top-in { gap: 8px; }
  .brand { font-size: 17px; }
  .top .btn.small-pill { padding: 8px 12px; font-size: 14px; }
  .menu-btn { padding-left: 4px; }
}

/* ---------- Form sections ---------- */

.form-section {
  font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: normal;
  margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--hairline);
}
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form .form-section + .field { margin-top: 20px; }
.form .note { margin-top: 16px; }
.form .note + .form-section { margin-top: 40px; }

/* Optional part of the application form: folded away until opened (26 November 2026). */
.form details.optional { margin-top: 48px; }
.form details.optional > summary {
  list-style: none; cursor: pointer; position: relative; margin-top: 0; padding-right: 40px;
  padding-top: 28px; border-top: 1px solid var(--hairline); /* first-child rule would otherwise remove these */
}
.form details.optional > summary::-webkit-details-marker { display: none; }
.form details.optional > summary::after {
  content: "+"; position: absolute; right: 4px; top: 28px;
  font-size: 26px; font-weight: 400; line-height: 1; color: var(--green);
}
.form details.optional[open] > summary::after { content: "\2212"; }
.form details.optional > summary + .field { margin-top: 20px; }
.form details.optional + .form-section { margin-top: 40px; }

.nowrap { white-space: nowrap; }

/* Example meals with macro labels (Home, "What you get"; added 26 November 2026). */
.meals { margin-top: 72px; }
.meals .lead { margin-top: 12px; }
.card.meal { padding: 16px 16px 24px; }
.card.meal .photo { border-radius: 20px; }
.card.meal .label { margin-top: 20px; }
.card.meal h3 { margin-top: 6px; }
.macros { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.macros li {
  font-size: 14px; line-height: 1; padding: 9px 12px; border-radius: 999px;
  background: var(--canvas); border: 1px solid var(--hairline);
}
.band.grey .card.meal .macros li { background: var(--canvas); }
.macros b { font-weight: 600; color: var(--green); }

/* Meal cards as a sideways strip, like the training photos (26 November 2026). */
.gallery .card.meal { flex: none; width: min(78vw, 340px); scroll-snap-align: center; }
.gallery .card.meal .photo { width: auto; }
.meals + .gallery { margin-top: 32px; }
@media (min-width: 900px) {
  .gallery .card.meal { width: 420px; }
}

/* Top of Home: two photos side by side (27 November 2026). */
.hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 880px; margin: 40px auto 0; }
.hero-pair .photo { aspect-ratio: 4 / 5; }
.hero-pair .photo img { object-position: 50% 35%; }
@media (min-width: 768px) { .hero-pair { gap: var(--gap); margin-top: 64px; } }
