/* Club REV: styles follow Brand Guide v0.2.
   Palette ratio target: Ivory 48 / Graphite 27 / Oxblood 18 / Slate 5 / Stone 2.
   Never: oxblood text on graphite, slate on oxblood, stone text on ivory. */
:root {
  --rev-oxblood: #572A35;
  --rev-ivory: #F5F0EA;
  --rev-graphite: #242327;
  --rev-slate: #59666B;
  --rev-stone: #D9CDC8;
  --rev-serif: 'Newsreader', Georgia, serif;
  --rev-sans: 'DM Sans', Arial, sans-serif;

  /* Surface the approved wordmark artwork sits on (matches the artwork's own canvas). */
  --rev-logo-field: #FEFDFA;

  /* 8px spacing scale; 6-12px radii for functional UI. */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px; --s12: 96px;
  --radius: 6px;
  --radius-lg: 12px;
  --max: 1120px;
  --gutter: clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rev-ivory);
  color: var(--rev-graphite);
  font-family: var(--rev-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
p { margin: 0 0 var(--s2); }

/* Editorial: Newsreader. Utility: DM Sans. */
h1, h2, h3 { font-family: var(--rev-serif); font-weight: 400; color: var(--rev-graphite); margin: 0 0 var(--s2); }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; font-weight: 400; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; line-height: 1.2; font-weight: 500; }

.eyebrow {
  font-family: var(--rev-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rev-oxblood);
  margin-bottom: var(--s3);
}
.lead { font-size: 1.125rem; color: var(--rev-slate); max-width: 560px; line-height: 1.65; }
.muted { color: var(--rev-slate); }
.small { font-size: 0.875rem; }

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

/* Staging banner: graphite field, ivory text (13.78:1) */
.staging-bar {
  background: var(--rev-graphite);
  color: var(--rev-ivory);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px var(--gutter);
}

/* Header: light field so the original wordmark is shown unmodified on its approved surface */
.site-header {
  background: var(--rev-logo-field);
  border-bottom: 1px solid var(--rev-stone);
}
.site-header-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s1) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.wordmark { display: block; line-height: 0; padding: var(--s1) 0; }
.wordmark img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.nav a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rev-graphite);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--rev-stone); }
.nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--rev-oxblood); }

/* Buttons: DM Sans 500-600, 6px radius. Oxblood is the signature CTA. */
.btn {
  display: inline-block;
  font-family: var(--rev-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--rev-oxblood);
  background: var(--rev-oxblood);
  color: var(--rev-ivory);
  cursor: pointer;
}
.btn:hover { background: #46212a; border-color: #46212a; }
.btn.outline { background: transparent; color: var(--rev-oxblood); }
.btn.outline:hover { background: var(--rev-oxblood); color: var(--rev-ivory); }
.btn.sm { padding: 10px 18px; font-size: 0.875rem; }

main > section { padding: var(--s12) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }

/* Hero */
.hero { padding-top: calc(var(--s12) + var(--s2)); padding-bottom: calc(var(--s12) + var(--s2)); }
.hero h1 { max-width: 11ch; }
.hero .lead { margin-top: var(--s3); max-width: 440px; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s5); }

/* Three-pillar row, ruled in stone */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--s5); }
.pillar { border-top: 1px solid var(--rev-oxblood); padding-top: var(--s2); }
.pillar .eyebrow { margin-bottom: var(--s2); }
.pillar h3 { margin-bottom: var(--s1); }
.pillar p:last-child { margin-bottom: 0; }
.pillar p { color: var(--rev-slate); }
.pillar p.eyebrow { color: var(--rev-oxblood); }
.pillar p.eyebrow { font-size: 1.25rem; letter-spacing: 0.12em; }

.rule-top { border-top: 1px solid var(--rev-stone); }

/* Dark field band: ivory text only (slate on graphite fails contrast) */
.band-dark { background: var(--rev-graphite); color: var(--rev-ivory); }
.band-dark h2, .band-dark h3 { color: var(--rev-ivory); }
.band-dark .eyebrow { color: var(--rev-stone); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s4); }
.steps li { counter-increment: s; border-top: 1px solid var(--rev-stone); padding-top: var(--s2); }
.steps li::before { content: "0" counter(s); display: block; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.16em; color: var(--rev-stone); margin-bottom: var(--s1); }
.steps strong { display: block; font-family: var(--rev-serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; margin-bottom: var(--s1); }
.steps span { color: var(--rev-ivory); }

/* Photography bands */
main > section.photo-section { padding-top: var(--s4); padding-bottom: var(--s4); }
.photo-band { margin: 0; aspect-ratio: 21 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--rev-stone); }
.photo-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.band-oxblood.has-photo { background: linear-gradient(rgba(87, 42, 53, .86), rgba(87, 42, 53, .86)), url('/img/cta-leaves.jpg') center / cover no-repeat, var(--rev-oxblood); }

/* Oxblood signature band: ivory text only */
.band-oxblood { background: var(--rev-oxblood); color: var(--rev-ivory); text-align: center; }
.band-oxblood .eyebrow { color: var(--rev-ivory); }
.band-oxblood h2 { color: var(--rev-ivory); max-width: 16ch; margin-left: auto; margin-right: auto; }
.band-oxblood p { color: var(--rev-ivory); max-width: 480px; margin-left: auto; margin-right: auto; }
.band-oxblood .btn { background: var(--rev-ivory); color: var(--rev-oxblood); border-color: var(--rev-ivory); margin-top: var(--s2); }
.band-oxblood .btn:hover { background: var(--rev-stone); border-color: var(--rev-stone); }
.band-oxblood :focus-visible, .band-dark :focus-visible { outline-color: var(--rev-ivory); }

/* Inner page heads */
.page-head { padding-bottom: var(--s6); }
.page-head h1 { max-width: 14ch; }
.page-head .lead { margin-top: var(--s2); }
main > section.page-head + section { padding-top: var(--s4); }

/* Service cards: ruled, not boxed */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--s5) var(--s6); }
.card { border-top: 1px solid var(--rev-stone); padding-top: var(--s3); }
.card .eyebrow { margin-bottom: var(--s1); }
.card p { color: var(--rev-slate); margin-bottom: 0; }
.group-title { margin-bottom: var(--s4); }
.group + .group { margin-top: var(--s8); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--s8); }
.split h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 12px 0; border-bottom: 1px solid var(--rev-stone); }
.ticks li:first-child { border-top: 1px solid var(--rev-stone); }


/* Forms: DM Sans; slate borders give controls 3:1+ (stone alone fails) */
.form { display: grid; gap: var(--s3); align-content: start; }
.form label { display: grid; gap: 6px; font-size: 0.9375rem; font-weight: 500; color: var(--rev-graphite); }
.form input, .form select {
  font: inherit;
  font-weight: 400;
  color: var(--rev-graphite);
  background: var(--rev-ivory);
  border: 1px solid var(--rev-slate);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 48px;
}
.form .btn { justify-self: start; }
.details h2 { font-size: 1.5rem; font-family: var(--rev-serif); margin-top: var(--s3); }
.details h2:first-child { margin-top: 0; }

/* Footer */
.site-footer { background: var(--rev-graphite); color: var(--rev-ivory); padding: var(--s8) var(--gutter); }
.site-footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s5); }
.site-footer .footer-name { font-family: var(--rev-serif); font-size: 1.75rem; line-height: 1.2; margin: 0 0 var(--s1); }
.site-footer .footer-pillars { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rev-stone); margin-bottom: var(--s2); }
.site-footer p { color: var(--rev-ivory); }
.site-footer .fine { font-size: 0.875rem; color: var(--rev-stone); margin-bottom: var(--s1); }

/* ---------- Additions: imagery, membership, estimator, motion ---------- */
.band-ivory-2 { background: color-mix(in srgb, var(--rev-ivory) 80%, var(--rev-stone)); }
textarea { font: inherit; }
.form textarea {
  font: inherit; font-weight: 400; color: var(--rev-graphite); background: var(--rev-ivory);
  border: 1px solid var(--rev-slate); border-radius: var(--radius); padding: 12px 14px; resize: vertical;
}
.form h2 { font-size: 1.75rem; margin-bottom: 0; }

.site-header { position: sticky; top: 0; z-index: 20; transition: box-shadow .2s ease; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--rev-stone), 0 8px 24px rgba(36, 35, 39, .06); }
.nav-toggle { display: none; font: inherit; font-weight: 600; font-size: .875rem; color: var(--rev-oxblood); background: transparent; border: 1px solid var(--rev-oxblood); border-radius: var(--radius); padding: 9px 16px; cursor: pointer; }

/* Hero with image */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s8); align-items: center; }
.hero-art { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { max-width: 9ch; }

/* Program tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s4); margin-top: var(--s5); }
.tile { text-decoration: none; display: block; }
.tile-img { display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--s2); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-title { display: block; font-family: var(--rev-serif); font-size: 1.75rem; line-height: 1.15; margin-bottom: 6px; }
.tile-text { display: block; color: var(--rev-slate); }
.tile:hover .tile-title { text-decoration: underline; text-decoration-color: var(--rev-oxblood); text-underline-offset: 6px; }

/* Services group heads */
.group-head { display: grid; grid-template-columns: 1fr 220px; gap: var(--s5); align-items: end; margin-bottom: var(--s5); }
.group-head .lead { margin-bottom: 0; }
.group-art { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; }
.group-art img { width: 100%; height: 100%; object-fit: cover; }
.group-title { margin-bottom: var(--s1); }
.group { scroll-margin-top: 96px; }

/* Prices and memberships */
.tier-price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 var(--s1); }
.tier-price > span { font-family: var(--rev-serif); font-size: 2.75rem; line-height: 1; color: var(--rev-graphite); }
.tier-price small { font-size: .875rem; color: var(--rev-slate); font-weight: 500; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: var(--s4); align-items: stretch; }
.tier { display: flex; flex-direction: column; border: 1px solid var(--rev-stone); border-top: 3px solid var(--rev-oxblood); border-radius: var(--radius-lg); padding: var(--s4); scroll-margin-top: 96px; }
.tier .eyebrow { margin-bottom: var(--s1); }
.tier-blurb { color: var(--rev-slate); margin-top: var(--s2); }
.tier-lead { font-weight: 600; font-size: .9375rem; margin-bottom: var(--s1); }
.checks { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.checks li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--rev-stone); font-size: .9375rem; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 11px; height: 6px; border-left: 2px solid var(--rev-oxblood); border-bottom: 2px solid var(--rev-oxblood); transform: rotate(-45deg); }
.tier .btn { display: block; margin-top: auto; }
.price-tag { font-weight: 600; color: var(--rev-oxblood); margin-bottom: var(--s1) !important; }
.deal { display: inline-block; margin-left: 8px; padding: 2px 10px; border: 1px solid var(--rev-oxblood); border-radius: 999px; font-size: .75rem; font-weight: 600; }
.card .price-tag { color: var(--rev-oxblood); }
.tier-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s3); margin: var(--s5) 0; }
.tier-mini-card { display: block; text-decoration: none; border: 1px solid var(--rev-stone); border-radius: var(--radius-lg); padding: var(--s3); transition: border-color .2s ease, transform .2s ease; }
.tier-mini-card:hover { border-color: var(--rev-oxblood); transform: translateY(-2px); }
.tier-mini-card > * { display: block; }
.tier-mini-card .tier-price { display: flex; }
.consult-strip { padding-top: 0 !important; padding-bottom: var(--s5) !important; }
.consult-strip .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s4); align-items: center; border-top: 1px solid var(--rev-oxblood); border-bottom: 1px solid var(--rev-stone); padding: var(--s4) 0; }
.consult-strip h3 { margin-bottom: 4px; }
.consult-strip p { margin: 0; color: var(--rev-slate); }
.consult-price { margin: 0 !important; font-family: var(--rev-serif); color: var(--rev-graphite) !important; }
.consult-price strong { font-size: 2.5rem; font-weight: 400; }
.consult-price span { font-family: var(--rev-sans); font-size: .875rem; color: var(--rev-slate); }

/* Estimator */
.builder-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--s5); margin-top: var(--s5); align-items: start; }
.builder-form fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.builder-form legend { font-weight: 600; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--rev-oxblood); margin-bottom: var(--s2); padding: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--rev-slate); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; background: var(--rev-ivory); }
.choice:has(input:checked) { border-color: var(--rev-oxblood); box-shadow: inset 0 0 0 1px var(--rev-oxblood); }
.choice input { margin-top: 4px; accent-color: var(--rev-oxblood); width: 18px; height: 18px; }
.choice span, .qty label { display: block; font-weight: 500; }
.choice small, .qty small { display: block; font-weight: 400; color: var(--rev-slate); font-size: .875rem; }
.qty { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 12px 16px; border: 1px solid var(--rev-slate); border-radius: var(--radius); margin-bottom: 10px; background: var(--rev-ivory); }
.qty input { width: 76px; min-height: 44px; text-align: center; font: inherit; color: var(--rev-graphite); background: var(--rev-ivory); border: 1px solid var(--rev-slate); border-radius: var(--radius); }
.builder-summary { position: sticky; top: 104px; background: var(--rev-graphite); color: var(--rev-ivory); border-radius: var(--radius-lg); padding: var(--s4); }
.builder-summary h3 { color: var(--rev-ivory); margin-bottom: var(--s2); }
.lines { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: var(--s2); padding: 10px 0; border-top: 1px solid var(--rev-stone); font-size: .9375rem; }
.lines li.muted { color: var(--rev-stone); }
.totals { margin: 0 0 var(--s2); }
.totals div { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rev-stone); }
.totals dt { font-size: .9375rem; }
.totals dd { margin: 0; font-family: var(--rev-serif); font-size: 1.75rem; line-height: 1.1; }
.builder-summary .muted, .builder-summary .small { color: var(--rev-stone); }
.builder-summary .btn { display: block; background: var(--rev-ivory); color: var(--rev-oxblood); border-color: var(--rev-ivory); margin-top: var(--s2); }
.builder-summary .btn:hover { background: var(--rev-stone); border-color: var(--rev-stone); }
.builder-summary :focus-visible { outline-color: var(--rev-ivory); }

/* FAQ */
.faq { max-width: 760px; margin-top: var(--s4); }
.faq details { border-top: 1px solid var(--rev-stone); padding: var(--s2) 0; }
.faq details:last-child { border-bottom: 1px solid var(--rev-stone); }
.faq summary { cursor: pointer; font-family: var(--rev-serif); font-size: 1.375rem; line-height: 1.25; list-style: none; display: flex; justify-content: space-between; gap: var(--s2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--rev-sans); font-size: 1.5rem; line-height: 1; color: var(--rev-oxblood); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: var(--s1) 0 0; color: var(--rev-slate); }

/* Physician */
.physician { display: grid; grid-template-columns: 320px 1fr; gap: var(--s6); align-items: center; }
.physician-bio { align-items: start; }
.physician-bio .physician-photo { position: sticky; top: 112px; }
#physician { scroll-margin-top: 80px; }
.physician-photo { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--rev-stone); }
.physician-photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: var(--s2); font-size: .8125rem; font-weight: 500; color: var(--rev-slate); background: color-mix(in srgb, var(--rev-ivory) 70%, var(--rev-stone)); }
.alert { border-left: 3px solid var(--rev-oxblood); padding: 12px 16px; margin: 0 0 var(--s5); background: color-mix(in srgb, var(--rev-ivory) 80%, var(--rev-stone)); }
.footer-address { font-style: normal; color: var(--rev-ivory); margin-bottom: var(--s2); }
.physician-photo img { object-position: center top; }
.details a { color: var(--rev-oxblood); font-weight: 500; text-underline-offset: 3px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-top: var(--s3); }
.footer-nav a { color: var(--rev-ivory); font-size: .9375rem; }

/* Motion (only when the script has run; respects reduced motion) */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid, .physician, .builder-grid, .consult-strip .wrap { grid-template-columns: 1fr; }
  .hero-art { aspect-ratio: 4 / 3; }
  .photo-band { aspect-ratio: 4 / 3; }
  .physician-photo { max-width: 320px; }
  .physician-bio .physician-photo { position: static; }
  .builder-summary { position: static; }
  .group-head { grid-template-columns: 1fr; }
  .group-art { display: none; }
  .consult-strip .wrap { gap: var(--s2); }
}

@media (max-width: 760px) {
  .nav { gap: 12px 20px; flex-wrap: wrap; }
  .js .nav-toggle { display: inline-block; }
  .js .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 var(--s2); }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rev-stone); font-size: 1rem; }
  .js .nav .btn.sm { margin-top: var(--s2); padding: 13px 18px; font-size: .9375rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: clamp(2.375rem, 11vw, 3rem); }
  h2 { font-size: clamp(1.875rem, 8vw, 2.25rem); }
  main > section { padding-top: var(--s8); padding-bottom: var(--s8); }
  .hero { padding-top: var(--s6); padding-bottom: var(--s8); }
  .wordmark img { height: 44px; }
  .split { gap: var(--s6); }
  .tier { padding: var(--s3); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  .tile-img img, .tier-mini-card { transition: none; }
}

/* Never let form controls or grid children force horizontal overflow on narrow screens */
.form, .form label, .split > *, .cards > *, .tiers > *, .builder-grid > * { min-width: 0; }
.form input, .form select, .form textarea { width: 100%; min-width: 0; }
