/* Red Rock Health Optimization — homepage
   Tokens follow the i4 Brand Intelligence implementation appendix. */

:root {
  color-scheme: dark;

  --brand-primary: #D02A15;
  --brand-primary-hover: #B92412;
  --brand-accent-text: #E65B49;

  --background: #101214;
  --background-deep: #0B0C0E;
  --surface: #1C2023;
  --surface-raised: #282D31;
  --border: #42484D;
  --border-soft: #2E3337;

  --text-primary: #F4F3F1;
  --text-secondary: #A8AEB2;
  --text-muted: #868D92;
  --text-on-brand: #FFFFFF;

  --focus-ring: #E65B49;

  --font-display: "Schibsted Grotesk", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mark: "Montserrat", "Figtree", sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(80px, 11vw, 148px);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
address { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--text-primary); color: var(--background);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Type ---------- */

.hero-title, .h2, .h3, .program-name, .form-title {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.025em;
}

.h2 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.4rem);
  line-height: 1.06;
  font-weight: 600;
}
.h2-xl { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.5rem); line-height: 1.02; }

.h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 58ch;
  text-wrap: pretty;
}

/* Wide-tracked caps borrow the logo's "HEALTH OPTIMIZATION" line; used as measurement labels only */
.proof-label, .step-label, .readout-title, .readout-tag, .program-flag, .footer-head, .cube-legend li {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand-accent-text);
  font-weight: 600;
  margin-top: 28px;
}
.text-link .icon { transition: transform 0.3s var(--ease-out); }
.text-link:hover .icon { transform: translateX(4px); }

.inline-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--brand-accent-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.inline-link:hover { color: var(--brand-accent-text); }

.fine-print {
  margin-top: 28px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.fine-print-center { text-align: center; max-width: 70ch; margin-inline: auto; }

/* ---------- Buttons ---------- */

.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h);
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.3s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-h: 42px; padding: 0 18px; font-size: 0.9375rem; }
.btn-lg { --btn-h: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--brand-primary); color: var(--text-on-brand); }
.btn-primary:hover {
  background: var(--brand-primary-hover);
  box-shadow: 0 10px 24px -10px rgba(208, 42, 21, 0.55);
}
.btn-primary .icon { transition: transform 0.3s var(--ease-out); }
.btn-primary:hover .icon { transform: translateX(3px); }

.btn-ghost {
  background: rgba(16, 18, 20, 0.35);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-secondary); background: var(--surface-raised); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(16, 18, 20, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border-soft);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 37px; height: 40px; overflow: hidden; flex: none; }
.brand-mark img { width: auto; height: 40px; max-width: none; }
.brand-word {
  display: flex; flex-direction: column;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-family: var(--font-mark);
  line-height: 1;
}
.brand-name { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.02em; }
.brand-sub { font-size: 0.5rem; font-weight: 500; letter-spacing: 0.27em; margin-top: 5px; color: var(--text-secondary); }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: 4px; }
.primary-nav a {
  display: block; padding: 8px 12px;
  font-size: 0.9375rem; font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color 0.2s;
}
.primary-nav a:hover, .primary-nav a.is-current { color: var(--text-primary); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.9375rem;
  color: var(--text-primary);
}
.header-phone .icon { color: var(--brand-accent-text); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(16, 18, 20, 0.4);
  cursor: pointer;
}
.menu-toggle .icon { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  background: var(--background);
  border-top: 1px solid var(--border-soft);
  padding: 12px var(--gutter) 28px;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.mobile-menu nav a {
  display: block; padding: 16px 0;
  font-family: var(--font-display);
  font-size: 1.375rem; font-weight: 500;
  border-bottom: 1px solid var(--border-soft);
}
.mobile-menu-actions { display: grid; gap: 12px; margin-top: 24px; }
.mobile-menu-link { text-align: center; padding: 10px; color: var(--text-secondary); font-weight: 500; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--background); }
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-video.is-playing { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.92) 0%, rgba(16, 18, 20, 0.78) 38%, rgba(16, 18, 20, 0.45) 72%, rgba(16, 18, 20, 0.35) 100%),
    linear-gradient(180deg, rgba(16, 18, 20, 0.55) 0%, rgba(16, 18, 20, 0) 22%, rgba(16, 18, 20, 0) 60%, rgba(16, 18, 20, 0.95) 100%);
}

.hero-inner {
  flex: 1;
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 56px;
}
.hero-copy { max-width: 760px; }
.hero-title {
  font-size: clamp(2.75rem, 1.4rem + 5.4vw, 5.75rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.hero-lede {
  margin-top: 28px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  color: #D3D6D8;
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-note {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 28px;
  font-size: 0.9375rem; color: var(--text-secondary);
}
.hero-note .icon { color: var(--brand-accent-text); }

/* Hero entrance: one orchestrated rise, content visible without JS */
.js .hero-copy > * {
  animation: rise 1s var(--ease-out) both;
}
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.video-toggle {
  position: absolute;
  right: var(--gutter); bottom: 150px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(244, 243, 241, 0.25);
  background: rgba(16, 18, 20, 0.5);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
}
.video-toggle:hover { border-color: var(--text-primary); }
.video-toggle .icon { width: 16px; height: 16px; }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }

.proof-strip {
  position: relative;
  border-top: 1px solid rgba(66, 72, 77, 0.7);
  background: rgba(16, 18, 20, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.proof-item { padding: 26px 32px 28px 0; }
.proof-item + .proof-item { padding-left: 32px; border-left: 1px solid rgba(66, 72, 77, 0.7); }
.proof-label { color: var(--brand-accent-text); display: block; margin-bottom: 8px; }
.proof-item p { color: var(--text-primary); font-size: 0.9875rem; line-height: 1.5; max-width: 30ch; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section-head { margin-bottom: clamp(48px, 6vw, 80px); max-width: 820px; }
.section-head .lead { margin-top: 20px; }
.section-head-row {
  max-width: none;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end;
}
.section-head-row .lead { margin-top: 0; }
.section-head-center { text-align: center; margin-inline: auto; }
.section-head-center .lead { margin-inline: auto; }

/* Problem */
.section-problem { background: var(--background); }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}
.split-copy .lead { margin-top: 24px; }
.split-copy > p:not(.lead) { margin-top: 20px; color: var(--text-secondary); max-width: 58ch; }

.readout {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.readout-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-soft);
}
.readout-title { color: var(--text-primary); }
.readout-tag { color: var(--text-secondary); font-size: 0.6875rem; }
.readout-list li {
  display: grid; grid-template-columns: 11rem 1fr; gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-soft);
  align-items: baseline;
}
.readout-key { font-weight: 600; }
.readout-val { color: var(--text-secondary); font-size: 0.9375rem; }
.readout-foot {
  display: flex; gap: 14px; align-items: center;
  padding: 22px 28px;
  background: var(--surface-raised);
  font-weight: 500;
}
.readout-arrow {
  flex: none; width: 28px; height: 28px; border-radius: 999px;
  background: var(--brand-primary);
  position: relative;
}
.readout-arrow::after {
  content: ""; position: absolute; left: 8px; top: 11px;
  width: 11px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* Goals — choose a goal and the cube opens onto it */
.section-goals {
  background: var(--background-deep);
  border-block: 1px solid var(--border-soft);
}
.goals-head {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px 64px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.goals-head .h2 { max-width: 12ch; }
.goals-intro > p:not(.lead) { margin-top: 16px; color: var(--text-secondary); max-width: 52ch; }

.goals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.92fr);
  grid-template-areas: "list frame panel";
  gap: clamp(32px, 3.6vw, 60px);
  align-items: start;
}

.goal-list { grid-area: list; border-top: 1px solid var(--border); }
.goal-tab {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr 22px;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 2px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
}
.goal-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.65rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
  transition: transform 0.5s var(--ease-out);
}
.goal-tab:hover, .goal-tab[aria-selected="true"] { color: var(--text-primary); }
.goal-tab:hover .goal-name { transform: translateX(6px); }
.goal-tab[aria-selected="true"] .goal-name { transform: translateX(10px); }
.goal-tab-start { margin-top: 20px; border-top: 1px solid var(--border-soft); }
.goal-tab-start .goal-name { font-family: var(--font-body); font-size: 1.125rem; letter-spacing: 0; }

.goal-mark { width: 18px; height: 18px; overflow: visible; }
.goal-mark polygon {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 9;
  stroke-linejoin: round;
  transition: fill 0.45s var(--ease-out), stroke 0.45s;
}
.goal-tab[aria-selected="true"] .goal-mark polygon { fill: var(--surface-raised); stroke: var(--border); }
.goal-tab[aria-selected="true"] .goal-mark polygon:first-child { fill: var(--brand-primary); stroke: var(--brand-primary); }

.goal-arrow {
  color: var(--brand-accent-text);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s, transform 0.5s var(--ease-out);
}
.goal-tab[aria-selected="true"] .goal-arrow { opacity: 1; transform: none; }

.goal-progress {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brand-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.goal-tab[aria-selected="true"] .goal-progress { transform: scaleX(1); }
.goals.is-auto .goal-tab[aria-selected="true"] .goal-progress {
  transition: none;
  animation: goal-progress var(--goal-dwell, 6s) linear both;
}
.goals.is-auto.is-paused .goal-tab[aria-selected="true"] .goal-progress { animation-play-state: paused; }
@keyframes goal-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* The photo frame: each goal's image opens out of the cube's silhouette */
.goal-frame {
  grid-area: frame;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}
.goal-shots {
  position: absolute; inset: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.05);
  transition: transform 1.2s var(--ease-out);
}
.goal-shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  filter: saturate(0.9);
  visibility: hidden;
}
.goal-shot.is-active { visibility: visible; z-index: 2; }
.goal-shot.is-prev { visibility: visible; z-index: 1; animation: goal-recede 1.1s var(--ease-out) both; }
.goal-shot.is-entering { animation: goal-open 1.1s cubic-bezier(0.7, 0, 0.18, 1) both; }
@keyframes goal-open {
  0% {
    clip-path: polygon(50% 40%, 61% 45%, 61% 55%, 50% 60%, 39% 55%, 39% 45%);
    transform: scale(1.2);
  }
  38% {
    clip-path: polygon(50% 20%, 78% 34%, 78% 66%, 50% 80%, 22% 66%, 22% 34%);
  }
  100% {
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%, 0% 0%);
    transform: scale(1);
  }
}
@keyframes goal-recede { to { transform: scale(1.06); filter: saturate(0.6) brightness(0.45); } }

.goal-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 12, 14, 0.35) 0%, rgba(11, 12, 14, 0) 22%, rgba(11, 12, 14, 0) 62%, rgba(11, 12, 14, 0.85) 100%);
}
.goal-caption {
  position: absolute; left: 24px; right: 72px; bottom: 22px; z-index: 4;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.goal-caption::before { content: ""; width: 24px; height: 2px; background: var(--brand-primary); flex: none; }
.goal-caption.is-swapping { animation: rise 0.7s var(--ease-out) both; }

.goal-autoplay {
  position: absolute; right: 16px; bottom: 14px; z-index: 4;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(244, 243, 241, 0.3);
  background: rgba(16, 18, 20, 0.55);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
}
.goal-autoplay[hidden] { display: none; }
.goal-autoplay:hover { border-color: var(--text-primary); }
.goal-autoplay .icon { width: 16px; height: 16px; }
.goal-autoplay .icon-play { display: none; }
.goal-autoplay[aria-pressed="true"] .icon-pause { display: none; }
.goal-autoplay[aria-pressed="true"] .icon-play { display: block; }

.goal-panels { grid-area: panel; }
.goal-panel + .goal-panel { margin-top: 56px; }
.js .goal-panel + .goal-panel { margin-top: 0; }
.goal-panel[hidden] { display: none; }
.goal-panel.is-entering > * { animation: rise 0.8s var(--ease-out) both; }
.goal-panel.is-entering > :nth-child(2) { animation-delay: 0.06s; }
.goal-panel.is-entering > :nth-child(3) { animation-delay: 0.12s; }
.goal-panel.is-entering > :nth-child(4) { animation-delay: 0.16s; }
.goal-panel.is-entering > :nth-child(5) { animation-delay: 0.22s; }

.goal-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.05rem + 1.3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.goal-body { margin-top: 20px; color: var(--text-secondary); max-width: 46ch; text-wrap: pretty; }
.goal-sub {
  margin: 36px 0 0;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-secondary);
}
.goal-explore { margin-top: 14px; border-top: 1px solid var(--border-soft); }
.goal-panel-start .goal-explore { margin-top: 32px; }
.goal-explore li {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
  font-size: 0.9875rem;
}
.goal-explore li::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--brand-primary);
  transform: rotate(45deg);
}
.goal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }
.goal-actions .text-link { margin-top: 0; }

.section-goals .fine-print { margin-top: clamp(40px, 5vw, 64px); }

/* Goals grid (v3) — photo tiles that open out of the cube; on desktop each row expands toward the goal you choose.
   Mobile-first: static cards; the expanding rows start at 1100px. */
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pc-row { display: contents; }

.pc {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  isolation: isolate;
}
.pc-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.pc-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.pc-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.15rem + 0.7vw, 1.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.pc-summary { margin-top: 10px; color: var(--text-secondary); text-wrap: pretty; }
.pc-tags { display: none; }
.pc-text { display: none; }
.pc-explore {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px;
  margin-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.pc-explore li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9375rem; font-weight: 500;
}
.pc-explore li::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--brand-primary);
  transform: rotate(45deg);
}
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: auto; padding-top: 22px; }
.pc-link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  color: var(--brand-accent-text);
  font-weight: 600;
  border-radius: 999px;
  transition: background-color 0.35s var(--ease-out), color 0.35s, padding 0.45s var(--ease-out);
}
.pc-link .icon { transition: transform 0.3s var(--ease-out); }
.pc-link:hover .icon { transform: translateX(4px); }
.pc-consult {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--text-primary); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px;
}
.pc-consult:hover { text-decoration-color: var(--brand-accent-text); }

/* Entrance: each photo opens out of the cube's hexagon as its tile scrolls in
   (cards: the photo opens; desktop tiles: the whole tile opens, staggered across the row) */
@keyframes pc-open {
  0% { clip-path: polygon(50% 34%, 59% 42%, 59% 58%, 50% 66%, 41% 58%, 41% 42%); }
  40% { clip-path: polygon(50% 12%, 78% 30%, 78% 70%, 50% 88%, 22% 70%, 22% 30%); }
  100% { clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%, 0% 0%); }
}
@keyframes pc-photo-in { from { transform: scale(1.25); } }
.pc { --delay: 0ms; }
.js .pc:not(.is-in) .pc-photo { clip-path: polygon(50% 34%, 59% 42%, 59% 58%, 50% 66%, 41% 58%, 41% 42%); }
.js .pc:not(.is-in) .pc-body { opacity: 0; }
.pc.is-in .pc-photo { animation: pc-open 1.1s cubic-bezier(0.7, 0, 0.18, 1) var(--delay) backwards, pc-photo-in 1.6s var(--ease-out) var(--delay) backwards; }
.pc.is-in .pc-body { animation: rise 0.9s var(--ease-out) calc(var(--delay) + 450ms) backwards; }

/* Not sure where to start */
.pc-start {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.pc-start-photo {
  order: -1;
  width: 100%; height: 220px;
  object-fit: cover; object-position: 50% 40%;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
.pc-start-copy { padding: 8px 24px 32px; align-self: center; }
.pc-start-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -0.03em;
}
.pc-start-copy p { margin-top: 14px; color: var(--text-secondary); max-width: 50ch; }
.pc-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.pc-start-call { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.pc-start-call .icon { color: var(--brand-accent-text); }
.pc-start-call:hover { color: var(--brand-accent-text); }

@media (min-width: 640px) {
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 961px) {
  .pc-start { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 300px; }
  .pc-start-photo {
    order: 0; height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
  }
  .pc-start-copy { padding: clamp(36px, 4vw, 56px); }
}

@media (min-width: 1100px) {
  .pc-grid { grid-template-columns: minmax(0, 1fr); }
  .pc-row {
    --gap: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--gap);
    container-type: inline-size;
    transition: grid-template-columns 0.8s var(--ease-out);
    /* column widths as fractions of the row, used to lay content out at its final width */
    --rest: calc((100cqi - var(--gap) * 2) / 3);
    --open: calc((100cqi - var(--gap) * 2) * 0.6);
    --shut: calc((100cqi - var(--gap) * 2) * 0.2);
  }
  .pc-row[data-active="0"] { grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.6fr) minmax(0, 0.6fr); }
  .pc-row[data-active="1"] { grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.8fr) minmax(0, 0.6fr); }
  .pc-row[data-active="2"] { grid-template-columns: minmax(0, 0.6fr) minmax(0, 0.6fr) minmax(0, 1.8fr); }

  .pc {
    display: block;
    height: clamp(500px, 40vw, 560px);
    border: 0;
    background: transparent;
    --delay: calc(var(--i) * 90ms);
    /* the photo layer carries the cube-opening; the tile's shadow arrives once it has opened */
    transition: box-shadow 0.8s var(--ease-out) calc(var(--delay) + 700ms);
  }
  .pc.is-in { box-shadow: var(--shadow-lift); }
  .js .pc:not(.is-in) .pc-body { opacity: 0; }
  .pc-photo {
    position: absolute; inset: 0; z-index: -2;
    height: 100%; aspect-ratio: auto;
    transform: scale(1.06);
    filter: saturate(0.8) brightness(0.82);
    transition: transform 1.4s var(--ease-out), filter 0.8s var(--ease-out);
  }
  .pc::before, .pc::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    transition: opacity 0.7s var(--ease-out);
  }
  .pc::before { background: linear-gradient(180deg, rgba(11, 12, 14, 0) 28%, rgba(11, 12, 14, 0.72) 58%, rgba(11, 12, 14, 0.96) 100%); }
  .pc::after {
    background: linear-gradient(90deg, rgba(11, 12, 14, 0.94) 0%, rgba(11, 12, 14, 0.7) 40%, rgba(11, 12, 14, 0) 72%);
    opacity: 0;
  }

  .pc-body {
    position: absolute; left: 0; bottom: 0;
    width: var(--rest);
    padding: 30px 32px 32px;
    display: block;
  }
  .pc-title, .pc-summary { max-width: calc(var(--rest) - 64px); }
  .pc-title {
    font-size: clamp(1.55rem, 1rem + 0.9vw, 1.95rem);
    position: relative;
    transition: max-width 0s;
  }
  .pc-title::after {
    content: ""; display: block;
    width: 40px; height: 2px; margin-top: 16px;
    background: var(--brand-primary);
    transform: scaleX(0.4); transform-origin: left;
    transition: transform 0.6s var(--ease-out);
  }
  .pc-summary { margin-top: 14px; color: #D3D6D8; }
  .pc-tags {
    display: flex; flex-wrap: wrap; gap: 4px 16px;
    margin-top: 14px;
    font-size: 0.875rem; color: var(--text-secondary);
    max-height: 4em; overflow: hidden;
    transition: opacity 0.4s, max-height 0.6s var(--ease-out), margin-top 0.6s var(--ease-out);
  }
  .pc-tags li { display: inline-flex; align-items: center; gap: 8px; }
  .pc-tags li::before {
    content: ""; width: 5px; height: 5px; flex: none;
    background: var(--brand-primary);
    transform: rotate(45deg);
  }

  .pc-more {
    display: grid; grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.6s var(--ease-out), opacity 0.3s;
  }
  .pc-more-inner { overflow: hidden; min-height: 0; }
  .pc-text { display: block; margin-top: 18px; color: #D3D6D8; max-width: 52ch; }
  .pc-explore { margin-top: 20px; max-width: 520px; }
  .pc-explore li { font-size: 0.9375rem; }

  .pc-actions { margin-top: 0; padding-top: 20px; }
  .pc-consult { display: none; }

  /* Engaged row: one tile opens, its neighbours narrow and dim */
  .pc.is-active .pc-body { width: var(--open); }
  .pc.is-active .pc-photo { transform: scale(1); filter: none; }
  .pc.is-active::after { opacity: 1; }
  .pc.is-active .pc-title::after { transform: none; }
  .pc.is-active .pc-tags { opacity: 0; max-height: 0; margin-top: 0; }
  .pc.is-active .pc-more { grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 0.7s var(--ease-out) 0.1s, opacity 0.5s 0.25s; }
  .pc.is-active .pc-link {
    padding: 0 22px;
    background: var(--brand-primary);
    color: var(--text-on-brand);
  }
  .pc.is-active .pc-link:hover { background: var(--brand-primary-hover); }
  .pc.is-active .pc-consult { display: inline-flex; animation: rise 0.6s var(--ease-out) 0.3s backwards; }

  .pc-row.is-engaged .pc:not(.is-active) .pc-photo { filter: saturate(0.5) brightness(0.5); }
  .pc-row.is-engaged .pc:not(.is-active) .pc-body { width: var(--shut); padding-inline: 24px; }
  .pc-row.is-engaged .pc:not(.is-active) .pc-title { max-width: calc(var(--shut) - 48px); font-size: 1.3rem; }
  /* Opacity only: hidden links stay in the tab order, and focusing one opens its tile */
  .pc-row.is-engaged .pc:not(.is-active) :is(.pc-summary, .pc-tags, .pc-actions) { opacity: 0; }
  /* ...and they give up their space, so the narrowed title rests on the baseline */
  .pc-row.is-engaged .pc:not(.is-active) :is(.pc-summary, .pc-tags) { max-height: 0; margin-top: 0; overflow: hidden; }
  .pc-row.is-engaged .pc:not(.is-active) .pc-actions { position: absolute; left: 24px; bottom: 0; }
  .pc-summary { max-height: 6em; transition: opacity 0.35s, max-height 0.5s var(--ease-out), margin-top 0.5s var(--ease-out); }
  .pc-actions { transition: opacity 0.35s; }
}

@media (prefers-reduced-motion: reduce) {
  .js .pc:not(.is-in) .pc-photo { clip-path: none; }
  .js .pc:not(.is-in) .pc-body { opacity: 1; }
  .pc.is-in, .pc.is-in :is(.pc-photo, .pc-body) { animation: none; }
}

/* Method — the cube */
.section-method {
  background: var(--surface);
  border-block: 1px solid var(--border-soft);
}
.method {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 96px);
}
.method-visual { position: relative; }
.cube-wrap {
  position: sticky;
  top: calc(50vh - 200px);
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
/* The logo's three faces, shaded like a lit cube; the active face turns Brand Red and steps out along its own axis */
.cube { width: min(100%, 300px); height: auto; overflow: visible; }
.cube-face {
  fill-rule: evenodd;
  --lift: translate(0, 0);
  transform: var(--lift);
  transition: fill 0.6s var(--ease-out), transform 0.8s var(--ease-out);
}
.cube-face[data-face="0"] { fill: #41484D; }
.cube-face[data-face="1"] { fill: #353B40; }
.cube-face[data-face="2"] { fill: #2C3236; }
.cube-face[data-face="0"].is-active { --lift: translate(0, -7px); }
.cube-face[data-face="1"].is-active { --lift: translate(-6px, 3.5px); }
.cube-face[data-face="2"].is-active { --lift: translate(6px, 3.5px); }
.cube-face.is-active { fill: var(--brand-primary); }
.cube-legend { display: flex; gap: 24px; }
.cube-legend li {
  color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.3s;
}
.cube-legend li::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px;
  background: var(--border);
  transition: background-color 0.3s;
}
.cube-legend li.is-active { color: var(--text-primary); }
.cube-legend li.is-active::before { background: var(--brand-primary); }

.method-step {
  min-height: 62vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 40px;
  border-top: 1px solid var(--border-soft);
  transition: opacity 0.5s var(--ease-out);
}
.method-step:first-child { border-top: 0; min-height: 50vh; justify-content: flex-start; padding-top: 0; }
.js .method-step:not(.is-active) { opacity: 0.4; }
.step-label { color: var(--brand-accent-text); margin-bottom: 14px; }
.method-step > p { margin-top: 16px; color: var(--text-secondary); max-width: 56ch; }

.tick-list { display: grid; gap: 12px; margin-top: 24px; }
.tick-list li {
  position: relative;
  padding-left: 30px;
  font-size: 0.9875rem;
}
.tick-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.3em;
  width: 18px; height: 18px; border-radius: 999px;
  border: 1.5px solid var(--brand-accent-text);
}
.tick-list li::after {
  content: "";
  position: absolute; left: 6px; top: calc(0.3em + 5px);
  width: 7px; height: 4px;
  border-left: 1.5px solid var(--brand-accent-text);
  border-bottom: 1.5px solid var(--brand-accent-text);
  transform: rotate(-45deg);
}

/* Services */
.section-services { background: var(--background); }
.service-index { border-top: 1px solid var(--border); }
.service-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 1.6fr 220px 48px;
  gap: 32px;
  align-items: center;
  padding: 30px 8px;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background-color 0.3s;
}
.service-row:hover { background: var(--surface); }
.service-row > span:not(.service-go) { transition: transform 0.4s var(--ease-out); }
.service-row:hover > span:not(.service-go) { transform: translateX(14px); }
.service-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.service-desc { color: var(--text-secondary); font-size: 0.9875rem; max-width: 60ch; }
.service-tests { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.service-go {
  width: 48px; height: 48px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  transition: background-color 0.3s, border-color 0.3s;
}
.service-row:hover .service-go { background: var(--brand-primary); border-color: var(--brand-primary); }
.also-offered {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.also-offered a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
}
.also-offered a:hover { text-decoration-color: var(--brand-accent-text); }

/* Testing */
.section-testing { background: var(--surface); border-block: 1px solid var(--border-soft); }
.diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.diag-panel {
  background: var(--background);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column;
}
.diag-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.diag-icon {
  width: 52px; height: 52px; flex: none;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-raised);
  fill: none; stroke: var(--brand-accent-text); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.diag-panel > p { color: var(--text-secondary); max-width: 52ch; }
.measure-list {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.measure-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 500;
  display: flex; align-items: center; gap: 12px;
}
.measure-list li::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--brand-primary);
  transform: rotate(45deg);
}
.measure-list li:nth-child(odd) { padding-right: 16px; }
.diag-panel .text-link { margin-top: auto; padding-top: 28px; }

/* Team */
.section-team { background: var(--background); }
.team-layout {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}
.clinic-photo {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lift);
}
.clinic-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 74% 50%;
  filter: saturate(0.85);
}
.clinic-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 20, 0) 50%, rgba(16, 18, 20, 0.92) 100%);
}
.clinic-photo figcaption {
  position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 1;
  font-weight: 500; line-height: 1.5;
}
.team-copy .lead { margin-top: 20px; }
.provider-list { margin-top: 40px; border-top: 1px solid var(--border-soft); }
.provider {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.provider-photo {
  width: 56px; height: 56px; flex: none;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-family: var(--font-mark);
  font-weight: 600; font-size: 0.875rem; letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.provider-text { display: flex; flex-direction: column; }
.provider-name { font-weight: 600; font-size: 1.0625rem; }
.provider-role { color: var(--text-secondary); font-size: 0.9375rem; }

/* Testimonials */
.section-voices { background: var(--surface); border-block: 1px solid var(--border-soft); }
.quote-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}
.quote {
  margin: 0;
  background: var(--background);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 40px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.quote blockquote { margin: 0; }
.quote p { font-size: 1.125rem; line-height: 1.55; }
.quote-feature { grid-row: span 2; }
.quote-feature p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.quote figcaption { display: flex; flex-direction: column; }
.quote-name { font-weight: 700; }
.quote-meta { color: var(--text-secondary); font-size: 0.875rem; }

/* Programs */
.section-programs { background: var(--background); }
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.program {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 24px;
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}
.program:hover { border-color: var(--border); transform: translateY(-3px); }
.program-featured {
  background: var(--surface-raised);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lift);
}
.program-featured:hover { border-color: var(--brand-primary); }
.program-flag {
  position: absolute; top: -12px; left: 32px;
  background: var(--brand-primary); color: var(--text-on-brand);
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.6875rem;
}
.program-name { font-size: 1.375rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.program-desc { margin-top: 10px; color: var(--text-secondary); font-size: 0.9375rem; }
.program-price { display: flex; align-items: baseline; gap: 10px; }
.price {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em;
}
.price[data-placeholder] { color: var(--text-secondary); }
.price-unit { color: var(--text-secondary); font-size: 0.9375rem; }
.program .tick-list { margin-top: 0; padding-top: 24px; border-top: 1px solid var(--border-soft); }

/* FAQ */
.section-faq { background: var(--surface); border-block: 1px solid var(--border-soft); }
.faq-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.faq-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.faq-intro p { margin-top: 20px; color: var(--text-secondary); }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #fff; }
.faq-icon {
  position: relative; width: 32px; height: 32px; flex: none;
  border: 1px solid var(--border); border-radius: 999px;
  transition: background-color 0.3s, border-color 0.3s;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease-out);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--brand-primary); border-color: var(--brand-primary); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-body { padding: 0 56px 28px 0; color: var(--text-secondary); max-width: 68ch; }

/* Consult */
.section-consult {
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, rgba(40, 45, 49, 0.9), rgba(16, 18, 20, 0) 70%),
    var(--background);
}
.consult-layout {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}
.consult-copy .lead { margin-top: 24px; }
.contact-points { margin-top: 40px; display: grid; gap: 18px; }
.contact-points li { display: flex; gap: 14px; align-items: center; color: var(--text-secondary); }
.contact-points .icon { color: var(--brand-accent-text); width: 22px; height: 22px; }
.contact-points strong { color: var(--text-primary); font-weight: 600; }

.consult-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-lift);
}
.form-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 24px; }
.consult-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); padding: 0; }
.field legend { margin-bottom: 8px; }
.field input, .field select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:hover, .field select:hover { border-color: #5A6167; }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(230, 91, 73, 0.25);
}
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--text-secondary); border-bottom: 1.5px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field select option { background: var(--surface); }
.field-error {
  display: none;
  font-size: 0.8125rem; color: var(--brand-accent-text);
  align-items: center; gap: 6px;
}
.field-error::before {
  content: "!"; flex: none;
  width: 16px; height: 16px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--brand-accent-text); color: var(--background);
  font-size: 0.6875rem; font-weight: 700;
}
.field.is-invalid .field-error { display: flex; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--brand-accent-text); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.seg input:checked + span { border-color: var(--text-primary); color: var(--text-primary); background: var(--surface-raised); }
.seg input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.consult-form .btn { margin-top: 6px; }
.spinner {
  display: none;
  width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.is-loading .spinner { display: block; }
.is-loading { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { color: var(--brand-accent-text); font-size: 0.875rem; }
.consent { font-size: 0.75rem; line-height: 1.55; color: var(--text-secondary); }

.form-success { text-align: left; outline: none; }
.form-success p { color: var(--text-secondary); }
.success-cube { width: 64px; height: 64px; margin-bottom: 24px; }
.success-cube polygon { fill: var(--surface-raised); stroke: var(--border); }
.success-cube polygon:nth-child(1) { fill: var(--brand-primary); stroke: var(--brand-primary); animation: face 0.5s var(--ease-out) both; }
.success-cube polygon:nth-child(2) { animation: face2 0.5s 0.15s var(--ease-out) both; }
.success-cube polygon:nth-child(3) { animation: face2 0.5s 0.3s var(--ease-out) both; }
@keyframes face { from { fill: var(--surface-raised); } }
@keyframes face2 { to { fill: var(--brand-primary); stroke: var(--brand-primary); } }

/* Footer */
.site-footer { background: #0B0C0E; border-top: 1px solid var(--border-soft); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 48px; }
.footer-brand p { margin-top: 20px; color: var(--text-secondary); max-width: 32ch; }
.social { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--text-secondary); font-weight: 500; }
.social:hover { color: var(--text-primary); }
.footer-head { color: var(--text-secondary); margin-bottom: 18px; font-size: 0.6875rem; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--text-primary); transition: color 0.2s; }
.footer-col a:hover { color: var(--brand-accent-text); }
.footer-col address { line-height: 1.8; }
.footer-hours { margin-top: 12px; color: var(--text-secondary); }
.footer-legal {
  margin-top: 64px; padding-top: 28px; padding-bottom: 40px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: 32px;
  font-size: 0.8125rem; color: var(--text-secondary);
}
.footer-legal p:first-child { max-width: 70ch; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }

.mobile-cta { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .primary-nav, .header-phone span { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 1199px) {
  .goals {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: "list frame" "list panel";
    row-gap: 40px;
  }
  .goal-frame { aspect-ratio: 16 / 11; }
  .goal-list { grid-row: 1 / span 2; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }
}

@media (max-width: 960px) {
  .goals-head { grid-template-columns: 1fr; }
  .goals {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "list" "frame" "panel";
    row-gap: 28px;
  }
  .goal-list {
    grid-row: auto; position: static;
    display: flex; gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter);
    border-top: 0;
    scroll-padding-inline: var(--gutter);
  }
  .goal-list::-webkit-scrollbar { display: none; }
  .goal-tab, .goal-tab-start {
    flex: none; width: auto;
    grid-template-columns: 14px auto;
    gap: 10px;
    margin: 0;
    padding: 11px 18px 11px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    scroll-snap-align: start;
    color: var(--text-secondary);
  }
  .goal-name, .goal-tab-start .goal-name {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .goal-tab:hover .goal-name, .goal-tab[aria-selected="true"] .goal-name { transform: none; }
  .goal-tab[aria-selected="true"] { background: var(--surface-raised); border-color: var(--text-secondary); }
  .goal-mark { width: 14px; height: 14px; }
  .goal-arrow { display: none; }
  .goal-frame { aspect-ratio: 4 / 3; }
  .goal-caption { display: none; }
  .goal-body { max-width: 60ch; }
}

@media (max-width: 960px) {
  .split, .team-layout, .consult-layout, .faq-layout, .section-head-row { grid-template-columns: 1fr; }
  .section-head-row { gap: 20px; }
  .faq-intro { position: static; }
  .method { grid-template-columns: 1fr; }
  .method-visual { display: none; }
  .method-step, .method-step:first-child { min-height: 0; padding-block: 36px; }
  .method-step:first-child { padding-top: 0; }
  .js .method-step:not(.is-active) { opacity: 1; }
  .service-row { grid-template-columns: 1fr 48px; gap: 12px 24px; }
  .service-name { grid-column: 1; }
  .service-desc { grid-column: 1; }
  .service-tests { grid-column: 1; justify-content: flex-start; }
  .service-go { grid-column: 2; grid-row: 1 / span 3; }
  .diag-grid, .program-grid { grid-template-columns: 1fr; }
  .program-grid { max-width: 560px; margin-inline: auto; gap: 28px; }
  .program-featured { order: -1; }
  .quote-grid { grid-template-columns: 1fr; }
  .quote-feature { grid-row: auto; }
  .clinic-photo { aspect-ratio: 16 / 11; }
  .clinic-photo img { object-position: 74% 70%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .header-actions .btn { display: none; }
  .brand-mark { width: 32px; height: 34px; }
  .brand-mark img { height: 34px; }
  .brand-name { font-size: 1rem; }
  .hero { min-height: 100svh; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(16, 18, 20, 0.7) 0%, rgba(16, 18, 20, 0.72) 45%, rgba(16, 18, 20, 0.97) 100%);
  }
  .hero-inner { align-items: flex-end; padding-top: calc(var(--header-h) + 32px); padding-bottom: 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .video-toggle { top: calc(var(--header-h) + 12px); bottom: auto; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-item, .proof-item + .proof-item { padding: 16px 0; border-left: 0; }
  .proof-item + .proof-item { border-top: 1px solid rgba(66, 72, 77, 0.7); }
  .proof-item p { max-width: none; font-size: 0.9375rem; }
  .readout-list li { grid-template-columns: 1fr; gap: 2px; padding: 16px 20px; }
  .readout-head, .readout-foot { padding-inline: 20px; }
  .service-row:hover > span:not(.service-go) { transform: none; }
  .measure-list { grid-template-columns: 1fr; }
  .goal-actions .btn { width: 100%; }
  .goal-actions { justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-legal { flex-direction: column; gap: 12px; padding-bottom: 104px; }
  .faq-body { padding-right: 0; }

  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: auto 1fr; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(16, 18, 20, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    transform: translateY(110%);
    transition: transform 0.4s var(--ease-out);
  }
  .mobile-cta.is-visible { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
