/* ==========================================================
   Fernwood Animal Clinic
   Warm, bright, deep. Cream paper, forest ink, sun and coral
   accents. Depth comes from layered parallax and soft shadow,
   not from darkness.
========================================================== */

:root {
  --cream:  #fbf7f0;
  --bone:   #f2ebe0;
  --sand:   #e7dccb;
  --ink:    #17211d;
  --ink-2:  #46534c;
  --muted:  #8b9089;
  --forest: #1f4736;
  --moss:   #2e6b4f;
  --sun:    #f2a33c;
  --coral:  #e4674c;
  --sky:    #7fb3c8;
  --line:   rgba(23, 33, 29, 0.12);

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Outfit', system-ui, -apple-system, sans-serif;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
  --gut:   clamp(20px, 5vw, 88px);
}

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

html { overflow-x: clip; overflow-y: visible; height: auto; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow: visible;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
::selection { background: var(--sun); color: var(--ink); }

/* ---------- progress ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--coral)); }

/* ---------- nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 20px var(--gut);
  color: var(--cream);
  transition: transform .55s var(--ease), background .5s, color .5s, padding .5s, box-shadow .5s;
}
.nav.is-solid {
  background: rgba(251, 247, 240, .9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  padding-top: 13px; padding-bottom: 13px;
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-away { transform: translateY(-115%); }

.nav__brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.nav__mark svg { width: 26px; fill: currentColor; }
.nav__name { display: flex; flex-direction: column; line-height: 1.05; font-weight: 500; font-size: .84rem; letter-spacing: .22em; }
.nav__name i { font-style: normal; font-size: .5rem; letter-spacing: .3em; opacity: .6; margin-top: 3px; }

.nav__links { display: flex; gap: clamp(16px, 2.1vw, 34px); }
.nav__links a {
  position: relative; color: inherit; text-decoration: none;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75;
  transition: opacity .3s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1.5px;
  background: var(--sun); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  padding: 11px 22px; border-radius: 999px;
  background: var(--sun); color: var(--ink); text-decoration: none;
  font-size: .78rem; font-weight: 500; letter-spacing: .06em;
  box-shadow: 0 8px 24px -8px rgba(242,163,60,.7);
  transition: transform .35s var(--ease), box-shadow .35s, background .35s;
}
.nav__cta:hover { transform: translateY(-2px); background: var(--coral); box-shadow: 0 14px 30px -10px rgba(228,103,76,.7); }


/* ==========================================================
   Start-up gate
   Holds the page until the hero plate has actually decoded, then
   lifts as seven slats so the photograph is revealed in bands
   rather than by a plain fade.
========================================================== */

html.is-gated, body.is-gated { overflow: hidden; height: 100%; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  color: var(--cream);
}

/* the slats are the curtain; the panel behind them carries the copy */
.gate__slats { position: absolute; inset: 0; display: flex; }
.gate__slats span {
  flex: 1 1 0;
  background: var(--forest);
  transform: translateY(0);
  transition: transform 1.05s cubic-bezier(0.76, 0, 0.24, 1);
}
.gate__slats span:nth-child(1) { transition-delay: 0ms;   background: #1f4736; }
.gate__slats span:nth-child(2) { transition-delay: 60ms;  background: #214c39; }
.gate__slats span:nth-child(3) { transition-delay: 120ms; background: #1e4433; }
.gate__slats span:nth-child(4) { transition-delay: 180ms; background: #235340; }
.gate__slats span:nth-child(5) { transition-delay: 240ms; background: #1e4433; }
.gate__slats span:nth-child(6) { transition-delay: 300ms; background: #214c39; }
.gate__slats span:nth-child(7) { transition-delay: 360ms; background: #1f4736; }

.gate.is-leaving .gate__slats span { transform: translateY(-101%); }

/* a warm wash that blooms out of the button as it is pressed */
.gate::after {
  content: '';
  position: absolute;
  left: 50%; top: 62%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}
.gate.is-leaving::after {
  animation: bloom 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes bloom {
  0%   { opacity: .85; transform: scale(0); }
  70%  { opacity: .22; }
  100% { opacity: 0;   transform: scale(240); }
}

.gate__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 640px;
  transition: opacity .5s ease, transform .7s var(--ease);
}
.gate.is-leaving .gate__inner { opacity: 0; transform: translateY(-26px) scale(.97); }

.gate__mark svg { width: 46px; margin: 0 auto 26px; fill: var(--sun); }
.gate__mark { animation: pawIn 1s var(--ease) both; }
@keyframes pawIn { from { opacity: 0; transform: translateY(16px) scale(.8); } }

.gate__eyebrow {
  margin: 0 0 18px;
  font-size: .66rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(251,247,240,.55);
  animation: gIn .9s var(--ease) .15s both;
}

.gate__title {
  margin: 0 0 22px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: .98; letter-spacing: -.03em;
}
.gate__title span { display: block; animation: gIn 1s var(--ease) .28s both; }
.gate__title em { display: block; font-style: italic; color: var(--sun); animation: gIn 1s var(--ease) .4s both; }

.gate__line {
  margin: 0 auto 40px; max-width: 40ch;
  font-size: clamp(.92rem, 1.3vw, 1.06rem); line-height: 1.75;
  color: rgba(251,247,240,.66);
  animation: gIn 1s var(--ease) .52s both;
}
@keyframes gIn { from { opacity: 0; transform: translateY(20px); } }

.gate__btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 152px; height: 152px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans); font-size: .82rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer;
  animation: gIn 1s var(--ease) .64s both;
  transition: color .4s, transform .5s var(--ease);
}
.gate__btn[disabled] { cursor: progress; opacity: .5; }
.gate__btn:not([disabled]):hover { transform: scale(1.06); color: var(--ink); }

.gate__btn-ring {
  position: absolute; inset: 0;
  border: 1.5px solid rgba(251,247,240,.35);
  border-radius: 50%;
  transition: background .45s var(--ease), border-color .45s, transform .6s var(--ease);
}
.gate__btn:not([disabled]) .gate__btn-ring { animation: ring 2.6s ease-in-out infinite; }
@keyframes ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,163,60,.34); }
  60%      { box-shadow: 0 0 0 22px rgba(242,163,60,0); }
}
.gate__btn:not([disabled]):hover .gate__btn-ring { background: var(--sun); border-color: var(--sun); }
.gate__btn-txt { position: relative; z-index: 1; }
.gate__btn:focus-visible { outline: 2px solid var(--sun); outline-offset: 8px; }

.gate__bar {
  width: 180px; height: 2px; margin: 32px auto 0;
  background: rgba(251,247,240,.16); border-radius: 2px; overflow: hidden;
}
.gate__bar span { display: block; height: 100%; width: 0; background: var(--sun); transition: width .4s ease; }
.gate.is-ready .gate__bar { opacity: 0; transition: opacity .5s ease; }

/* Hero entrance is held until the gate is out of the way, so the
   headline animates for the visitor instead of behind the curtain. */
body:not(.is-open) .hero__kick span,
body:not(.is-open) .hero__h1 .l > span,
body:not(.is-open) .hero__sub,
body:not(.is-open) .hero__cta { animation-play-state: paused; }

/* and the plate settles out of a slightly wider framing */
.hero__plate img { transition: none; }
body.is-open .hero__plate img { transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  .gate__slats span, .gate__inner { transition-duration: .01ms; }
  .gate.is-leaving::after { animation: none; }
  .gate__mark, .gate__eyebrow, .gate__title span, .gate__title em,
  .gate__line, .gate__btn { animation: none; }
  .gate__btn:not([disabled]) .gate__btn-ring { animation: none; }
}

/* ---------- ACT I : pinned hero ---------- */

.herostage { position: relative; height: 260vh; background: var(--forest); }

.hero {
  position: sticky; top: 0;
  height: 100svh; width: 100%;
  overflow: hidden;
  background: var(--forest);
  --px: 0; --py: 0;
}

.hero__layers { position: absolute; inset: 0; }

.hero__sky {
  position: absolute; inset: -6%;
  background: radial-gradient(ellipse 80% 60% at 60% 20%, #35705a 0%, #1f4736 55%, #16332680 100%);
  transform: translate3d(calc(var(--px) * .18px), calc(var(--py) * .18px), 0);
}

/* the photograph — scaled a touch so parallax has room, and lifted
   on scroll so the field appears to fall away beneath you */
.hero__plate { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hero__plate img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 46%;
  /* --zoom is written from scroll position by site.js */
  transform: scale(var(--zoom, 1.055)) translate3d(calc(var(--px) * .55px), calc(var(--py) * .55px), 0);
  will-change: transform;
}

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(15,32,24,.86) 0%, rgba(15,32,24,.5) 42%, transparent 72%),
    linear-gradient(to top, rgba(12,26,20,.88) 0%, transparent 46%),
    linear-gradient(to bottom, rgba(12,26,20,.6) 0%, transparent 26%);
}

.hero__grain {
  position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bokeh { position: absolute; inset: 0; }
.bokeh span {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: var(--c);
  opacity: .16;
  filter: blur(48px);
  transform: translate3d(calc(var(--px) * 1.7px), calc(var(--py) * 1.7px), 0);
  animation: float 14s ease-in-out infinite alternate;
}
.bokeh span:nth-child(2) { animation-duration: 19s; }
.bokeh span:nth-child(3) { animation-duration: 11s; }
.bokeh span:nth-child(4) { animation-duration: 22s; }
@keyframes float { to { transform: translate3d(calc(var(--px) * 1.7px + 26px), calc(var(--py) * 1.7px - 22px), 0); } }

.hero__copy {
  position: absolute; z-index: 5;
  left: var(--gut); top: 50%; transform: translateY(-50%);
  max-width: min(640px, 56vw);
  color: var(--cream);
}

.hero__kick { margin: 0 0 24px; overflow: hidden; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--sun); }
.hero__kick span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) .3s forwards; }

.hero__h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.7rem, 7vw, 6.4rem);
  line-height: .96;
  letter-spacing: -.025em;
}
.hero__h1 em { font-style: italic; color: var(--sun); }
.hero__h1 .l { display: block; overflow: hidden; }
.hero__h1 .l > span { display: block; transform: translateY(108%); animation: rise 1.15s var(--ease) forwards; }
.hero__h1 .l:nth-child(1) > span { animation-delay: .42s; }
.hero__h1 .l:nth-child(2) > span { animation-delay: .54s; }
.hero__h1 .l:nth-child(3) > span { animation-delay: .66s; }
@keyframes rise { to { transform: translateY(0); } }

.hero__sub {
  margin: 0 0 34px; max-width: 46ch;
  font-size: clamp(.98rem, 1.4vw, 1.16rem); line-height: 1.75;
  color: rgba(251,247,240,.76);
  opacity: 0; animation: fade 1.1s ease 1.0s forwards;
}
@keyframes fade { to { opacity: 1; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 13px; opacity: 0; animation: fade 1.1s ease 1.15s forwards; }

.btn {
  display: inline-block; padding: 15px 30px; border-radius: 999px;
  font-family: var(--sans); font-size: .84rem; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .35s var(--ease), background .35s, color .35s, box-shadow .35s, border-color .35s;
}
.btn--fill { background: var(--sun); color: var(--ink); box-shadow: 0 12px 30px -12px rgba(242,163,60,.85); }
.btn--fill:hover { background: var(--coral); color: var(--cream); transform: translateY(-3px); box-shadow: 0 18px 38px -14px rgba(228,103,76,.9); }
.btn--line { border-color: rgba(251,247,240,.45); color: var(--cream); }
.btn--line:hover { background: var(--cream); color: var(--ink); transform: translateY(-3px); }
.btn--wide { width: 100%; text-align: center; }

.vitals {
  position: absolute; z-index: 5; right: var(--gut); bottom: clamp(64px, 10vh, 120px);
  display: flex; flex-direction: column; gap: 22px; text-align: right;
  color: var(--cream);
}
.vital b { display: block; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1; color: var(--sun); }
.vital span { display: block; margin-top: 5px; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(251,247,240,.55); line-height: 1.6; }

.cue { position: absolute; z-index: 5; left: 50%; bottom: 26px; width: 1.5px; height: 56px; overflow: hidden; background: rgba(251,247,240,.2); transition: opacity .5s; }
.cue span { position: absolute; inset: 0; background: linear-gradient(transparent, var(--sun)); animation: cue 2.1s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- ACT II shell ---------- */

.page { position: relative; z-index: 20; background: var(--cream); }

.kicker { margin: 0 0 16px; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--moss); font-weight: 500; }
.kicker--light { color: var(--sun); }

.sec { padding: 0 0 clamp(38px, 5.5vw, 70px); }
.sec--center { text-align: center; }
.sec--split { display: grid; grid-template-columns: 1.5fr auto; gap: 30px; align-items: end; }
.sec__h2 {
  margin: 0; max-width: 18ch;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.025em;
}
.sec--center .sec__h2 { margin: 0 auto; }

[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .95s var(--ease), transform 1.05s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.word { display: inline-block; overflow: hidden; vertical-align: top; }
.word > i { display: inline-block; font-style: inherit; transform: translateY(108%); transition: transform 1s var(--ease); }
[data-split].is-in .word > i { transform: none; }

/* ---------- statement ---------- */

.statement { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(84px, 13vw, 180px) var(--gut) clamp(56px, 8vw, 110px); text-align: center; }

.seal { position: absolute; top: 6%; right: 4%; width: clamp(80px, 10vw, 156px); color: var(--moss); opacity: .34; pointer-events: none; }
.seal svg { width: 100%; transform-origin: 50% 50%; animation: spin 48s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seal__ring { fill: none; stroke: currentColor; stroke-width: .9; opacity: .6; }
.seal__ring--dash { stroke-dasharray: 2 7; }
.seal__text { font-family: var(--sans); font-size: 9.4px; letter-spacing: 2.5px; fill: currentColor; }
.seal__paw { fill: currentColor; }

.statement__text {
  margin: 0 auto clamp(30px, 4vw, 54px); max-width: 20ch;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.85rem, 4.4vw, 3.7rem); line-height: 1.14; letter-spacing: -.02em;
  text-wrap: balance;
}
.statement__by { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.rule { width: 46px; height: 1.5px; background: var(--sun); }

/* ---------- ticker ---------- */

.ticker { overflow: hidden; padding: 18px 0; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); background: var(--bone); }
.ticker__row { display: flex; align-items: center; gap: 26px; width: max-content; white-space: nowrap; will-change: transform;
  font-family: var(--serif); font-size: clamp(1.1rem, 2.1vw, 1.8rem); color: var(--forest); }
.ticker__row i { color: var(--sun); font-style: normal; }

/* ---------- care cards ---------- */

.care { padding: clamp(76px, 11vw, 150px) var(--gut); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: clamp(14px, 1.8vw, 26px); }

.card {
  position: relative; overflow: hidden;
  padding: 32px 28px 36px; border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(23,33,29,.04), 0 18px 40px -26px rgba(23,33,29,.4);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .5s;
}
.card:hover {
  transform: translateY(-9px);
  border-color: rgba(46,107,79,.4);
  box-shadow: 0 4px 8px rgba(23,33,29,.05), 0 34px 60px -28px rgba(31,71,54,.55);
}
.card__art { width: 92px; height: auto; margin-bottom: 24px; color: var(--moss); }
.card__art path, .card__art circle, .card__art rect {
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.6s var(--ease); transition-delay: var(--d, 0ms);
}
.card__art.is-drawn path, .card__art.is-drawn circle, .card__art.is-drawn rect { stroke-dashoffset: 0; }

.card h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 1.42rem; line-height: 1.14; letter-spacing: -.015em; }
.card p { margin: 0; font-size: .93rem; line-height: 1.75; color: var(--ink-2); }
.card__link { display: inline-block; margin-top: 18px; font-size: .84rem; font-weight: 500; color: var(--coral); text-decoration: none; }
.card__link:hover { text-decoration: underline; }

.card--accent { background: linear-gradient(165deg, var(--forest), #16332a); border-color: transparent; color: var(--cream); }
.card--accent h3 { color: var(--cream); }
.card--accent p { color: rgba(251,247,240,.68); }
.card--accent .card__art { color: var(--sun); }
.card--accent .card__link { color: var(--sun); }

/* ---------- patients : free horizontal strip ----------
   Deliberately NOT pinned. A sticky pin converts vertical scroll
   into horizontal travel, which reads as the page seizing up. This
   is a normal-height section containing a native horizontal
   scroller that also drifts on its own, so vertical scrolling is
   never intercepted. */

.gallery {
  position: relative;
  padding: clamp(70px, 10vw, 130px) 0 clamp(56px, 8vw, 100px);
  background: radial-gradient(ellipse 70% 60% at 28% 24%, #2c6249, var(--forest) 62%);
  color: var(--cream);
}
.gallery__pin { position: relative; }

.gallery__track {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  padding: 0 var(--gut) 26px;
  overflow-x: auto;
  overscroll-behavior-x: contain;      /* don't chain into page navigation */
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-drag { cursor: grabbing; }
.gallery__track > * { scroll-snap-align: center; }

.gal { position: relative; flex: 0 0 auto; width: clamp(230px, 25vw, 400px); aspect-ratio: 4/3; margin: 0; overflow: hidden; border-radius: 18px; background: #16332a;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.gal--tall { aspect-ratio: 3/4.2; width: clamp(200px, 20vw, 320px); }
.gal--wide { aspect-ratio: 16/9; width: clamp(320px, 38vw, 620px); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter 1.1s var(--ease); }
.gal:hover img { transform: scale(1.07); }
.gal figcaption {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(251,247,240,.8);
  text-shadow: 0 2px 12px rgba(0,0,0,.9);
}
.gal figcaption b { color: var(--sun); font-weight: 500; }

.gal-intro, .gal-end { flex: 0 0 auto; width: clamp(240px, 27vw, 420px); padding-right: clamp(8px, 2vw, 34px); }
.gal-intro h2 { margin: 0 0 18px; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.02; letter-spacing: -.025em; }
.gal-intro__note, .gal-end__text { margin: 0 0 22px; font-size: .92rem; line-height: 1.8; color: rgba(251,247,240,.6); }
.gal-end__text { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.9rem); color: rgba(251,247,240,.95); line-height: 1.35; }
.gallery .kicker { color: var(--sun); }

.gallery__rail { position: relative; left: auto; right: auto; bottom: auto; width: calc(100% - 2 * var(--gut)); margin: 8px auto 0; height: 3px; background: rgba(251,247,240,.16); border-radius: 3px; }
.gallery__rail span { display: block; height: 100%; width: 0; background: var(--sun); border-radius: 3px; transition: width .12s linear; }

/* a nudge that fades once the strip has been moved */
.gallery__hint {
  display: flex; align-items: center; gap: 9px;
  width: calc(100% - 2 * var(--gut)); margin: 14px auto 0;
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(251,247,240,.45);
  transition: opacity .5s ease;
}
.gallery__hint.is-gone { opacity: 0; }
.gallery__hint svg { width: 26px; flex: none; }

/* ---------- "Your turn" end card ----------
   Fires on the strip's horizontal progress, not an
   IntersectionObserver: the card sits inside a horizontal scroller,
   so it is in the viewport long before it is actually on screen. */

.gal-end { position: relative; }

.gal-end__el {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--n) * 130ms + 260ms);
}
.gal-end.is-live .gal-end__el { opacity: 1; transform: none; }

/* a trail of prints walking up toward the button */
.paws {
  width: clamp(150px, 15vw, 220px);
  height: auto;
  margin-bottom: 22px;
  overflow: visible;
}
.paws .paw {
  fill: var(--sun);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  /* longhands rather than the shorthand: fill-mode and play-state
     were not surviving the shorthand parse, so the prints sat at
     full opacity instead of waiting paused at frame zero */
  animation-name: pawStep;
  animation-duration: .62s;
  animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-fill-mode: both;
  animation-play-state: paused;
  animation-delay: calc(var(--i) * 145ms);
}
.gal-end.is-live .paws .paw { animation-play-state: running; }

@keyframes pawStep {
  0%   { opacity: 0;   transform: scale(.4) translateY(10px) rotate(-12deg); }
  60%  { opacity: .95; }
  100% { opacity: .82; transform: scale(1) translateY(0) rotate(0); }
}

/* the button keeps breathing once it has landed */
.gal-end.is-live .btn--fill {
  animation: pulse 2.8s ease-in-out 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 30px -12px rgba(242,163,60,.85), 0 0 0 0 rgba(242,163,60,.42); }
  55%      { box-shadow: 0 12px 30px -12px rgba(242,163,60,.85), 0 0 0 18px rgba(242,163,60,0); }
}

/* ---------- the room : carousel ---------- */

.room { padding: clamp(76px, 11vw, 150px) 0; background: var(--bone); }
.room .sec { padding-left: var(--gut); padding-right: var(--gut); }

.cnav { display: flex; gap: 11px; }
.cbtn {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 1.5px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: background .35s, color .35s, border-color .35s, transform .35s;
}
.cbtn svg { width: 18px; height: 18px; }
.cbtn:hover { background: var(--forest); color: var(--cream); border-color: var(--forest); transform: scale(1.06); }
.cbtn[disabled] { opacity: .25; pointer-events: none; }

.carousel { overflow: hidden; padding: 0 var(--gut); cursor: grab; }
.carousel.is-drag { cursor: grabbing; }
.carousel__track { display: flex; gap: clamp(16px, 2vw, 30px); will-change: transform; }

.slide { flex: 0 0 clamp(260px, 31vw, 420px); position: relative; }
.slide__img { overflow: hidden; border-radius: 20px; aspect-ratio: 4/3.2; margin-bottom: 20px; background: var(--sand);
  box-shadow: 0 24px 50px -28px rgba(23,33,29,.6); }
.slide__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.slide:hover .slide__img img { transform: scale(1.06); }
.slide__n { font-size: .68rem; letter-spacing: .24em; color: var(--muted); }
.slide h3 { margin: 10px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 1.44rem; letter-spacing: -.015em; }
.slide p { margin: 0; font-size: .92rem; line-height: 1.75; color: var(--ink-2); }

.cbar { position: relative; width: calc(100% - 2 * var(--gut)); max-width: 1500px; height: 2px; margin: clamp(30px, 4vw, 48px) auto 0; background: rgba(23,33,29,.1); border-radius: 2px; }
.cbar span { position: absolute; left: 0; top: 0; height: 100%; width: 25%; background: var(--moss); border-radius: 2px; }

/* ---------- ecg + stats ---------- */

.ecg-sec { padding: clamp(60px, 9vw, 120px) var(--gut); }
.ecg { height: clamp(110px, 16vw, 190px); margin-bottom: clamp(34px, 5vw, 60px); }
.ecg canvas { width: 100%; height: 100%; display: block; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: clamp(18px, 3vw, 40px); }
.stat { padding-top: 22px; border-top: 1.5px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1; color: var(--forest); }
.stat span { display: block; margin-top: 9px; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- voices ---------- */

.voices { padding: clamp(70px, 10vw, 140px) var(--gut); }
.quotes { overflow: hidden; max-width: 980px; margin: 0 auto; cursor: grab; }
.quotes.is-drag { cursor: grabbing; }
.quotes__track { display: flex; will-change: transform; }
.quote { flex: 0 0 100%; margin: 0; padding: 0 clamp(8px, 4vw, 52px); text-align: center; opacity: .2; transition: opacity .7s var(--ease); }
.quote.is-active { opacity: 1; }
.quote p { margin: 0 0 24px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 3vw, 2.5rem); line-height: 1.28; letter-spacing: -.02em; text-wrap: balance; }
.quote cite { font-style: normal; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.dots { display: flex; justify-content: center; gap: 9px; margin-top: 40px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(23,33,29,.16); cursor: pointer; transition: background .4s, transform .4s; }
.dots button.is-on { background: var(--sun); transform: scale(1.35); }

/* ---------- book ---------- */

.book {
  padding: clamp(70px, 10vw, 150px) var(--gut);
  background: radial-gradient(ellipse 70% 60% at 18% 12%, #2a6249, var(--forest) 60%);
  color: var(--cream);
}
.book__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); max-width: 1400px; margin: 0 auto; }
.book__h2 { margin: 0 0 22px; max-width: 13ch; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.025em; }
.book__copy { margin: 0 0 38px; max-width: 42ch; line-height: 1.8; color: rgba(251,247,240,.68); }
.book__list { list-style: none; margin: 0; padding: 0; }
.book__list li { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid rgba(251,247,240,.16); align-items: baseline; }
.book__list span { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sun); }
.book__list a, .book__list b { color: rgba(251,247,240,.92); text-decoration: none; font-weight: 400; font-size: .96rem; }
.book__list a:hover { color: var(--sun); }

.form { padding: clamp(24px, 3vw, 38px); border-radius: 22px; background: rgba(251,247,240,.07); border: 1px solid rgba(251,247,240,.14); backdrop-filter: blur(14px); }
.fld { position: relative; margin-bottom: 22px; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 17px 0 10px; border: 0; border-bottom: 1.5px solid rgba(251,247,240,.24);
  background: transparent; color: var(--cream); font-family: var(--sans); font-size: .98rem; font-weight: 300; border-radius: 0;
  transition: border-color .35s;
}
.fld textarea { resize: vertical; }
.fld select { appearance: none; cursor: pointer; }
.fld select option { background: var(--forest); color: var(--cream); }
.fld label { position: absolute; left: 0; top: 17px; font-size: .98rem; color: rgba(251,247,240,.5); pointer-events: none; transform-origin: 0 0; transition: transform .35s var(--ease), color .35s; }
.fld input:focus + label, .fld textarea:focus + label,
.fld input:not(:placeholder-shown) + label, .fld textarea:not(:placeholder-shown) + label,
.fld select + label { transform: translateY(-18px) scale(.66); color: var(--sun); letter-spacing: .14em; text-transform: uppercase; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-bottom-color: var(--sun); }
.fld.is-bad input { border-bottom-color: var(--coral); }
.note { margin: 16px 0 0; min-height: 18px; font-size: .84rem; color: var(--sun); }

/* ---------- footer ---------- */

.foot { padding: 44px var(--gut) 34px; background: #12291f; color: rgba(251,247,240,.55); }
.foot__top { display: flex; flex-wrap: wrap; gap: 16px 30px; justify-content: space-between; align-items: center; padding-bottom: 26px; margin-bottom: 22px; border-bottom: 1px solid rgba(251,247,240,.12); }
.foot__brand { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .24em; color: var(--cream); }
.foot__links { display: flex; gap: clamp(14px, 2vw, 30px); flex-wrap: wrap; }
.foot__links a { color: inherit; text-decoration: none; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.foot__links a:hover { color: var(--sun); }
.foot__fine { margin: 0; font-size: .68rem; letter-spacing: .1em; color: rgba(251,247,240,.34); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .nav__links { display: none; }
  .book__grid { grid-template-columns: 1fr; }
  .hero__copy { max-width: none; right: var(--gut); top: auto; bottom: 26%; transform: none; }
  .vitals { flex-direction: row; gap: 26px; right: auto; left: var(--gut); bottom: 8%; text-align: left; }
  .herostage { height: 210vh; }
  .gallery { height: 175vh; }
  .sec--split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gal-end__el { opacity: 1; transform: none; transition: none; }
  .paws .paw { opacity: .82; animation-name: none; }
  .gal-end.is-live .btn--fill { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .word > i { transform: none; }
  .ticker__row, .cue span, .seal svg, .bokeh span { animation: none; }
  .hero__kick span, .hero__h1 .l > span { transform: none; animation: none; }
  .hero__sub, .hero__cta { opacity: 1; animation: none; }
  .card__art path, .card__art circle, .card__art rect { stroke-dashoffset: 0; }
}
