/* Display face: Marcellus SC, the closest free match to the flared capitals in the
   Inpromptu logo. Self-hosted (OFL licence in assets/fonts). One weight only, so the
   face is declared across the weight range to stop browsers faking a bold. */
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Marcellus SC";
  src: url("assets/fonts/marcellus-sc.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Marcellus";
  src: url("assets/fonts/marcellus.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5c5c5c;
  --line: #e8e8e8;
  --soft: #f7f7f7;
  /* Metallic steel grey — hovers, shines, focus */
  --accent: #b3bbc3;
  --accent-deep: #7c8791;
  --accent-ink: #48525c;
  --accent-soft: #eef0f2;
  --accent-glow: rgba(124, 135, 145, 0.4);
  --accent-glow-soft: rgba(124, 135, 145, 0.2);
  --steel: linear-gradient(135deg, #dfe3e7 0%, #aab2ba 28%, #eef1f3 48%, #959ea7 70%, #cfd4d9 100%);
  --max: 1080px;
  --radius: 999px;
  --font-display: "Marcellus SC", "Marcellus", Georgia, serif;
  --font-quote: "Marcellus", Georgia, serif;
  --font-body: "DM Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* ——— Nav ——— */
/* Meshing cog train. Geometry (size, position, phase) is generated in main.js. */
.gear-train {
  --cog-turn: 0deg;
  --gear-scale: 1;
  position: fixed;
  right: 0;
  top: calc(50% - 400px);
  z-index: 0;
  width: 1000px;
  height: 900px;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  filter: drop-shadow(0 12px 24px rgba(40, 50, 60, 0.05));
  /* soft edges: the cogs dissolve into the page towards the content and the bottom */
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 82% 50%, #000 35%, rgba(0, 0, 0, 0.55) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 82% 50%, #000 35%, rgba(0, 0, 0, 0.55) 70%, transparent 100%);
  contain: layout paint style;
  transform: scale(var(--gear-scale));
  transform-origin: right 480px;
}

.gear-train.is-quiet,
.gear-train.is-faint {
  opacity: 0.45;
}

@media (max-width: 720px) {
  .gear-train,
  .gear-train.is-quiet {
    opacity: 0.28;
  }
}

.gear-train.is-light { filter: none; }

.gear {
  position: absolute;
  display: block;
  overflow: visible;
  will-change: transform;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

/* ——— Header ——— */
.topbar {
  --bar-h: 4.25rem;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--bar-h);
  padding: 0.65rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    padding 0.35s var(--ease);
}

.topbar.is-scrolled {
  padding-block: 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 24px rgba(10, 10, 10, 0.04);
}

/* Holographic edge along the bottom of the bar: a fine line in shifting steel greys with a
   silvery sheen that slowly drifts, plus a barely-there glow. Only background-position
   animates on a 1px strip, so it costs next to nothing to draw. */
.topbar::after,
.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #9ba4ad 0%,
    #d3d8dd 12%,
    #f5f7f8 20%,
    #aeb6be 32%,
    #7c8791 46%,
    #c6ccd2 60%,
    #f0f2f4 68%,
    #9ba4ad 80%,
    #8a949d 92%,
    #9ba4ad 100%
  );
  background-size: 200% 100%;
  opacity: 0.75;
  animation: holo-drift 22s linear infinite;
}

/* the glow: same steel greys, blurred and very faint */
.topbar::before {
  bottom: -3px;
  height: 5px;
  filter: blur(4px);
  opacity: 0.22;
}

@keyframes holo-drift {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar::after,
  .topbar::before {
    animation: none;
  }
}

/* Brand: small horse + name */
.topbar__brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--ink);
}

.topbar__logo {
  width: auto;
  height: 2.35rem;
  flex-shrink: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), width 0.45s var(--ease);
}

.topbar__brand:focus:not(:focus-visible) {
  outline: none;
}

.topbar__brand:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 4px;
  border-radius: 6px;
}

.topbar__brand:hover .topbar__logo {
  transform: translateX(-2px) rotate(-3deg);
}

/* The wordmark lettering lifted straight from the logo artwork */
.topbar__wordmark {
  display: block;
  width: auto;
  height: 1.2rem;
  flex-shrink: 0;
}

/* Home: the big animated logo is already on screen, so the small one waits
   until you scroll past it */
.topbar--home:not(.show-mark) .topbar__logo {
  width: 0;
  opacity: 0;
  transform: translateY(6px) scale(0.8);
}

.topbar--home:not(.show-mark) .topbar__brand {
  gap: 0;
}

.topbar__brand {
  transform-origin: left center;
  transition:
    gap 0.45s var(--ease),
    transform 0.35s var(--ease);
}

/* Hover: whatever the cursor is on grows smoothly */
@media (hover: hover) {
  .topbar__brand:hover,
  .topbar__brand:focus-visible {
    transform: scale(1.06);
  }

  .topbar__link:hover,
  .topbar__link:focus-visible {
    transform: scale(1.1);
  }

  .topbar__cta:hover,
  .topbar__cta:focus-visible {
    transform: translateY(-1px) scale(1.06);
  }
}

/* Nav links + sliding pill */
.topbar__nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.topbar__links {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.topbar__pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--pill-w, 0px);
  height: var(--pill-h, 0px);
  transform: translate(var(--pill-x, 0px), var(--pill-y, 0px));
  border-radius: 999px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(124, 135, 145, 0.28);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.3, 1.25, 0.4, 1),
    width 0.42s cubic-bezier(0.3, 1.25, 0.4, 1),
    height 0.42s cubic-bezier(0.3, 1.25, 0.4, 1),
    opacity 0.25s var(--ease);
}

.topbar__pill.is-on {
  opacity: 1;
}

.topbar__pill.is-on.on-cta {
  opacity: 0;
}

.topbar__link {
  position: relative;
  z-index: 1;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2a2a2a;
  transition:
    color 0.2s var(--ease),
    transform 0.35s var(--ease);
}

.topbar__link:hover,
.topbar__link:focus-visible {
  color: var(--ink);
}

.topbar__link[aria-current="page"] {
  color: var(--ink);
}

.topbar__link:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.topbar__cta {
  --cta-pad-x: 1.15rem;
  z-index: 1;
  min-height: 2.6rem;
  padding-block: 0.55rem;
  font-size: 0.74rem;
  box-shadow: 0 6px 16px rgba(10, 10, 10, 0.12);
}

.topbar__cta[aria-current="page"] {
  color: var(--ink);
  background-size: 100% 100%;
}

/* Menu button: three lines that fold into an X */
.topbar__toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.topbar__toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.1rem;
  height: 1.6px;
  margin-left: -0.55rem;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}

.topbar__toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.topbar__toggle span:nth-child(3) {
  transform: translateY(6px);
}

.topbar.is-open .topbar__toggle span:nth-child(1) {
  transform: rotate(45deg);
}

.topbar.is-open .topbar__toggle span:nth-child(2) {
  opacity: 0;
}

.topbar.is-open .topbar__toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

.topbar__toggle:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

@media (max-width: 1000px) {
  .topbar__wordmark {
    height: 0.95rem;
  }

  .topbar__link {
    padding-inline: 0.8rem;
  }
}

@media (max-width: 860px) {
  .topbar {
    --bar-h: 3.75rem;
  }

  .topbar__toggle {
    display: block;
  }

  .topbar__logo {
    height: 2rem;
  }

  /* Fit the full wordmark beside the horse and menu button on any phone */
  .topbar__wordmark {
    height: min(0.95rem, calc((100vw - 9.75rem) / 14.9));
  }

  /* Full-screen menu */
  .topbar__nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: calc(var(--bar-h) + 2rem) 1.5rem calc(2rem + env(safe-area-inset-bottom));
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .topbar.is-open .topbar__nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease), visibility 0s;
  }

  .topbar__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .topbar__pill {
    display: none;
  }

  .topbar__link {
    padding: 1rem 0;
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 1.81rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.2s;
  }

  .topbar.is-open .topbar__link {
    opacity: 1;
    transform: none;
  }

  .topbar.is-open .topbar__link:nth-child(3) { transition-delay: 0.05s; }
  .topbar.is-open .topbar__link:nth-child(4) { transition-delay: 0.1s; }

  .topbar__link[aria-current="page"] {
    color: var(--accent-ink);
  }

  .topbar__cta {
    min-height: 3.25rem;
    font-size: 0.82rem;
  }

  /* While the menu is open the page behind shouldn't scroll */
  html.menu-open {
    overflow: hidden;
  }

  /* backdrop-filter would make the bar the containing block for the fixed menu */
  .topbar.is-open {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ——— Buttons ——— */
.cta {
  --cta-pad-x: 1.45rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem var(--cta-pad-x);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.cta__arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.cta:hover .cta__arrow {
  transform: translateX(3px);
}

.cta--solid {
  /* The steel hover fill is part of the button's own background (a gradient that grows
     from the left), so there's no separate layer for a dark edge to show around. */
  background-color: var(--ink);
  background-image: var(--steel);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  /* size the steel from the outer edge, so it also covers the 1px border ring */
  background-origin: border-box;
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.14);
  transition:
    background-size 0.45s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.cta--solid:hover,
.cta--solid:focus-visible {
  background-size: 100% 100%;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px var(--accent-glow);
}

.cta--solid:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px var(--accent-glow-soft);
}

.cta:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

.cta--line {
  background-color: transparent;
  background-image: var(--steel);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  background-origin: border-box;
  color: var(--ink);
  border-color: var(--ink);
  transition: background-size 0.45s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.cta--line:hover,
.cta--line:focus-visible {
  background-size: 100% 100%;
  color: var(--ink);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px var(--accent-glow);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ——— Home hero ——— */
.hero {
  min-height: calc(100svh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
  overflow-x: clip;
}

.hero__inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 2.4rem);
  justify-items: center;
  text-align: center;
}

.logo-mark {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1348 / 790;
  margin: 0 auto;
  overflow: visible;
}

.logo-mark__swirl {
  position: absolute;
  inset: 0;
  transform-origin: 50% 60%;
}

.logo-mark__reveal,
.logo-mark__graphic,
.logo-mark__word {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

.logo-mark__graphic,
.logo-mark__word {
  object-fit: contain;
}

/* Exact logo revealed through growing mask strokes (no sketch→logo jump) */
.logo-mark__reveal {
  z-index: 2;
  overflow: visible;
  display: block;
}

.logo-mark.is-drawing .logo-mark__swirl {
  animation: logo-settle 2s var(--ease-out) both;
}

/* Hide the static logo until the draw starts (JS adds .js in <head>).
   Failsafe: show it anyway after 3s if the script never runs. */
.js .logo-mark:not(.is-drawing):not(.is-drawn) .logo-mark__swirl {
  visibility: hidden;
  animation: logo-failsafe 0s 5s forwards;
}

@keyframes logo-failsafe {
  to {
    visibility: visible;
  }
}

.logo-mark__graphic {
  z-index: 1;
}

.logo-mark__graphic[hidden] {
  display: none !important;
}

.logo-mark__word {
  z-index: 4;
}

.logo-mark__word[hidden] {
  display: none !important;
}

/* Wordmark draws inside the masked SVG — no late slide-in / second image */

.logo-mark.is-drawn .logo-mark__swirl {
  transform: none;
  animation: none;
}

@keyframes logo-settle {
  0% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

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

.hero__copy {
  width: min(44rem, 100%);
  max-width: 100%;
  justify-self: center;
  text-align: center;
  padding: 0 clamp(0.15rem, 1vw, 0.5rem);
}

.hero__title {
  --title-w: min(54rem, calc(100vw - 2.5rem));
  width: var(--title-w);
  margin: 0 calc((100% - var(--title-w)) / 2) 1.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.59rem, 3.61vw, 2.36rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--ink);
}

.hero__columns {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  column-gap: clamp(1.25rem, 3.5vw, 2.25rem);
  align-items: stretch;
  margin: 0 0 0.35rem;
  overflow: hidden;
}

.hero__divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-deep) 20%, var(--accent-deep) 80%, transparent);
  justify-self: center;
}

.hero__lede--left {
  text-align: right;
}

.hero__lede--right {
  text-align: left;
}

.hero__lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.12rem);
  line-height: 1.55;
}

/* CTA + tabs share one centred column — same horizontal centre at every width */
.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: clamp(1.6rem, 3vw, 2rem) auto 0;
}

.hero__actions .cta-row {
  margin-top: 0;
  width: auto;
  justify-content: center;
}

/* Entrance — only after JS adds .is-ready; content stays visible without JS.
   The animations sit paused on their first frame until JS adds .hero-go (when the
   logo starts drawing on screen), so they never play unseen in a hidden page. */
body.is-ready .hero__title {
  animation: rise-in 0.85s var(--ease) both;
  animation-delay: 0.95s;
  animation-play-state: paused;
}

body.is-ready .hero__lede--left {
  animation: col-slide-left 1.05s var(--ease) both;
  animation-delay: 1.1s;
  animation-play-state: paused;
}

body.is-ready .hero__lede--right {
  animation: col-slide-right 1.05s var(--ease) both;
  animation-delay: 1.1s;
  animation-play-state: paused;
}

body.is-ready .hero__divider {
  animation: divider-in 1.05s var(--ease) both;
  animation-delay: 1.1s;
  animation-play-state: paused;
}

body.is-ready .hero__actions {
  animation: rise-in 0.85s var(--ease) both;
  animation-delay: 1.4s;
  animation-play-state: paused;
}

body.hero-go .hero__title,
body.hero-go .hero__lede--left,
body.hero-go .hero__lede--right,
body.hero-go .hero__divider,
body.hero-go .hero__actions {
  animation-play-state: running;
}

/* Service shortcuts: a row of numbered buttons under the main CTA */
.service-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  width: min(44rem, calc(100vw - 2.5rem));
  margin: 0;
}

.service-tabs__label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: min(44rem, calc(100vw - 2.5rem));
  margin: clamp(2rem, 4vw, 2.6rem) 0 0.85rem;
  color: #6b6b6b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.service-tabs__label::before,
.service-tabs__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 10, 10, 0.14));
}

.service-tabs__label::after {
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.14), transparent);
}

.service-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 5.6rem;
  padding: 0.85rem 0.8rem 0.8rem;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

/* Accent bar that grows along the bottom edge on hover */
.service-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.service-tab__index {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--accent-ink);
}

.service-tab__label {
  margin-top: auto;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--ink);
}

.service-tab__arrow {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-size: 0.9rem;
  color: var(--accent-ink);
  opacity: 0.35;
  transform: translateX(-3px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.service-tab:hover,
.service-tab:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 12px 26px rgba(10, 10, 10, 0.08);
}

.service-tab:hover::after,
.service-tab:focus-visible::after {
  transform: scaleX(1);
}

.service-tab:hover .service-tab__arrow,
.service-tab:focus-visible .service-tab__arrow {
  opacity: 1;
  transform: none;
}

.service-tab:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .service-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-tab {
    min-height: 4.6rem;
  }

  .service-tab:last-child {
    grid-column: 1 / -1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes col-slide-left {
  from {
    opacity: 0;
    transform: translateX(42%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes col-slide-right {
  from {
    opacity: 0;
    transform: translateX(-42%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes divider-in {
  from {
    opacity: 0;
    transform: scaleY(0.35);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ——— Home: director / track record ——— */
.director {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}

.director__inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.5rem);
}

.director__intro {
  max-width: 44rem;
}

.director__lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(12rem, 22vw, 16rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.director__photo {
  margin: 0;
  justify-self: end;
  width: 100%;
}

.director__photo-frame {
  border-radius: 18px;
  aspect-ratio: 4 / 5;
}

.director__photo img {
  display: block;
  box-shadow: 0 14px 34px rgba(20, 28, 36, 0.12);
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  object-fit: cover;
}


.director__photo figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.director__photo figcaption strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 760px) {
  .director__lead {
    grid-template-columns: 1fr;
  }

  .director__photo {
    order: -1;
    justify-self: start;
    max-width: 11rem;
  }
}

.director__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.63rem, 3.44vw, 2.36rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.director__intro p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.4rem 1.3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.03);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.06rem, 3.87vw, 2.67rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
}

.stat__label {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.director__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem 2.5rem;
}

.director__subhead {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 135, 145, 0.3);
  font-size: 0.92rem;
  font-weight: 500;
}

.chips--quiet li {
  background: var(--bg);
  border-color: #d9d9d9;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.director__link {
  justify-self: start;
  margin-top: clamp(0.75rem, 2vw, 1.25rem);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.2rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.director__link span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.director__link:hover {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.director__link:hover span {
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .director__details {
    grid-template-columns: 1fr;
  }
}

/* ——— Reveal on scroll ——— */
.reveal {
  opacity: 1;
  transform: none;
}

body.is-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

body.is-ready .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ——— Below fold ——— */
.band {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

.band--soft {
  background: var(--soft);
}

.band--split .band__inner--narrow {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.band--soft .band__inner--narrow {
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}

.band__inner {
  width: min(40rem, 100%);
  margin: 0 auto;
  text-align: center;
}

.band__inner--narrow {
  width: min(34rem, 100%);
}

.band__lead {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.33rem, 2.75vw, 1.85rem);
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.band__cta {
  justify-content: flex-start;
  margin-top: 1.75rem;
}

.band__title,
.page-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.72rem, 3.87vw, 2.58rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.band__text,
.page-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

@media (max-width: 720px) {
  .band--split .band__inner--narrow,
  .band--soft .band__inner--narrow {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ——— Inner pages ——— */
.page-hero {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}

.page-hero__inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.page-hero__inner > * {
  max-width: 36rem;
}

.page-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-section {
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}

.page-section__inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

/* Services */
.service-list {
}

.service {
  scroll-margin-top: 5.5rem;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
  transition: background 0.3s var(--ease);
}

.service__index {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--muted);
  line-height: 1.2;
  padding-top: 0.45rem;
  transition: color 0.3s, transform 0.3s var(--ease);
}

.service__title {
  position: relative;
  display: block;
  margin: 0;
  transition: color 0.3s var(--ease);
  font-family: var(--font-display);
  font-size: clamp(1.33rem, 2.58vw, 1.63rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

/* Small "+" hint that turns into "×" when the description is showing */
.service__title::after {
  content: "+";
  display: inline-block;
  margin-left: 0.6rem;
  vertical-align: 0.18em;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent-ink);
  transition: transform 0.4s var(--ease);
}

/* Description folds away and slides open on hover / focus / tap */
.service__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.service__text p {
  margin: 0;
}

.service__text p + p {
  margin-top: 0.75rem;
}

.service__text {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding-top: 0;
  color: var(--muted);
  max-width: 40rem;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.35s var(--ease),
    transform 0.45s var(--ease),
    padding-top 0.45s var(--ease);
}

.service {
  cursor: default;
  outline: none;
}

.service:hover .service__more,
.service:focus-visible .service__more,
.service.is-open .service__more {
  grid-template-rows: 1fr;
}

.service:hover .service__text,
.service:focus-visible .service__text,
.service.is-open .service__text {
  padding-top: 0.55rem;
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

.service:hover .service__title,
.service:focus-visible .service__title,
.service.is-open .service__title {
  color: var(--accent-ink);
}

.service:hover .service__title::after,
.service:focus-visible .service__title::after,
.service.is-open .service__title::after {
  transform: rotate(45deg);
}

.service:focus-visible .service__title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}

@media (hover: none) {
  .service {
    cursor: pointer;
  }
}

body.is-ready .service.is-in .service__index {
  color: var(--accent-ink);
}

.services-foot {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0;
}

.services-foot p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

/* Case studies & testimonials */
.section-heading {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.46rem, 2.92vw, 1.98rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.section-intro {
  margin: -0.5rem 0 1.5rem;
  max-width: 40rem;
  color: var(--muted);
}

.page-section__inner > .section-heading:first-child {
  margin-top: 0;
}

.cases + .section-heading {
  margin-top: clamp(3rem, 6vw, 4rem);
}

.cases,
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.case,
.quote {
  position: relative;
  margin: 0;
  padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.03);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.case:hover,
.quote:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(10, 10, 10, 0.07);
}

/* Featured case study with a looping video of the work */
.case--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  padding: 0.75rem;
  overflow: hidden;
}

.case__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8ee;
  isolation: isolate;
}

.case__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Click the video to watch it full screen */
.case__media[data-fullscreen] {
  cursor: zoom-in;
  outline: none;
}

.case__media[data-fullscreen]:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-ink);
}

.case__expand {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.55);
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

.case__expand svg {
  width: 1.2rem;
  height: 1.2rem;
}

.case__media:hover .case__expand,
.case__media:focus-visible .case__expand {
  opacity: 1;
  transform: none;
}

/* Touch screens have no hover, so keep the hint showing */
@media (hover: none) {
  .case__expand {
    opacity: 0.85;
    transform: none;
  }
}

.case__media[data-blocked]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.5rem;
  height: 3.5rem;
  margin: -1.75rem 0 0 -1.75rem;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center / 1.6rem no-repeat;
  pointer-events: none;
}

.case__media:fullscreen {
  border-radius: 0;
  background: #000;
  cursor: zoom-out;
}

.case__media:fullscreen .case__video {
  object-fit: contain;
}

.case__media:fullscreen .case__expand {
  display: none;
}

.case__info {
  padding: 1rem 1.25rem 1rem 0;
}

.case__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0 1rem;
}

.case__place {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.case__place svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent-ink);
}

.case__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  /* The one deliberate green on the site: a live "in progress" signal */
  background: #e8f5ef;
  color: #3d7a62;
  font-size: 0.78rem;
  font-weight: 600;
}

.case__status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d7a62;
}

/* Finished projects: green like "in progress", with a tick instead of a dot */
.case__status--done span {
  width: 9px;
  height: 9px;
  border-radius: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.6 2.6L10 3.4' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.6 2.6L10 3.4' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* A feature card without a video: the headline result fills the media slot */
.case__stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
  aspect-ratio: 16 / 9;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #fafbfb, #f1f3f4);
  color: var(--ink);
}

.case__stat-head {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.case__stat-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
}

.case__stat-label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--muted);
}

.case__stat-foot {
  margin: 0;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


.case--result + .case--result,
.case--feature + .case--feature { margin-top: 0; }

.case__summary {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .case--feature {
    grid-template-columns: 1fr;
  }

  .case__info {
    padding: 0.25rem 0.75rem 1rem;
  }
}

.case__meta {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.case__title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: 1.29rem;
  font-weight: 500;
  line-height: 1.15;
}

.case__body {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.case__body dt {
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.case__body dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.quote {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quote__text {
  position: relative;
  margin: 0;
  padding-top: 2.1rem;
}

.quote__text::before {
  content: "\201C";
  position: absolute;
  top: -0.4rem;
  left: -0.1rem;
  font-family: var(--font-display);
  font-size: 3.44rem;
  line-height: 1;
  color: var(--accent);
}

.quote__text p {
  margin: 0;
  font-family: var(--font-quote);
  font-size: 1.08rem;
  line-height: 1.6;
}

.quote__who {
  display: grid;
  gap: 0.1rem;
  margin-top: auto;
  font-size: 0.92rem;
}

.quote__who span {
  color: var(--muted);
}

.quote__date {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* Longer quotes read better a little smaller */
.quote .quote__text p {
  font-size: 1.12rem;
  line-height: 1.45;
}




.cases.cases--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .cases,
  .cases.cases--two,
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 36rem) minmax(0, 20rem);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select[aria-invalid="true"] {
  border-color: #c0392b;
}

.field select:invalid {
  color: var(--muted);
}

.field select option {
  color: var(--ink);
}

.field select:focus {
  border-color: var(--accent-deep);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow-soft);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235c5c5c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 1.1rem center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Honeypot field: off-screen for people, still visible to spam bots */
.field--trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c0392b;
  background: #fff;
}

.form-status.is-error {
  color: #b42318;
}

.form-status.is-success {
  color: var(--accent-ink);
  font-weight: 600;
}

.cta[disabled] {
  opacity: 0.6;
  cursor: progress;
  pointer-events: none;
}

.form-note,
.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-status:empty {
  min-height: 0;
}

.form-status {
  min-height: 1.25rem;
  color: var(--ink);
}

.contact-aside {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--soft);
}

.contact-block h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.contact-block p,
.contact-block a {
  margin: 0;
  color: var(--muted);
}

.contact-block a {
  transition: color 0.2s;
}

.contact-block a:hover {
  color: var(--accent-deep);
}

.contact-rule {
  border: 0;
  margin: 0;
}

/* Message-sent confirmation */
.contact-form[hidden],
.form-confirm[hidden] {
  display: none;
}

.form-confirm {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid rgba(124, 135, 145, 0.35);
  border-radius: 20px;
  background: var(--accent-soft);
  outline: none;
  animation: confirm-in 0.5s var(--ease) both;
}

.form-confirm__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: var(--accent-ink);
  color: #fff;
  animation: confirm-pop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) 0.15s both;
}

.form-confirm__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.form-confirm__icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: confirm-tick 0.45s var(--ease) 0.4s forwards;
}

.form-confirm__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.01vw, 1.98rem);
  font-weight: 500;
  line-height: 1.1;
}

.form-confirm__text {
  margin: 0 0 1.5rem;
  max-width: 30rem;
  color: #424a52;
}

@keyframes confirm-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes confirm-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes confirm-tick {
  to {
    stroke-dashoffset: 0;
  }
}

/* LinkedIn card beside the contact form */
.contact-card {
  position: sticky;
  top: 6rem;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(10, 10, 10, 0.03);
}

.contact-card__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.contact-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 600;
  line-height: 1.1;
}

.contact-card__role {
  margin: 0.25rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-card__text {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.97rem;
}

/* LinkedIn's own brand blue */
.cta--linkedin {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 102, 194, 0.22);
}

.cta--linkedin:hover,
.cta--linkedin:focus-visible {
  background: #004182;
  border-color: #004182;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(10, 102, 194, 0.3);
}

.cta--linkedin:active {
  transform: translateY(0);
}

.contact-card__link {
  width: 100%;
  gap: 0.6rem;
}

.li-icon {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}

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

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__social .li-icon {
  color: #0a66c2;
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0.75rem;
}

main:focus {
  outline: none;
}

/* Services page: just the button, straight under the list */
.services-foot--button {
  justify-content: flex-start;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}

/* Closing call-to-action rows: buttons line up with the text above them */
.services-foot .cta-row {
  justify-content: flex-start;
}

/* ——— Typographic polish ——— */
/* Even line lengths in headings, and no single-word last lines in body copy */
h1,
h2,
h3,
.hero__title,
.page-title,
.director__title {
  text-wrap: balance;
}

p,
dd,
li,
blockquote {
  text-wrap: pretty;
}

input,
textarea {
  caret-color: var(--accent-ink);
}

:focus-visible {
  outline-color: var(--accent-ink);
}

/* ——— Footer ——— */
.footer {
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 3rem) 1.5rem;
  /* Fade in from transparent so the cogs dissolve into the footer instead of being cut off */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg) 5rem);
}

/* Line above the footer: the header's steel holographic edge, fading out at both ends */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--max), calc(100% - 2.5rem));
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #b3bbc3 12%, #7c8791 35%, #e6e9ec 55%, #7c8791 75%, #b3bbc3 88%, transparent);
  opacity: 0.8;
}

.footer__inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: start;
}

.footer__brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.footer__brand p {
  margin: 0;
  color: var(--muted);
  max-width: 22rem;
  font-size: 0.98rem;
}

.footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.footer__col {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 7rem;
}

.footer__col[data-empty] {
  display: none;
}

.footer__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.footer__col a {
  font-size: 0.95rem;
  color: var(--ink);
  transition: opacity 0.2s;
}

.footer__col a:hover {
  color: var(--accent-deep);
  opacity: 1;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: center;
  margin-top: -0.5rem;
  padding: 0.35rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

.footer__credit-logo {
  display: block;
  width: auto;
  height: 1.05rem;
  /* Render the red Vitan mark in black to match the footer */
  filter: brightness(0);
  transition: transform 0.25s var(--ease);
}


.footer__credit:hover .footer__credit-logo,
.footer__credit:focus-visible .footer__credit-logo {
  transform: translateX(2px) scale(1.04);
}

.footer__credit:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer__time {
  color: #6b6b6b;
  font-variant-numeric: tabular-nums;
}

.footer__totop {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.footer__totop span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.footer__totop:hover {
  color: var(--ink);
}

.footer__totop:hover span {
  transform: translateY(-2px);
}

/* Bigger tap targets for footer links and text links on touch screens */
@media (pointer: coarse) {
  .footer__col a,
  .footer__legal,
  .footer__totop,
  .director__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .footer__col {
    gap: 0;
  }

  .footer__bottom {
    row-gap: 0.25rem;
  }
}

.footer__legal {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.footer__legal:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.form-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

/* Privacy & Cookies page */
.legal__updated {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.legal > * {
  max-width: 44rem;
}

.legal {
}

.legal h2 {
  margin: 2.25rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.24vw, 1.5rem);
  font-weight: 500;
  line-height: 1.15;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal > :last-child {
  margin-bottom: 0;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal p {
  margin: 0 0 0.9rem;
}

.legal ul {
  margin: 0 0 0.9rem;
  padding-left: 1.2rem;
}

.legal a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

.legal a:hover {
  color: var(--accent-ink);
}

/* Invisible slots for real contact details later */
@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero__columns {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    overflow: visible;
  }

  .hero__divider {
    width: 4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-deep), transparent);
  }

  .hero__lede--left,
  .hero__lede--right {
    text-align: center;
  }

  .hero__lede--left {
    order: 1;
  }

  .hero__divider {
    order: 2;
  }

  .hero__lede--right {
    order: 3;
  }

  /* Sideways slide would fight the stack — use a short fade instead */
  body.is-ready .hero__lede--left,
  body.is-ready .hero__lede--right {
    animation-name: rise-in;
    animation-duration: 0.9s;
  }

  body.is-ready .hero__divider {
    animation-name: rise-in;
    animation-duration: 0.9s;
  }
}

@media (max-width: 560px) {
  .service {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer__top {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .service-tab__label {
    font-size: 0.92rem;
  }
}

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

  body.is-ready .reveal,
  body.is-ready .hero__title,
  body.is-ready .hero__lede--left,
  body.is-ready .hero__lede--right,
  body.is-ready .hero__divider,
  body.is-ready .hero__actions {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .logo-mark__graphic,
  .logo-mark__word,
  .logo-mark__swirl,
  .logo-mark__reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

}

/* ——— Photo background: project photos drifting in slanted strips behind everything,
   like the cogs. Built in main.js; faint so the text on top stays easy to read. ——— */
.photo-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  /* fade out just before the cogs */
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.photo-bg.is-ready { opacity: 1; }

.photo-bg__tilt {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: var(--pb-gap);
  width: var(--pb-span, 170vmax);
  transform: translate(calc(-50% + var(--pb-dx, 0px)), calc(-50% + var(--pb-dy, 0px))) rotate(var(--pb-angle, 20deg));
}

.photo-bg__row {
  display: flex;
  gap: var(--pb-gap);
  width: max-content;
  animation: photo-drift var(--pb-time, 150s) linear infinite;
  will-change: transform;
}

.photo-bg__row.is-paused { animation-play-state: paused; }

.photo-bg__row:nth-child(even) { animation-direction: reverse; }

.photo-bg img {
  position: relative;
  flex: none;
  width: var(--pb-tile);
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  filter: grayscale(0.4);
  opacity: 0.22;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), filter 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.photo-bg img.is-hot {
  z-index: 1;
  opacity: 1;
  filter: none;
  transform: scale(1.1);
  box-shadow: 0 18px 40px rgba(20, 28, 36, 0.28);
}

.photo-bg.is-still .photo-bg__row { animation: none; }

@keyframes photo-drift {
  to { transform: translateX(-50%); }
}

/* Phones: the photos only show in the top-left corner, fading out before the text column
   and well clear of the cogs (which sit mid-right) */
.photo-bg.is-phone {
  width: 100% !important;
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 18%, rgba(0, 0, 0, 0.5) 34%, transparent 52%);
  mask-image: radial-gradient(circle at 0 0, #000 18%, rgba(0, 0, 0, 0.5) 34%, transparent 52%);
}

.photo-bg.is-phone .photo-bg__tilt {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) rotate(var(--pb-angle, 35deg));
}

.photo-bg.is-phone img {
  opacity: 0.15;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .photo-bg__row { animation: none; }
}

/* ——— One hover language for every button and pill ———
   lift 2px + soft shadow + a quick light sweep, all on the same timing */
.cta,
.chips li,
.case__status,
.topbar__toggle,
.service-tab {
  isolation: isolate;
}

.chips li,
.case__status,
.topbar__toggle {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), scale 0.35s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.cta::after,
.chips li::after,
.case__status::after,
.topbar__toggle::after,
.service-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
  transform: translateX(-120%);
  pointer-events: none;
}

.cta:hover::after,
.cta:focus-visible::after,
.chips li:hover::after,
.case__status:hover::after,
.topbar__toggle:hover::after,
.service-tab:hover::before,
.service-tab:focus-visible::before {
  transform: translateX(120%);
  transition: transform 0.7s var(--ease);
}

.service-tab { overflow: hidden; }

.chips li:hover,
.case__status:hover {
  scale: 1.07;
  box-shadow: 0 8px 18px rgba(20, 28, 36, 0.08);
}

.chips li:hover { border-color: rgba(124, 135, 145, 0.6); }

.topbar__toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(20, 28, 36, 0.08);
}

.cta:active,
.topbar__toggle:active {
  transform: translateY(0) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .cta::after,
  .chips li::after,
  .case__status::after,
  .topbar__toggle::after,
  .service-tab::before { display: none; }
}

/* Stat cards grow a little on hover (scale, so it doesn't fight the scroll-in reveal) */
.stat,
body.is-ready .stat.reveal {
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out),
    scale 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.stat:hover {
  scale: 1.04;
  border-color: rgba(124, 135, 145, 0.35);
  box-shadow: 0 14px 32px rgba(20, 28, 36, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .stat:hover,
  .chips li:hover,
  .case__status:hover { scale: none; }
}

/* ——— Skeleton loading: media shows a shimmering placeholder until it has loaded ——— */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--sk-radius, 12px);
  background: #eef0f2;
}

.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: skeleton-shine 1.3s ease-in-out infinite;
  pointer-events: none;
}

.skeleton > img,
.skeleton > video {
  opacity: 0;
}

.skeleton.is-loaded {
  background: transparent;
}

.skeleton.is-loaded::before {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skeleton.is-loaded > img,
.skeleton.is-loaded > video {
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}

@keyframes skeleton-shine {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::before { animation: none; }
}

/* Collaborations (case studies page): partner widget */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.partner-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 18px rgba(20, 28, 36, 0.05);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.partner-widget::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
  transform: translateX(-120%);
  pointer-events: none;
}

.partner-widget:hover,
.partner-widget:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(124, 135, 145, 0.45);
  box-shadow: 0 18px 38px rgba(20, 28, 36, 0.1);
}

.partner-widget:hover::after,
.partner-widget:focus-visible::after {
  transform: translateX(120%);
  transition: transform 0.8s var(--ease);
}

.partner-widget__bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #f4f5f6;
}

.partner-widget__bar i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d5dade;
}

.partner-widget__url {
  margin-left: 0.6rem;
  padding: 0.18rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.75rem;
}

.partner-widget__body {
  display: grid;
  gap: 0.45rem;
  padding: 1.6rem 1.5rem 1.4rem;
}

.partner-widget__logo {
  width: min(15rem, 100%);
  height: auto;
  margin-bottom: 0.6rem;
}

.partner-widget__tag {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
}

.partner-widget__text {
  color: var(--muted);
  font-size: 0.92rem;
}

.partner-widget__go {
  margin-top: 0.5rem;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.partner-widget:hover .partner-widget__go span[aria-hidden] {
  display: inline-block;
  transform: translateX(3px);
  transition: transform 0.25s var(--ease);
}

/* Direct phone / email */
.contact-direct {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 1.1rem;
  padding: 0;
  list-style: none;
}

.contact-direct a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  max-width: 100%;
  transition: color 0.2s var(--ease);
}

.contact-direct a:hover,
.contact-direct a:focus-visible {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-direct a[href^="mailto"] span {
  font-size: 0.9rem;
  white-space: nowrap;
}

.contact-icon {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--accent-ink);
}

.footer__social .contact-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: currentColor;
}

/* Readability over the photo strip */
.photo-bg--inner img { opacity: 0.12; }
.photo-bg.is-phone.photo-bg--inner img { opacity: 0.1; }

main :is(p, h1, h2, h3, dt, dd, li, span, a):not(.cta):not(.cta *),
.footer :is(p, strong, span, a) {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.9);
}

/* no halo needed inside solid cards or on dark buttons */
:is(.case, .quote, .partner-widget, .stat, .service-tab, .contact-card, .service, .chips li, .case__status, .field, .cta) :is(p, h1, h2, h3, dt, dd, li, span, a) {
  text-shadow: none;
}
