/* ============================================================
   RIVĒ LUME — components.css
   Every component from Section 9 of the handoff.
   ============================================================ */

/* ============================================================
   Type styles
   ============================================================ */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--taupe);
  line-height: 1.4;
}

.section--mid .eyebrow {
  color: var(--charcoal);
}

.section--dark .eyebrow,
.section--alt .eyebrow,
.on-dark .eyebrow {
  color: var(--warm-accent);
}

.display-hero {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.1;
}

@media (min-width: 1024px) {
  .display-hero {
    font-size: 99px;
  }
}

.heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.25;
  color: var(--noir);
}
.section--dark .heading,
.section--alt .heading,
.on-dark .heading {
  /* Rule sheet: headlines on dark grounds use off-white, never pure white. */
  color: var(--off-white);
}

@media (min-width: 1024px) {
  .heading {
    font-size: var(--text-4xl);
  }
}

.subhead {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.35;
}

@media (min-width: 1024px) {
  .subhead {
    font-size: var(--text-2xl);
  }
}

.subhead--italic {
  font-style: italic;
}

.lead {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.6;
}

.body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
}

.caption {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--taupe);
}

.price {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 200;
  letter-spacing: 0.04em;
  color: var(--charcoal);
}

.section--dark .price,
.section--alt .price,
.on-dark .price {
  color: var(--warm-accent);
}

/* ============================================================
   Wordmark
   ============================================================ */

.wordmark {
  font-family: var(--font-display);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
  display: inline-block;
}

.lockup {
  display: inline-flex;
  align-items: stretch;
  gap: var(--space-4);
}

.lockup__rule {
  width: 1px;
  background: var(--warm-gray);
  align-self: stretch;
  flex-shrink: 0;
}

.section--dark .lockup__rule,
.section--alt .lockup__rule,
.on-dark .lockup__rule {
  background: rgba(255, 255, 255, 0.4);
}

.lockup__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lockup__tagline {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: 0.4em;
}

/* ============================================================
   Section container
   ============================================================ */

.section {
  padding-block: var(--space-10);
  background: var(--off-white);
  color: var(--charcoal);
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--space-13);
  }
}

/* Tighten vertical rhythm where two sections sit directly adjacent
   so the seam reads as a single shared band of breathing room
   rather than the sum of two padding allotments. */
.section + .section {
  padding-top: var(--space-8);
}
@media (min-width: 1024px) {
  .section + .section {
    padding-top: var(--space-10);
  }
}

/* When the next section is a quieter mid-tone (light-on-light shift),
   collapse the seam further so the transition reads as a tonal step
   rather than two separate sections meeting. */
.section:has(+ .section--mid) {
  padding-bottom: var(--space-7);
}
.section + .section--mid {
  padding-top: var(--space-9);
}
@media (min-width: 1024px) {
  .section:has(+ .section--mid) {
    padding-bottom: 176px;
  }
  .section + .section--mid {
    padding-top: var(--space-11);
  }
}

.section--dark {
  background: var(--noir);
  color: var(--white);
}

.section--alt {
  background: var(--warm-dark);
  color: var(--white);
}

.section--mid {
  background: var(--warm-deep);
  color: var(--charcoal);
}

.section--light {
  background: var(--off-white);
  color: var(--charcoal);
}

.section--mid .service-card {
  border-bottom-color: var(--off-white);
}

.section--cream {
  background: var(--cream);
  color: var(--charcoal);
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.content-narrow { max-width: var(--content-narrow); }
.content-medium { max-width: var(--content-medium); }
.content-full   { max-width: var(--content-full); }

/* ============================================================
   Divider
   ============================================================ */

.divider {
  height: 1px;
  width: 100%;
  background: var(--soft-line);
  border: 0;
}

.section--dark .divider,
.section--alt .divider,
.on-dark .divider {
  background: var(--divider-dark);
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  z-index: 100;
  display: flex;
  align-items: center;
  /* Default state: transparent over the hero. The .is-scrolled
     class (added by nav.js after ~80vh of scroll) layers in the
     dark backdrop. */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--white);
  transition: background-color var(--dur-hover) var(--ease-out),
              backdrop-filter var(--dur-hover) var(--ease-out),
              -webkit-backdrop-filter var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out);
  border-bottom: 1px solid transparent;
}

@media (min-width: 1024px) {
  .nav { height: 72px; }
}

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom-color: var(--divider-dark);
}

/* For the style guide demo, we force the solid state */
.nav--demo {
  position: relative;
  background: var(--noir);
  border-bottom-color: var(--divider-dark);
}

.nav__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
}

.nav__links {
  display: none;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--white);
  padding-block: var(--space-2);
  transition: opacity var(--dur-link) var(--ease-out);
}

.nav__link:hover { opacity: 0.6; }

.nav__hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
  padding: var(--space-2) 0;
  background: transparent;
}

@media (min-width: 768px) {
  .nav__hamburger { display: none; }
}

.nav__hamburger span {
  display: block;
  height: 1px;
  background: var(--white);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--font-display-normal);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 16px 32px;
  border: 1px solid transparent;
  background: transparent;
  color: currentColor;
  transition: background-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
  text-align: center;
  cursor: pointer;
  line-height: 1;
}

.btn + .btn { margin-left: var(--space-3); }

/* Primary */
.btn--primary {
  background: var(--noir);
  color: var(--white);
  border-color: var(--noir);
}
.btn--primary:hover,
.btn--primary.is-hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
}

/* Primary on dark: noir-on-noir disappears.
   Use warm-dark as default so the button reads against the section,
   hover lifts one step further to the light edge of the dark palette. */
.section--dark .btn--primary,
.section--alt .btn--primary,
.on-dark .btn--primary,
.btn-cell--dark .btn--primary {
  background: var(--warm-dark);
  border-color: var(--warm-dark);
  color: var(--white);
}
.section--dark .btn--primary:hover,
.section--dark .btn--primary.is-hover,
.section--alt .btn--primary:hover,
.section--alt .btn--primary.is-hover,
.on-dark .btn--primary:hover,
.on-dark .btn--primary.is-hover,
.btn-cell--dark .btn--primary:hover,
.btn-cell--dark .btn--primary.is-hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--noir);
}

/* Ghost on dark */
.btn--ghost-dark {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--ghost-dark:hover,
.btn--ghost-dark.is-hover {
  background: var(--white);
  color: var(--noir);
}

/* Ghost on light */
.btn--ghost-light {
  background: transparent;
  color: var(--noir);
  border-color: var(--noir);
}
.btn--ghost-light:hover,
.btn--ghost-light.is-hover {
  background: var(--noir);
  color: var(--white);
}

/* Solid light — a white block with dark text. Used by the site nav
   CTA so ENQUIRE reads as a positive button against the dark video. */
.btn--solid-light {
  background: var(--white);
  color: var(--noir);
  border-color: transparent;
}
.btn--solid-light:hover,
.btn--solid-light.is-hover {
  background: var(--off-white);
  color: var(--noir);
  border-color: transparent;
}

/* Full-width on mobile only */
@media (max-width: 767px) {
  .btn--block-mobile {
    display: block;
    width: 100%;
  }
}

/* ============================================================
   Inline link
   ============================================================ */

.link-inline {
  display: inline;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity var(--dur-link) var(--ease-out);
}
.link-inline:hover { opacity: 0.6; }

/* ============================================================
   Form fields
   ============================================================ */

.field {
  display: block;
  margin-bottom: var(--space-6);
}

.field__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--taupe);
  margin-bottom: var(--space-3);
}

.section--dark .field__label,
.section--alt .field__label,
.on-dark .field__label {
  color: var(--warm-accent);
}

.field__input,
.field__textarea,
.field__select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--charcoal);
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  transition: border-color var(--dur-hover) var(--ease-out),
              border-width var(--dur-hover) var(--ease-out);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.field__textarea {
  /* Auto-grows with content (see scripts/form.js). Start one line tall so
     the underline sits right beneath the text, then expand downward. */
  min-height: calc(1.6em + 24px);
  /* Auto-grows via JS, but keep the resize grabber as a visible
     "expandable" affordance. */
  resize: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--light-warm);
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus,
.field__input.is-focus,
.field__textarea.is-focus,
.field__select.is-focus {
  outline: none;
  border-bottom: 2px solid var(--noir);
  padding-bottom: 11px; /* compensate for thicker border */
}

/* Error state — no red; use charcoal + meta text */
.field.is-error .field__input,
.field.is-error .field__textarea,
.field.is-error .field__select {
  border-bottom-color: var(--charcoal);
  border-bottom-width: 2px;
  padding-bottom: 11px;
}

.field__error {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--taupe);
}

/* Select arrow */
.field__select-wrap {
  position: relative;
}

.field__select {
  padding-right: 24px;
  cursor: pointer;
}

.field__select-wrap::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--charcoal);
  border-bottom: 1px solid var(--charcoal);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* Checkbox and radio */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--charcoal);
  line-height: 1.5;
  padding-block: var(--space-2);
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--soft-line);
  background: transparent;
  margin-top: 2px;
  position: relative;
  cursor: pointer;
  transition: border-color var(--dur-hover) var(--ease-out),
              background-color var(--dur-hover) var(--ease-out);
}

.check input[type="radio"] {
  /* kept square per handoff — "squares, not rounded" */
  border-radius: 0;
}

.check input:checked {
  background: var(--noir);
  border-color: var(--noir);
}

.check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(45deg);
}

.check input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  background: var(--white);
}

.check input:focus-visible {
  outline: 2px solid var(--warm-accent);
  outline-offset: 2px;
}

.check.is-error input {
  border-color: var(--charcoal);
  border-width: 2px;
}

/* ============================================================
   Service / Price card
   ============================================================ */

.service-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--soft-line);
  align-items: baseline;
}

@media (min-width: 768px) {
  .service-card {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
  }
}

.section--dark .service-card,
.section--alt .service-card,
.on-dark .service-card {
  border-bottom-color: var(--divider-dark);
}

.service-card__body > .eyebrow {
  margin-bottom: var(--space-3);
}

.service-card__name {
  font-family: var(--font-display-normal);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  /* Rule sheet: service-card name tracked at 0.08em.
     Note: Rule 4's weight-200 lock applies to .display-hero and
     .heading (section-level headlines), not card names — the card
     name is functional copy, so it carries the heavier display
     cut to read at small sizes. */
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
  color: var(--off-white);
}

@media (min-width: 1024px) {
  .service-card__name {
    font-size: 16px;
  }
}

.section--light .service-card__name,
.section--mid .service-card__name,
.section--cream .service-card__name {
  color: var(--charcoal);
}

/* Inline marker next to the service name (e.g. "SIGNATURE" tag on
   the Full Face Tox card). Smaller, looser-tracked, same weight. */
.service-card__tag {
  font-family: var(--font-display-normal);
  font-weight: 400;
  font-size: 0.78em;
  letter-spacing: 0.18em;
  margin-left: 0.9em;
  text-transform: uppercase;
  vertical-align: baseline;
  color: var(--light-warm);
}

/* On light grounds (e.g. the Weight Management section) light-warm is only
   ~2:1 — darken these wayfinding tags so they meet AA. */
.section--light .service-card__tag,
.section--cream .service-card__tag,
.section--mid .service-card__tag {
  color: var(--warm-gray);
}

/* Per-card eyebrow (when used) sits above the service name. */
.service-card__eyebrow {
  display: block;
  margin-bottom: var(--space-3);
}

.service-card__desc {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--warm-gray);
  line-height: 1.6;
  max-width: 52ch;
}

.section--dark .service-card__desc,
.section--alt .service-card__desc,
.on-dark .service-card__desc {
  color: var(--light-warm);
}

.service-card__price {
  color: var(--charcoal);
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: nowrap;
}

.service-card__price-amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 1.25;
  display: block;
  margin-bottom: var(--space-3);
}

.service-card__price-note {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--warm-gray);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

@media (min-width: 768px) {
  .service-card__price-note { font-size: 14.4px; }
}

@media (min-width: 768px) {
  .service-card__price {
    justify-self: end;
    align-items: flex-end;
    text-align: right;
  }
}

.section--dark .service-card__price,
.section--alt .service-card__price,
.on-dark .service-card__price {
  color: var(--warm-accent);
}

.section--dark .service-card__price-note,
.section--alt .service-card__price-note,
.on-dark .service-card__price-note {
  color: var(--light-warm);
}

/* ============================================================
   Membership tier row
   ============================================================ */

.tier-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .tier-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--divider-dark);
    border-bottom: 1px solid var(--divider-dark);
  }
  .section--light .tier-row,
  .section--cream .tier-row {
    border-top-color: var(--soft-line);
    border-bottom-color: var(--soft-line);
  }
}

.tier {
  display: flex;
  flex-direction: column;
  padding: var(--space-7) var(--space-6);
  border: 1px solid var(--divider-dark);
  min-height: 440px;
}

.section--light .tier,
.section--cream .tier {
  border-color: var(--soft-line);
}

@media (min-width: 1024px) {
  .tier {
    border: 0;
    border-right: 1px solid var(--divider-dark);
    padding: var(--space-8) var(--space-7);
  }
  .section--light .tier,
  .section--cream .tier {
    border-right-color: var(--soft-line);
  }
  .tier:last-child {
    border-right: 0;
  }
}

.tier--featured {
  border: 1px solid var(--warm-accent);
}

@media (min-width: 1024px) {
  .tier--featured {
    border: 1px solid var(--warm-accent);
  }
}

.tier__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.25;
  margin-bottom: var(--space-5);
}

.tier__price {
  color: var(--charcoal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: nowrap;
  margin-bottom: var(--space-5);
}

.tier__price-amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 1.1;
  display: block;
  margin-bottom: var(--space-3);
}

.tier__price-note {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--warm-gray);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

@media (min-width: 768px) {
  .tier__price-note { font-size: 14.4px; }
}

.section--dark .tier__price,
.section--alt .tier__price,
.on-dark .tier__price {
  color: var(--white);
}

.section--dark .tier__price-note,
.section--alt .tier__price-note,
.on-dark .tier__price-note {
  color: var(--light-warm);
}

.tier__divider {
  height: 1px;
  background: var(--soft-line);
  margin-bottom: var(--space-5);
}

.section--dark .tier__divider,
.section--alt .tier__divider,
.on-dark .tier__divider {
  background: var(--divider-dark);
}

.tier__benefits {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--warm-gray);
  margin-bottom: var(--space-7);
  flex: 1;
}

.section--dark .tier__benefits,
.section--alt .tier__benefits,
.on-dark .tier__benefits {
  color: var(--light-warm);
}

.tier__benefits li {
  padding-block: var(--space-1);
}

.tier__cta {
  margin-top: var(--space-7);
  align-self: flex-start;
}

.tier-row__meta {
  margin-top: var(--space-7);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--warm-gray);
  max-width: 64ch;
}

@media (min-width: 768px) {
  .tier-row__meta { font-size: 14.4px; }
}

@media (min-width: 1024px) {
  .tier-row__meta { margin-top: var(--space-8); }
}

/* ============================================================
   Image placeholder (for phase 1 demo only)
   ============================================================ */

.image-block {
  width: 100%;
  background: var(--warm-dark);
  color: var(--light-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.image-block--1-1  { aspect-ratio: 1 / 1; }
.image-block--4-5  { aspect-ratio: 4 / 5; }
.image-block--16-9 { aspect-ratio: 16 / 9; }

/* ============================================================
   Motion — on-scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
