/* ==========================================================================
   Hair by Carmen Machado — styles.css
   Stage 2 (LAYOUT) output. No JS logic here; class hooks below are toggled
   by main.js (Stage 3): body.js-enabled, body.is-touch, body.lang-es,
   .hero.is-active, .cta-pin.is-visible, .beat.is-visible
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, p, blockquote, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Design tokens ---------- */
:root {
  /* Cream ground. The page is light; the hero is the one dark room in it,
     so anything sitting on hero photography opts out of these ink colours
     explicitly (see the .hero block). */
  --color-bg: #f6f1e7;
  --color-bg-panel: #eee6d8;
  --color-bg-panel-alt: #e5dbc9;
  --color-text: #2a221b;
  --color-text-muted: #6b5d4f;
  /* Copper darkened until it earns its contrast on cream: --accent carries
     cream text on the CTA (4.8:1), --accent-strong is the ink used for
     accent-coloured text (6.3:1). */
  --color-accent: #9c5c25;
  --color-accent-strong: #834a1c;
  --color-border: rgba(42, 34, 27, 0.16);

  /* Light copy for the hero, which sits on dark photography regardless of
     how light the rest of the page is. */
  --color-text-on-media: #f4ede1;
  --color-text-on-media-muted: #ded3c2;
  --color-accent-on-media: #e3b076;

  --font-display: "Didot", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --section-pad-y: clamp(4rem, 9vw, 7.5rem);
  --section-pad-x: clamp(1.25rem, 6vw, 5rem);
  --transition-fast: 220ms ease;
  --transition-slow: 600ms ease;
}

/* ---------- Base ---------- */
html {
  background: var(--color-bg);
  color-scheme: light;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 3px;
}

/* ---------- Top controls (lang toggle + pinned CTA) ---------- */
.top-controls {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(0.9rem, 2vw, 1.5rem);
}

#lang-toggle {
  min-width: 2.75rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  /* Floats over both the dark hero and the cream sections below, so it is a
     light pill either way rather than borrowing the page ground. */
  background: rgba(246, 241, 231, 0.78);
  backdrop-filter: blur(6px);
  color: var(--color-text);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
#lang-toggle:hover { border-color: var(--color-accent); color: var(--color-accent-strong); }

.cta-book {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  /* Now renders a phone number rather than "Book your chair" — even digit
     widths keep it from jittering against the pill's fixed padding. */
  font-variant-numeric: tabular-nums;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.cta-book:hover {
  background: transparent;
  color: var(--color-accent-strong);
  transform: translateY(-1px);
}
/* The hero CTA hovers against photography, where the page's dark copper ink
   would disappear. */
.hero .cta-book:hover { color: var(--color-accent-on-media); }
.hero :focus-visible { outline-color: var(--color-accent-on-media); }

/* Pinned CTA: hidden until the engine marks the hero as scrolled past. */
.cta-pin {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.cta-pin.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* The one dark room in a light page: the stage is filled by photography,
     so its copy opts out of the page ink and stays light. */
  background: #221c17;
  color: var(--color-text-on-media);
  /* Full-bleed stage: the generic section padding would letterbox the
     canvas/poster and leave a black bar above it at scroll top. The beats
     carry their own padding, so nothing needs the inset. */
  padding: 0;
}

.hero-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero-canvas {
  display: none; /* enabled only once JS confirms scrub is active */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster,
.hero-poster-noscript {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-stage::after {
  /* readability scrim between the imagery and the beat text */
  content: "";
  position: absolute;
  inset: 0;
  /* Resolves to solid #221c17 at the very bottom so the stage hands over to
     divider 1 with no seam — the frame underneath is a photo whose bottom
     row changes as it scrubs, so the scrim is what makes the edge constant. */
  background: linear-gradient(180deg,
    rgba(34, 28, 23, 0.55) 0%,
    rgba(34, 28, 23, 0.35) 45%,
    rgba(34, 28, 23, 0.82) 90%,
    #221c17 100%);
  z-index: 2;
  pointer-events: none;
}

.beat {
  position: relative;
  z-index: 3;
  width: min(46rem, 88vw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

/* Beat 1 (brand reveal) is the LCP element: plain text, visible with no
   animation delay on first paint, regardless of JS state. */
.beat--1 {
  opacity: 1;
}

.brand-name {
  font-size: clamp(2.4rem, 6.2vw, 5rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
  color: var(--color-text-on-media);
}

.beat-line {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--color-text-on-media-muted);
  max-width: 34ch;
  margin: 0 auto;
}

.beat--3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* Scroll/swipe affordance, pinned to the foot of the stage. .hero-stage stays
   position:relative in every motion tier except the pure no-JS fallback
   (stacked flow, nothing to cue), so this needs no per-tier overrides. */
.hero-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* Same muted on-media token as .beat-line — see body.hero-light below for
     how it stays legible once the plate flips light. */
  color: var(--color-text-on-media-muted);
  pointer-events: none;
}

/* Visibility is a pure CSS swap on pointer type, never a JS/body class, so
   the cue is correct even if main.js or the CDN never loads. */
.hero-cue__pointer,
.hero-cue__touch {
  display: block;
  animation: hero-cue-drift 2.2s ease-in-out infinite;
}
.hero-cue__touch { display: none; }
@media (pointer: coarse) {
  .hero-cue__pointer { display: none; }
  .hero-cue__touch { display: block; }
}

@keyframes hero-cue-drift {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* ---------- No-JS / static fallback: fully readable, stacked hero ---------- */
body:not(.js-enabled) .hero-stage {
  position: static;
  height: auto;
  min-height: 100svh;
  flex-direction: column;
  padding: clamp(2rem, 6vw, 4rem) var(--section-pad-x);
  gap: clamp(2.5rem, 8vw, 5rem);
}
body:not(.js-enabled) #hero-canvas { display: none; }
body:not(.js-enabled) .hero-poster,
body:not(.js-enabled) .hero-poster-noscript {
  position: absolute;
  inset: auto;
  top: 0;
  left: 0;
  right: 0;
  height: 100svh;
}
body:not(.js-enabled) .hero-stage::after {
  inset: auto;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: 100svh;
}
body:not(.js-enabled) .beat { opacity: 1; }

/* ---------- JS-enabled scroll-scrubbed hero ---------- */
body.js-enabled .hero {
  height: 350vh;
}
body.js-enabled .hero-stage {
  position: sticky;
  top: 0;
}
body.js-enabled .beat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(46rem, 88vw);
  margin: 0 auto;
}
body.js-enabled .beat {
  /* GSAP drives opacity directly in scrub mode; a CSS transition here would
     both lag the scrub and cause a visible fade-out flash of beats 2/3 at
     the moment js-enabled lands on <body> (static tier ships them visible). */
  transition: none;
}
body.js-enabled .beat--2,
body.js-enabled .beat--3 {
  opacity: 0;
}
body.js-enabled .beat.is-visible {
  opacity: 1;
}
body.js-enabled .hero.is-active #hero-canvas {
  display: block;
}
body.js-enabled .hero.is-active .hero-poster {
  display: none;
}

/* Touch devices: no canvas frame-scrub — 48 frames at 1600px is 3 MB over
   mobile data and ~276 MB of decoded bitmaps, which strands older phones.
   The hero still runs as a sticky stage: the poster holds and drifts while
   the three beats cross-fade. main.js drives opacity and scale inline, and
   only it ever adds .is-touch, so a JS or CDN failure falls back to the
   static stacked layout above rather than a dead 300svh scroll. */
body.is-touch .hero { height: 300svh; }
body.is-touch .hero-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
body.is-touch #hero-canvas { display: none !important; }
body.is-touch .hero-poster,
body.is-touch .hero-poster-noscript {
  position: absolute;
  display: block !important;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}
body.is-touch .beat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(46rem, 88vw);
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 2.5rem);
  transition: none;
}
body.is-touch .beat--2,
body.is-touch .beat--3 { opacity: 0; }

/* ---------- Light hero (phone plate) ----------
   img/poster-mobile.webp is a 9:16 frame of dark hair on cream — the inverse
   of the desktop plate. So the hero stops being the page's one dark room:
   copy returns to the page ink and the scrim becomes a cream veil, weighted
   through the middle where the beats sit over the hair. Keyed to .hero-light
   rather than .is-touch because main.js sets it from the poster choice, which
   is independent of the motion tier. */
body.hero-light .hero { background: var(--color-bg); }

/* The copy stays light even though the plate is light overall, because the
   beats are centred on the hair — the one dark mass in the frame — and it
   clears 9:1 there untouched. The alternative, flipping to page ink, needs a
   cream veil heavy enough to carry it, and at that strength the wash drops
   the brown's saturation from ~49% to ~16% and greys the hair out. So the
   plate is left alone and the type carries its own shadow for the edges,
   where a long line can reach the cream margin beside the hair. */
body.hero-light .brand-name,
body.hero-light .beat-line,
body.hero-light .hero-cue {
  text-shadow: 0 1px 14px rgba(34, 28, 23, 0.6), 0 0 4px rgba(34, 28, 23, 0.4);
}

body.hero-light .hero-stage::after {
  /* Two layers, not one ramp: interpolating from a transparent espresso to
     an opaque cream in a single gradient passes through muddy half-tints. */
  background:
    linear-gradient(180deg, rgba(246, 241, 231, 0) 74%, var(--color-bg) 100%),
    linear-gradient(180deg, rgba(34, 28, 23, 0) 8%, rgba(34, 28, 23, 0.14) 46%, rgba(34, 28, 23, 0) 76%);
}

/* Divider 1 exists to hand the dark hero over to the cream page. With a light
   hero there is nothing to hand over, and its near-black frame has nothing to
   say on cream, so it collapses to a plain gap. */
body.hero-light .texture-divider--1 {
  height: clamp(3rem, 8vw, 5rem);
  background: var(--color-bg);
}
body.hero-light .texture-divider--1 img { display: none; }

/* ---------- Texture dividers ---------- */
.texture-divider {
  height: clamp(4.5rem, 10vw, 8rem);
  overflow: hidden;
}
.texture-divider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  /* Dissolve the photo into the page top and bottom. Without this the strip
     terminates on two hard edges and reads as a misplaced image block, not
     a divider — the source frames are near-black but not the page's black. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 34%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 34%, #000 66%, transparent 100%);
}

/* The wrapper carries the section-to-section tone change, so it resolves
   gradually behind the photo instead of as a hard line where the band ends
   (masking the image alone cannot hide a background-colour step).
   The frames are 2688x1536 and the band shows a ~16% slice, so each is
   positioned onto its subject: the copper-lit strand (1), the backlit
   flyaways riding the hair mass (2). */
/* Divider 1 is the seam between the dark hero and the cream page, so it does
   the handover: the ground ramps from the hero's espresso to cream, and the
   near-black frame rides the dark end and fades out as the ground lightens.
   Its own asymmetric mask replaces the shared one — a symmetric fade would
   leave the photo half-lit over cream, which is exactly where a dark frame
   turns into a smudge. */
.texture-divider--1 {
  height: clamp(8rem, 18vw, 16rem);
  /* Warm stops through the middle. A straight espresso-to-cream ramp
     interpolates through a desaturated grey (~#8c877f) and reads as haze;
     these keep the handover in the copper family the whole way down. */
  background: linear-gradient(to bottom,
    #221c17 0%,
    #33281e 22%,
    #6b5540 52%,
    #b6a488 76%,
    var(--color-bg) 100%);
}
.texture-divider--1 img {
  object-position: 50% 58%;
  opacity: 0.9;
  /* Screen, not normal compositing: this frame is a near-black ground with
     one lit strand. Composited normally at any opacity it darkens the top of
     the band below the hero's own black and reopens the seam; screened, the
     black contributes nothing and only the strand adds light — which fades
     out on its own as the ground ramps to cream. */
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 82%);
}

/* Divider 2 sits between two light surfaces, looks (--color-bg) -> about
   (--color-bg-panel). Multiply is what makes it belong: the frame's pale
   ground and blonde highlights drop out to nothing against cream, leaving
   only the wave's structure as a warm shadow. Compositing it normally would
   paste a grey slab on the page no matter how the edges are masked. */
.texture-divider--2 {
  height: clamp(7rem, 15vw, 13rem);
  background: linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-panel) 100%);
}
.texture-divider--2 img {
  object-position: 50% 50%;
  opacity: 0.55;
  mix-blend-mode: multiply;
  filter: sepia(0.3) saturate(1.15);
}

/* ---------- Section shell ---------- */
section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

/* Kept in the DOM for screen readers and the data-en/data-es swap, removed
   from the visual layout. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

section > h2,
.contact-copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--color-text-muted);
  max-width: 40ch;
  margin-bottom: 3rem;
}

/* ---------- Looks grid ---------- */
.looks {
  background: var(--color-bg);
  text-align: center;
  /* The heading is visually hidden here, so the grid opens straight off the
     divider — any top padding would strand the divider in dead space
     instead of sitting flush between the hero and the images. */
  padding-top: 0;
}

.looks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  text-align: left;
}

.look-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.look-card img {
  width: 100%;
  /* Without height:auto the HTML width/height attributes act as a
     presentational hint that pins the height and defeats aspect-ratio. */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.look-card figcaption {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.look-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-accent-strong);
}

.look-copy {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  background: var(--color-bg-panel);
}

.about-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

.about-copy h2 { margin-bottom: 1.75rem; }

.manifesto-line {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 42ch;
}
.manifesto-line + .manifesto-line { margin-top: 1.25rem; }

/* ---------- Transformations ---------- */
.transformations {
  text-align: center;
}
.transformations .section-sub { margin-left: auto; margin-right: auto; }

.transform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.transform-slot { text-align: left; }

.transform-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.transform-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.transform-layer--before {
  background: linear-gradient(155deg, #e7ddcb 0%, #d9cdb6 100%);
  clip-path: inset(0 50% 0 0);
}
.transform-layer--after {
  background: linear-gradient(155deg, #efe4d0 0%, #e0d3ba 100%);
  clip-path: inset(0 0 0 50%);
}

.transform-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.transform-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--color-accent);
  opacity: 0.8;
}
.transform-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translate(-50%, -50%);
}

.placeholder-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Generic pending-asset treatment: neutral warm gradient + subtle label. */
.placeholder--pending {
  position: relative;
}
.placeholder--pending .transform-frame {
  background: linear-gradient(135deg, #ebe1cf 0%, #ded2bc 100%);
}

/* ---------- Testimonials ---------- */
.testimonials {
  background: var(--color-bg-panel);
  text-align: center;
}
.testimonials h2 { margin-bottom: 3rem; }

.testimonials-carousel {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.testimonials-track {
  display: flex;
  width: max-content;
  animation: testimonials-scroll 70s linear infinite reverse;
}

.testimonials-carousel:hover .testimonials-track,
.testimonials-carousel:focus-within .testimonials-track {
  animation-play-state: paused;
}

.testimonials-set {
  display: flex;
  flex-shrink: 0;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-right: clamp(1.25rem, 3vw, 2.25rem);
}

@keyframes testimonials-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.testimonial-card {
  width: min(22rem, 82vw);
  flex: 0 0 auto;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-panel-alt);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.testimonial-card blockquote {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text);
}

.testimonial-card figcaption {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.contact-copy p { color: var(--color-text-muted); margin-top: 1rem; }

.contact-whatsapp,
.map-directions {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-accent);
  color: var(--color-accent-strong);
  font-size: 0.98rem;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.contact-whatsapp:hover,
.map-directions:hover { color: var(--color-text); border-color: var(--color-text); }
.contact-whatsapp { margin-top: 1.75rem; }

.contact-copy .cta-book { margin-top: 2rem; }

/* Real NAP block: salon note (context) -> address (the fact) -> region line
   (search-intent copy). Gap on the wrapper carries the rhythm instead of each
   child's own margin, so it doesn't double up with .contact-copy p's spacing. */
.contact-location {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-location p { margin-top: 0; }

.contact-salon-note {
  color: var(--color-text-muted);
}

.contact-address {
  /* <address> italicises by default in every browser; this is prose, not a
     signature block. */
  font-style: normal;
  color: var(--color-text);
}

.contact-region,
.contact-hours {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.contact-hours-closed {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Card shell now holds a real iframe + directions link instead of a label,
   so it drops the centred-placeholder layout for a stacked one. Border and
   radius stay on the shell (an iframe's own `border` can't win against the
   `border:0` already inline on the element), padding keeps the map and the
   link off the card edge. */
.map-embed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: clamp(15rem, 34vw, 21rem);
  border: 0;
  border-radius: 4px;
}
.map-embed .map-directions {
  align-self: flex-start;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.5rem var(--section-pad-x) 3rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.site-footer p {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

/* Present on all three pages (index + the two legal pages). Same
   underline-on-accent language as .contact-whatsapp/.map-directions, just
   set inline and small enough to sit under the one-line footer note. Wraps
   as a plain flex row so a translated label or a narrow phone never forces
   the page wider. */
.footer-links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
}
.footer-links a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-accent);
  color: var(--color-accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* ---------- Legal pages (privacy.html, cookies.html) ----------
   These sit on the plain cream ground, not hero photography — there is no
   dark room to opt out of, so everything below reads off the page ink
   tokens (--color-text / --color-text-muted / --color-accent-strong) and
   never touches the --color-text-on-media* set. */

/* .top-controls is position:fixed and sized for floating over the hero
   stage, where the beats already keep clear of the top-right corner by
   design. A legal page has no hero to hide behind it, so instead of trying
   to dodge it horizontally at every width, .legal-header simply starts
   below its footprint — clamp() min (4.5rem) clears the toggle even at the
   narrowest phone widths, where percentage-based paddings alone would not. */
.legal-header {
  max-width: 70ch;
  margin: 0 auto;
  padding: clamp(4.5rem, 14vw, 6rem) var(--section-pad-x) 0;
}
.brand-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--color-text);
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.brand-link:hover {
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
}

/* Reading measure: capped well under the 68–72ch brief regardless of
   viewport, centred, with room to breathe above the generic section
   padding gives a one-off document. */
.legal-page {
  max-width: 70ch;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--section-pad-x) var(--section-pad-y);
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-page h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
}

.legal-page h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}

/* Subsections (3.1, 5.2, …) stay in the body face and take an accent tint
   instead of the display serif — a second display size this close together
   reads as another top-level heading, not a subsection. */
.legal-page h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent-strong);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page p {
  margin-top: 1.25rem;
}
.legal-page h1 + .legal-effective {
  margin-top: 0;
}

/* The global reset zeroes list-style on every ul/ol; a legal document is
   exactly the place that needs real bullets and numbers back. */
.legal-page ul,
.legal-page ol {
  margin-top: 1.25rem;
  padding-left: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.legal-page ul { list-style: disc; }
.legal-page ol { list-style: decimal; }
.legal-page li { padding-left: 0.15rem; }
.legal-page li > ul,
.legal-page li > ol {
  margin-top: 0.65rem;
}

.legal-page strong {
  color: var(--color-text);
  font-weight: 700;
}

.legal-page time {
  font-variant-numeric: tabular-nums;
}

/* Effective-date line: metadata, not body copy — smaller, muted, set off
   from the h1 with a rule instead of just relying on margin. */
.legal-effective {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-kv {
  margin-top: 1.25rem;
  color: var(--color-text-muted);
}

.legal-page code {
  padding: 0.1em 0.4em;
  border-radius: 3px;
  background: var(--color-bg-panel);
  font-size: 0.9em;
}

.legal-page a {
  border-bottom: 1px solid var(--color-accent);
  color: var(--color-accent-strong);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.legal-page a:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* Third-party table (privacy.html §4 only). The wrap, not the page, is the
   thing allowed to scroll sideways — see the overflow-wrap rule below for
   everything else. */
.legal-table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}
.legal-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal-table th,
.legal-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}
.legal-table th {
  background: var(--color-bg-panel);
  color: var(--color-text);
  font-weight: 700;
  white-space: nowrap;
}
.legal-table tr:last-child td {
  border-bottom: 0;
}

/* Statute citations, the mailing address, wa.me links, CDN hostnames — none
   of this document's long unbroken strings are inside the table, so this
   has to be page-wide rather than scoped to one element. */
.legal-page,
.legal-page * {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .looks-grid,
  .transform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about,
  .contact {
    grid-template-columns: 1fr;
  }
  .about-portrait img { max-width: 22rem; margin: 0 auto; }
}

@media (max-width: 600px) {
  .looks-grid,
  .transform-grid {
    grid-template-columns: 1fr;
  }
  .top-controls { padding: 0.75rem; gap: 0.5rem; }
  .cta-book { padding: 0.7rem 1.35rem; font-size: 0.78rem; }
  /* The pinned CTA now carries the full phone string in the tightest bar on
     the page, alongside the lang toggle — trim further so both fit on a
     narrow viewport without wrapping or forcing the row wider than it. */
  .cta-pin {
    padding: 0.6rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }
}

/* ==========================================================================
   Reduced motion: static poster, all beats visible, no scroll-jacked hero.
   Applies regardless of body.js-enabled — CSS wins over any JS state.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero,
  body.js-enabled .hero {
    height: auto;
  }
  .hero-stage,
  body.js-enabled .hero-stage {
    position: static;
    height: auto;
    min-height: 100svh;
    flex-direction: column;
    padding: clamp(2rem, 6vw, 4rem) var(--section-pad-x);
    gap: clamp(2.5rem, 8vw, 5rem);
  }
  #hero-canvas,
  body.js-enabled #hero-canvas,
  body.js-enabled .hero.is-active #hero-canvas {
    display: none !important;
  }
  .hero-poster,
  body.js-enabled .hero-poster,
  body.js-enabled .hero.is-active .hero-poster,
  .hero-poster-noscript,
  body.js-enabled .hero-poster-noscript {
    display: block !important;
    position: absolute;
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    height: 100svh;
  }
  .hero-stage::after,
  body.js-enabled .hero-stage::after {
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    height: 100svh;
  }
  .beat,
  body.js-enabled .beat {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    transition: none !important;
    transform: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .testimonials-carousel {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .testimonials-track {
    animation: none !important;
    transform: none !important;
  }
  .testimonials-set[aria-hidden="true"] {
    display: none;
  }
  /* The global animation-duration: 0.01ms rule above would otherwise freeze
     the cue mid-drift at its dimmest frame (opacity 0.55, offset 5px). Reset
     it explicitly so the cue stays fully visible and settled instead. */
  .hero-cue__pointer,
  .hero-cue__touch {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
