/* ===========================================================================
   websight-agency

   Brand values arrive ONLY as the custom properties render.js writes into the
   :root block above this file. Nothing here hardcodes a hex that belongs to a
   business — every colour below is either derived from a --brand-* token or is
   structural (a scrim, a hairline, a shadow).

   Vertical rhythm lives in one token, --band-y. Change it, not eleven rules.
   =========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  /* Deliberately no `scroll-behavior: smooth`. It animates programmatic
     scrolls too, so screenshot.js captures a band mid-flight and ships a
     blank section — the trap recorded in the project's notes. */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand-primary-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.on-dark :focus-visible { outline-color: var(--on-dark); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--dark);
  color: var(--on-dark);
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-md) 0;
  font-size: .9rem;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------- */

:root {
  --shell: 75rem;
  --shell-pad: clamp(1.25rem, 4vw, 2rem);
  --band-y: clamp(4rem, 7.5vw, 6.5rem);

  --radius-sm: .375rem;
  --radius-md: .5rem;
  --radius-lg: .75rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;

  /* Type. The display face is a high-contrast serif at one weight, so size and
     the serif's own contrast do the work that weight would do badly. */
  --t-display: clamp(2.9rem, 7.2vw, 5.75rem);
  --t-h1: clamp(2rem, 4vw, 3rem);
  --t-h3: clamp(1.25rem, 1.7vw, 1.5rem);
  --t-body: 1.0625rem;
  --t-body-lg: clamp(1.0625rem, 1.35vw, 1.175rem);
  --t-small: .9rem;
  --t-eyebrow: .78rem;

  /* Semantic aliases over the brand tokens, so every rule below reads as a
     role rather than as a colour slot. */
  --paper: var(--brand-surface);
  --wash: var(--brand-surface-alt);
  --ink: var(--brand-ink);
  --ink-muted: var(--brand-ink-muted);
  --line: var(--brand-border);
  --dark: var(--brand-primary);
  --on-dark: var(--brand-on-primary);

  --on-dark-72: color-mix(in srgb, var(--brand-on-primary) 72%, transparent);
  --on-dark-55: color-mix(in srgb, var(--brand-on-primary) 55%, transparent);
  --line-light: color-mix(in srgb, var(--brand-on-primary) 18%, transparent);

  --shadow-card:
    0 1px 2px color-mix(in srgb, var(--brand-primary) 8%, transparent),
    0 6px 20px color-mix(in srgb, var(--brand-primary) 8%, transparent);
  --shadow-card-hover:
    0 2px 4px color-mix(in srgb, var(--brand-primary) 10%, transparent),
    0 18px 40px color-mix(in srgb, var(--brand-primary) 14%, transparent);

  /* Type over photography cannot be contrast-checked by render.js, which reads
     declared colours only. The scrims below and this shadow are what make it
     safe rather than lucky. */
  --media-shadow: 0 1px 24px color-mix(in srgb, #000 45%, transparent);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------------------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section {
  position: relative;
  padding-block: var(--band-y);
}

.section--alt { background: var(--wash); }

.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 4.5vw, 3.75rem); }

/* That margin exists to separate the head from what follows it, and several
   bands below have nothing following on a build that supplied no figures and
   no photograph — the studio band is copy alone on this one. Left in, it is a
   run of empty paper before the next section's own padding, which is the
   stacked-emptiness fault `pilates-editorial` records around its gradient
   ramps. If the head is the last thing in the band, it needs no gap under it. */
.section__head:last-child { margin-bottom: 0; }

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__lede {
  margin-top: 1.125rem;
  color: var(--ink-muted);
  font-size: var(--t-body-lg);
  max-width: 42rem;
}

.section__head--center .section__lede { margin-inline: auto; }

.eyebrow {
  margin-bottom: 1rem;
  color: var(--brand-primary-ink);
  font-family: var(--font-body);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.4;
}

.on-dark .eyebrow { color: var(--on-dark-72); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.02;
}

.editorial-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h1);
  line-height: 1.1;
  letter-spacing: -.018em;
  text-wrap: balance;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: var(--brand-on-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              transform .3s var(--ease), box-shadow .3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn--sm { padding: .68rem 1.15rem; font-size: .88rem; }

/* On the hero and the closing band the ground is already the primary, so a
   primary button would vanish into it. */
.btn--light {
  background: var(--brand-on-primary);
  color: var(--brand-primary-ink);
}

.btn--outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--outline:hover { border-color: var(--brand-primary); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: inherit;
}

/* A 18%-alpha hairline disappears over a photograph, so on any dark band the
   ghost border is restated at a weight that survives one. */
.on-dark .btn--ghost {
  border-color: var(--on-dark-55);
  color: var(--on-dark);
  text-shadow: var(--media-shadow);
}
.on-dark .btn--ghost:hover { border-color: var(--on-dark); }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-block: .875rem;
  color: var(--on-dark);
  transition: background-color .4s var(--ease), padding .4s var(--ease),
              box-shadow .4s var(--ease);
}

/* Transparent over the hero, its own ground once past it. Safe in both states
   because the hero band is the brand primary whether or not any photography
   ever arrives — so the bar is never light-on-light. */
.site-header.is-scrolled {
  padding-block: .55rem;
  background: color-mix(in srgb, var(--brand-primary) 94%, transparent);
  box-shadow: 0 1px 0 var(--line-light);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__brand { display: inline-flex; align-items: center; text-decoration: none; }

.site-header__logo {
  width: auto;
  height: clamp(1.5rem, 2.2vw, 1.9rem);
  object-fit: contain;
}

.site-header__wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -.01em;
  color: var(--on-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
}

.site-nav a {
  position: relative;
  color: var(--on-dark-72);
  font-size: .95rem;
  text-decoration: none;
  transition: color .25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.4rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.site-nav a:hover { color: var(--on-dark); }
.site-nav a:hover::after { transform: scaleX(1); }

.site-header__actions { display: flex; align-items: center; gap: .75rem; }
.site-header__actions .btn { background: var(--brand-on-primary); color: var(--brand-primary-ink); }

.site-header__toggle {
  display: none;
  width: 2.5rem; height: 2.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header__toggle span:not(.sr-only) {
  width: 1.15rem; height: 1.5px;
  background: var(--on-dark);
  transition: transform .3s var(--ease), opacity .2s linear;
}

.site-header__toggle.is-open span:nth-child(1) { transform: translateY(.45rem) rotate(45deg); }
.site-header__toggle.is-open span:nth-child(2) { opacity: 0; }
.site-header__toggle.is-open span:nth-child(3) { transform: translateY(-.45rem) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: var(--dark);
  border-top: 1px solid var(--line-light);
}
.mobile-menu .shell { display: flex; flex-direction: column; gap: 1.1rem; padding-block: 1.5rem 2rem; }
.mobile-menu a { color: var(--on-dark); font-size: 1.05rem; text-decoration: none; }
.mobile-menu .btn { align-self: flex-start; background: var(--brand-on-primary); color: var(--brand-primary-ink); }

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(9rem, 16vw, 13rem) clamp(4.5rem, 9vw, 7.5rem);
}

.hero--media { min-height: min(46rem, 92vh); }

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video,
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Pulled toward the brand's own warmth so a supplied clip cannot fight the
     palette it is sitting inside. */
  filter: saturate(.72) contrast(1.04);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Three stops, heaviest at the foot. Whatever the video or the still turns
     out to be, --on-dark type has to clear 4.5:1 over it, and render.js cannot
     measure text over an image — it reads declared colours only. */
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand-primary) 78%, transparent) 0%,
      color-mix(in srgb, var(--brand-primary) 62%, transparent) 42%,
      color-mix(in srgb, var(--brand-primary) 92%, transparent) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 52rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__headline {
  font-size: var(--t-display);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.hero--media .hero__headline { text-shadow: var(--media-shadow); }

/* The second line in the display italic. The wordmark already pairs an upright
   with an italic; repeating that pairing is the cheapest brand echo there is. */
.hero__accent {
  display: block;
  font-style: italic;
  color: color-mix(in srgb, var(--brand-on-primary) 88%, var(--brand-secondary));
}

.hero__lede {
  max-width: 38rem;
  margin-bottom: 2.25rem;
  color: var(--on-dark-72);
  font-size: var(--t-body-lg);
}

.hero--media .hero__lede { text-shadow: var(--media-shadow); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .875rem;
}

.hero__actions .btn:not(.btn--ghost) {
  background: var(--brand-on-primary);
  color: var(--brand-primary-ink);
}

/* ---------------------------------------------------------------------------
   Trust strip
   --------------------------------------------------------------------------- */

.clients {
  padding-block: clamp(2.5rem, 4.5vw, 3.5rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.clients__label {
  margin-bottom: 1.75rem;
  color: var(--ink-muted);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
}

.marquee {
  position: relative;
  /* Fades the ends rather than cutting them, so a name never half-exists at
     the edge of the viewport. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-slide 42s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__row {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-right: clamp(2.5rem, 6vw, 5rem);
}

.marquee__item img {
  height: clamp(1.6rem, 2.4vw, 2.1rem);
  width: auto;
  object-fit: contain;
  opacity: .55;
  filter: grayscale(1);
  transition: opacity .3s var(--ease), filter .3s var(--ease);
}

.marquee__item:hover img { opacity: 1; filter: grayscale(0); }

.marquee__item span {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  color: var(--ink-muted);
  white-space: nowrap;
}

@keyframes marquee-slide {
  from { transform: translateX(0); }
  /* Exactly half, because the row is rendered twice — anything else jumps. */
  to   { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------------
   Selected work
   --------------------------------------------------------------------------- */

.work__grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* A single case study centred rather than stranded in the left half. */
.work__grid[data-count="1"] {
  grid-template-columns: minmax(0, 44rem);
  justify-content: center;
}

/* Three wide cards in a two-up grid leave a dead cell. The FIRST takes the
   full width instead — lead with the strongest piece and let the other two
   sit under it, which is the order the reference sets and the order a
   portfolio wants anyway. */
.work__grid[data-count="3"] .work-card:first-child { grid-column: 1 / -1; }
.work__grid[data-count="3"] .work-card:first-child .work-card__frame { aspect-ratio: 21 / 9; }

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

/* The caption line the photograph hangs from: name on the left, cue on the
   right, baselines aligned. */
.work-card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .25rem;
}

.work-card__id { display: flex; flex-direction: column; gap: .3rem; }

.work-card__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--wash);
  aspect-ratio: 16 / 10;
  /* aspect-ratio against an unpinned width derives one — the trap that put a
     427px box inside a 375px column on `woolmers`. */
  width: 100%;
}

.work-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A project with no photograph yet: a ruled ground rather than a gap. */
.work-card--bare .work-card__frame {
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--brand-primary) 8%, var(--wash)) 0%,
      var(--wash) 60%);
  border: 1px solid var(--line);
}

.work-card__overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  justify-content: flex-end;
  gap: .75rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--on-dark);
  background:
    linear-gradient(180deg,
      transparent 30%,
      color-mix(in srgb, var(--brand-primary) 88%, transparent) 100%);
}

.work-card__overlay p { font-size: var(--t-body); text-shadow: var(--media-shadow); }

.work-card__cue {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
  color: var(--brand-primary-ink);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: gap .3s var(--ease);
}

.work-card:hover .work-card__cue { gap: .65rem; }

.work-card__sector {
  color: var(--brand-primary-ink);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.work-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h3);
  letter-spacing: -.01em;
  line-height: 1.15;
}

.work-card__summary { color: var(--ink-muted); font-size: var(--t-small); }

/* Stretched hit area, so the markup has one shape whether or not a case study
   has somewhere to go. */
.work-card__hit { position: absolute; inset: 0; z-index: 3; }

@media (hover: hover) and (min-width: 48rem) {
  .work-card__overlay {
    display: flex;
    opacity: 0;
    transition: opacity .4s var(--ease);
  }
  .work-card__overlay p {
    transform: translateY(8px);
    transition: transform .45s var(--ease);
  }
  .work-card:hover .work-card__overlay,
  .work-card:focus-within .work-card__overlay { opacity: 1; }
  .work-card:hover .work-card__overlay p,
  .work-card:focus-within .work-card__overlay p { transform: translateY(0); }

  /* The summary is in the overlay at this width, so it must not also sit
     under the title — but a card with no photograph has no overlay worth
     showing, and keeps its summary in the open. */
  .work-card:not(.work-card--bare) .work-card__summary { display: none; }
  .work-card--bare .work-card__overlay { display: none; }
}

.work__more { margin-top: clamp(2.5rem, 4vw, 3.5rem); text-align: center; }

/* ---------------------------------------------------------------------------
   Services
   --------------------------------------------------------------------------- */

.services__grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Columns from data-count, so a studio selling four services never gets a dead
   fifth cell. Every count 1–6 is defined. */
.services__grid[data-count="1"] { grid-template-columns: minmax(0, 32rem); justify-content: center; }
.services__grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.services__grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.services__grid[data-count="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Five in a three-across grid leaves one dead cell on the second row; the
   last two share the row instead. */
.services__grid[data-count="5"] .service-card:nth-child(4) { grid-column: 1 / span 1; }

.service-card {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-primary) 26%, var(--line));
  box-shadow: var(--shadow-card-hover);
}

/* A line icon in a soft chip. Both colours are mixed from the brand primary
   against whichever paper the card sits on, so the chip is always a tint of
   the business's own colour and never a hue this stylesheet picked. */
.service-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-primary) 11%, var(--paper));
  color: var(--brand-primary-ink);
  transition: background-color .4s var(--ease);
}

.service-card:hover .service-card__icon {
  background: color-mix(in srgb, var(--brand-primary) 18%, var(--paper));
}

.service-card__icon svg { width: 1.3rem; height: 1.3rem; display: block; }

.service-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h3);
  letter-spacing: -.01em;
  line-height: 1.15;
}

.service-card__body { color: var(--ink-muted); font-size: var(--t-small); }

.service-card__list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .375rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.service-card__list li {
  position: relative;
  padding-left: 1rem;
  color: var(--ink-muted);
  font-size: .875rem;
  line-height: 1.5;
}

.service-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: .3rem; height: .3rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary) 55%, transparent);
}

/* ---------------------------------------------------------------------------
   Why us
   --------------------------------------------------------------------------- */

.reasons__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.reason {
  display: grid;
  grid-template-columns: 5rem minmax(0, 18rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 3.2vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}

/* Mixed against the ground rather than given an alpha, so it stays a tint of
   the brand on whichever paper the band happens to be. Below about half it
   stops registering as a numeral at all and reads as a smudge. */
.reason__num {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1;
  color: color-mix(in srgb, var(--brand-primary) 52%, var(--paper));
}

.section--alt .reason__num { color: color-mix(in srgb, var(--brand-primary) 52%, var(--wash)); }

.reason__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -.01em;
}

.reason__body { color: var(--ink-muted); }

/* ---------------------------------------------------------------------------
   Reviews
   --------------------------------------------------------------------------- */

.reviews {
  background: var(--dark);
  color: var(--on-dark);
}

.reviews .editorial-h1 { color: var(--on-dark); }

/* One quote at a time, set plainly on the band rather than in a card: on a
   full-bleed dark ground a bordered box would be a second frame inside a
   frame the band already is. */
.reviews__carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(.5rem, 2vw, 1.5rem);
}

.reviews__arrow--prev { grid-column: 1; grid-row: 1; }
.reviews__rail        { grid-column: 2; grid-row: 1; }
.reviews__arrow--next { grid-column: 3; grid-row: 1; }
.reviews__dots        { grid-column: 1 / -1; grid-row: 2; }

/* The rail IS the carousel. Snapping, dragging, swiping and keyboard scroll
   all come free from an overflow box; the script only adds the arrows and the
   dots on top, so nothing here depends on it running. */
.reviews__rail {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reviews__rail::-webkit-scrollbar { display: none; }

.review {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding-inline: clamp(0rem, 3vw, 2.5rem);
}

.review__quote {
  max-width: 44rem;
  color: var(--on-dark-72);
  font-size: clamp(1.0625rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.review__by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

.reviews__arrow {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  color: var(--on-dark-72);
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}

.reviews__arrow:hover:not(:disabled) { border-color: var(--on-dark); color: var(--on-dark); }
.reviews__arrow:disabled { opacity: .25; cursor: default; }

.reviews__dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.reviews__dot {
  width: .45rem;
  height: .45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line-light);
  cursor: pointer;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}

.reviews__dot.is-on { background: var(--on-dark); transform: scale(1.35); }

.review__by b { display: block; font-size: .95rem; font-weight: 600; }
.review__by em { display: block; font-style: normal; font-size: .85rem; color: var(--on-dark-55); }

.monogram {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
}

.stars { display: flex; gap: .15rem; }
.star { fill: var(--line-light); }
.star.is-on { fill: var(--brand-secondary); }

/* ---------------------------------------------------------------------------
   The studio
   --------------------------------------------------------------------------- */

.about { overflow: hidden; }

/* A wide soft glow rising behind the heading. `max-width: none` because the
   global `img { max-width: 100% }` would otherwise pin it to the shell and
   the arc would stop being wider than the text it haloes. */
.about__arc {
  position: absolute;
  z-index: 0;
  top: clamp(-3rem, -2vw, 0rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(82rem, 165%);
  max-width: none;
  height: auto;
  opacity: .55;
  pointer-events: none;
  user-select: none;
}

.about > .shell { position: relative; z-index: 1; }

.about__body { max-width: 44rem; }
.about__actions { margin-top: 1.75rem; }

.about__figure {
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 21 / 9;
  width: 100%;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.about__figure img { width: 100%; height: 100%; object-fit: cover; }

.stats {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.stats[data-count="1"] { grid-template-columns: minmax(0, 20rem); justify-content: center; }
.stats[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat { text-align: center; }

.stat__value {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1;
  color: var(--brand-primary-ink);
}

.stat__label {
  margin-top: .5rem;
  color: var(--ink-muted);
  font-size: var(--t-small);
}

/* ---------------------------------------------------------------------------
   Closing band
   --------------------------------------------------------------------------- */

.final {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark);
  text-align: center;
}

.final__inner {
  position: relative;
  z-index: 2;
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final__stamp {
  width: clamp(4rem, 7vw, 5.5rem);
  height: auto;
  margin-bottom: 1.75rem;
  opacity: .9;
}

.final__headline {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.final__sub {
  max-width: 34rem;
  margin-bottom: 2.25rem;
  color: var(--on-dark-72);
  font-size: var(--t-body-lg);
}

.final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .875rem; }

.final__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
  color: var(--on-dark-72);
  font-size: var(--t-small);
}
.final__details a { text-decoration: none; }
.final__details a:hover { color: var(--on-dark); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */

.site-footer {
  background: var(--dark);
  color: var(--on-dark);
  border-top: 1px solid var(--line-light);
  padding-block: clamp(3rem, 5.5vw, 4.5rem) 2rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.site-footer__logo { width: auto; height: clamp(1.75rem, 2.8vw, 2.4rem); object-fit: contain; }

.site-footer__wordmark { font-family: var(--font-display); font-size: 1.75rem; }

.site-footer__tagline {
  color: var(--on-dark-55);
  font-size: var(--t-small);
  letter-spacing: .04em;
  max-width: 32rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem clamp(1.25rem, 3vw, 2.25rem);
}
.site-footer__nav a { color: var(--on-dark-72); font-size: .95rem; text-decoration: none; }
.site-footer__nav a:hover { color: var(--on-dark); }

.site-footer__social { display: flex; gap: .625rem; }

.site-footer__social a {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  color: var(--on-dark-72);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.site-footer__social a:hover { border-color: var(--on-dark); color: var(--on-dark); }

.site-footer__base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  width: 100%;
  margin-top: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-light);
  color: var(--on-dark-55);
  font-size: .82rem;
}

.site-footer__note { max-width: 42rem; }
.site-footer__legal { display: flex; gap: 1rem; }
.site-footer__legal a { text-decoration: none; }
.site-footer__legal a:hover { color: var(--on-dark); }

/* ---------------------------------------------------------------------------
   Motion

   Every hidden state below is gated on `.js`, so content is only ever hidden
   once there is a script running that can bring it back. Without the gate, a
   scripting failure ships a blank page.
   --------------------------------------------------------------------------- */

.js .reveal,
.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}

.js .reveal.is-visible,
.js .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

/* Word-by-word display headlines. The mask is the .w box; the inner span is
   what travels. The padding/margin pair gives descenders room inside an
   overflow:hidden box that would otherwise clip them. */
.words { display: inline; }

/* Two padding/margin pairs, both compensating for the same thing: the box has
   to be bigger than the type so `overflow: hidden` masks only the travel and
   never the glyph. Vertically that is descenders. Horizontally it is the
   italic's overhang — an italic `l` ends well to the right of its advance
   width, so without the right-hand pair the last letter of a word set in the
   display italic is sliced off and the headline reads "beautifu home". */
.words .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .14em;
  margin-bottom: -.14em;
  padding-right: .14em;
  margin-right: -.14em;
}

.js .words .w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform .8s var(--ease);
}

.js .words.is-visible .w > span { transform: translateY(0); }

.js .words.is-visible .w:nth-child(1)  > span { transition-delay: 0ms; }
.js .words.is-visible .w:nth-child(2)  > span { transition-delay: 45ms; }
.js .words.is-visible .w:nth-child(3)  > span { transition-delay: 90ms; }
.js .words.is-visible .w:nth-child(4)  > span { transition-delay: 135ms; }
.js .words.is-visible .w:nth-child(5)  > span { transition-delay: 180ms; }
.js .words.is-visible .w:nth-child(6)  > span { transition-delay: 225ms; }
.js .words.is-visible .w:nth-child(7)  > span { transition-delay: 270ms; }
.js .words.is-visible .w:nth-child(8)  > span { transition-delay: 315ms; }
.js .words.is-visible .w:nth-child(9)  > span { transition-delay: 360ms; }
.js .words.is-visible .w:nth-child(10) > span { transition-delay: 405ms; }
.js .words.is-visible .w:nth-child(n+11) > span { transition-delay: 450ms; }

.img-frame { overflow: hidden; }

.img-zoom { transition: transform 1.1s var(--ease); }
.work-card:hover .img-zoom { transform: scale(1.04); }

/* A very slow drift, so a still hero is never quite static. */
.img-slow-zoom { animation: slow-zoom 24s ease-in-out infinite alternate; }

@keyframes slow-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* The layer overhangs its scene top and bottom, so it can travel without ever
   showing an edge. 8% covers the ±4% the script applies. */
.parallax { position: absolute; inset: 0; overflow: hidden; }
.parallax__layer { position: absolute; inset: -8% 0; will-change: transform; }
.parallax__layer > * { width: 100%; height: 100%; object-fit: cover; }

/* A dusting of noise over the dark bands, so a large flat field of one colour
   reads as paper rather than as a fill. */
.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .28;
  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)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------------
   Narrow viewports
   --------------------------------------------------------------------------- */

@media (max-width: 60rem) {
  /* [data-count] is repeated on every one of these, because a bare
     `.services__grid` loses the cascade to `.services__grid[data-count="4"]`
     above and the override silently does nothing. */
  .services__grid[data-count] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work__grid[data-count] { grid-template-columns: minmax(0, 1fr); }
  .work__grid[data-count="3"] .work-card:last-child .work-card__frame { aspect-ratio: 16 / 10; }

  .reason { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .reason__body { grid-column: 2; }

  .site-nav { display: none; }
  .site-header__toggle { display: flex; }
  .mobile-menu { display: block; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
  .mobile-menu.is-open { max-height: 32rem; }
}

@media (max-width: 40rem) {
  .services__grid[data-count],
  .stats[data-count] { grid-template-columns: minmax(0, 1fr); }

  /* No room for arrows beside the quote at this width, and none needed: the
     rail is swipeable and the dots still drive it. */
  .reviews__arrow { display: none; }
  .reviews__rail { grid-column: 1 / -1; }

  /* A portrait photograph in a 16:10 frame crops to a letterbox of its middle.
     Taller frames on a phone give an upright image somewhere to be. */
  .work-card__frame,
  .work__grid[data-count="3"] .work-card:first-child .work-card__frame { aspect-ratio: 4 / 3; }

  .services__grid[data-count="5"] .service-card:nth-child(4) { grid-column: auto; }

  .hero { padding-block: clamp(7.5rem, 22vw, 9rem) 4rem; }
  .hero--media { min-height: 0; }

  /* The centred column is shrink-to-fit, so the row has to be told to take the
     full width before `flex: 1 1 0` has anything to divide. */
  .hero__actions,
  .final__actions { flex-wrap: nowrap; align-self: stretch; width: 100%; }
  .hero__actions .btn,
  .final__actions .btn { flex: 1 1 0; padding-inline: 1rem; }

  .site-header__actions .btn { display: none; }

  .reason { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .reason__body { grid-column: auto; }
  .reason__num { margin-bottom: .25rem; }
}

/* ---------------------------------------------------------------------------
   Reduced motion

   Everything above resolves to its finished state. Nothing moves, nothing
   fades in, and no section can be left invisible because a transition never
   ran. The hero video is paused by the script for the same reason.
   --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .reveal-stagger > * { opacity: 1; transform: none; filter: none; }
  .js .words .w > span { transform: none; }
  .parallax__layer { transform: none !important; }
  .marquee__track { animation: none; }
}
