/* ==========================================================================
   Arcadia Solutions — AV & Acoustic Consultancy
   Design tokens
   ========================================================================== */

:root {
  /* Colour — ink and cyan taken from the brand mark */
  --ink:        #231F20;
  --ink-deep:   #161314;
  --ink-panel:  #201C1D;
  --slate:      #4A5054;
  --slate-soft: #6E767B;
  --mist:       #E4E9EB;
  --paper:      #F8FAFB;
  --white:      #FFFFFF;
  --cyan:       #00E1FF;
  --cyan-deep:  #007E96;
  --line-light: rgba(35, 31, 32, 0.12);
  --line-dark:  rgba(255, 255, 255, 0.14);

  /* Type */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-xs:   0.78rem;
  --fs-sm:   0.9rem;
  --fs-base: 1.0625rem;
  --fs-lg:   1.2rem;
  --fs-xl:   1.55rem;
  --fs-2xl:  clamp(1.9rem, 3.4vw, 2.7rem);
  --fs-3xl:  clamp(2.3rem, 5.2vw, 3.9rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1220px;
  --wrap-narrow: 900px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 84px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-variation-settings: "wdth" 100, "wght" 400;
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-variation-settings: "wdth" 112, "wght" 700;
  letter-spacing: -0.022em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

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

.skip-link {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -110%);
  z-index: 200;
  background: var(--cyan); color: var(--ink);
  padding: 0.7rem 1.4rem;
  font-variation-settings: "wght" 600;
  text-decoration: none;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section--light  { background: var(--paper); }
.section--mist   { background: var(--mist); }
.section--ink    { background: var(--ink-deep); color: rgba(255,255,255,0.72); }
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--white); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: var(--fs-2xl); margin-bottom: 0.7rem; }
.section-head p { font-size: var(--fs-lg); color: var(--slate-soft); }
.section--ink .section-head p { color: rgba(255,255,255,0.62); }

/* The waveform rule — the brand's bar array reused as a structural divider */
.meter-rule {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-bottom: 1.6rem;
}
.meter-rule span {
  width: 3px;
  border-radius: 2px;
  background: var(--cyan);
  height: var(--h, 40%);
}
.section--ink .meter-rule span { opacity: 0.85; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font: inherit;
  font-size: var(--fs-sm);
  font-variation-settings: "wdth" 105, "wght" 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.btn--primary { background: var(--cyan); color: var(--ink); }
.btn--primary:hover { background: #6DEEFF; }

.btn--ghost-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn--ghost-light:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-light);
}
.btn--ghost-dark:hover { border-color: var(--ink); }

.btn svg { width: 16px; height: 16px; flex: none; }

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

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav.is-solid {
  background: rgba(248, 250, 251, 0.92);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line-light);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--nav-h);
  transition: min-height 0.35s var(--ease);
}
.nav.is-solid .nav__inner { min-height: 68px; }

.nav__brand { position: relative; display: block; line-height: 0; flex: none; }
.nav__brand img {
  height: clamp(34px, 5vw, 48px);
  width: auto;
  transition: opacity 0.35s var(--ease), height 0.35s var(--ease);
}
.nav.is-solid .nav__brand img { height: clamp(30px, 4.2vw, 40px); }
.nav__brand img + img { position: absolute; inset: 0; }
.nav__logo--dark { opacity: 0; }
.nav.is-solid .nav__logo--light { opacity: 0; }
.nav.is-solid .nav__logo--dark { opacity: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.nav__links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-variation-settings: "wght" 500;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.nav.is-solid .nav__links a { color: var(--slate); }
.nav.is-solid .nav__links a:hover { color: var(--ink); border-bottom-color: var(--cyan); }

.nav__aside { display: flex; align-items: center; gap: 1.25rem; }

.nav__social { display: flex; gap: 0.85rem; }
.nav__social a { color: rgba(255,255,255,0.6); transition: color 0.2s var(--ease); }
.nav__social a:hover { color: var(--cyan); }
.nav.is-solid .nav__social a { color: var(--slate-soft); }
.nav.is-solid .nav__social a:hover { color: var(--ink); }
.nav__social svg { width: 18px; height: 18px; }

.nav__phone {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--white); text-decoration: none;
  font-size: var(--fs-sm);
  font-variation-settings: "wght" 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nav__phone:hover { color: var(--cyan); }
.nav.is-solid .nav__phone { color: var(--ink); }
.nav__phone svg { width: 15px; height: 15px; color: var(--cyan); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(255,255,255,0.28);
  border-radius: 2px; color: var(--white); cursor: pointer;
}
.nav.is-solid .nav__toggle { border-color: var(--line-light); color: var(--ink); }
.nav__toggle svg { width: 20px; height: 20px; }
.nav__toggle .icon-close,
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* While the mobile panel is open the bar must be fully opaque — the
   translucent state lets the hero bleed through behind the links. */
.nav.is-open { background: var(--paper); border-bottom-color: var(--line-light); }
.nav.is-open .nav__logo--light { opacity: 0; }
.nav.is-open .nav__logo--dark { opacity: 1; }
.nav.is-open .nav__toggle { border-color: var(--line-light); color: var(--ink); }
.nav.is-open .nav__phone { color: var(--ink); }

.nav__panel {
  display: none;
  border-top: 1px solid var(--line-light);
  padding-block: 1.5rem 2rem;
}
.nav__panel.is-open { display: block; }
.nav__panel nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__panel nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-lg);
  font-variation-settings: "wdth" 108, "wght" 600;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line-light);
}
.nav__panel .nav__panel-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.nav__panel .nav__social a { color: var(--slate-soft); }

@media (max-width: 1000px) {
  .nav__links, .nav__aside .nav__social { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .nav__aside .nav__phone span { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink-deep);
  overflow: hidden;
  padding-top: var(--nav-h);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Soft cyan wash + fine horizontal striations, like a spectrogram */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 118%, rgba(0, 225, 255, 0.24) 0%, transparent 62%),
    radial-gradient(70% 55% at 12% 8%, rgba(0, 225, 255, 0.09) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 5px);
  opacity: 0.6;
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 2; text-align: center; }

.hero__logo {
  width: min(360px, 62vw);
  margin: 0 auto clamp(1.5rem, 3.2vw, 2.25rem);
}

.hero__title {
  font-size: var(--fs-3xl);
  font-variation-settings: "wdth" 118, "wght" 600;
  color: var(--white);
  margin-bottom: 1.1rem;
}

.hero__sub {
  margin: 0 auto;
  max-width: 34rem;
  color: rgba(255,255,255,0.62);
  font-size: var(--fs-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* The meter — the one deliberate piece of ambient motion on the page */
.meter {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(3px, 0.85vw, 7px);
  height: clamp(38px, 7vh, 66px);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  opacity: 0.75;
}
.meter__bar {
  width: clamp(3px, 0.55vw, 5px);
  border-radius: 3px;
  background: linear-gradient(to top, rgba(0,225,255,0.35), var(--cyan));
  height: var(--h);
  transform-origin: bottom;
  transform: scaleY(0);
  animation:
    meter-in 0.7s var(--ease) forwards var(--in-delay),
    meter-idle var(--dur) ease-in-out infinite alternate var(--idle-delay);
}
@keyframes meter-in { to { transform: scaleY(1); } }
@keyframes meter-idle {
  from { transform: scaleY(1); }
  to   { transform: scaleY(var(--peak)); }
}

@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Hero load sequence */
.hero__logo, .hero__title, .hero__sub, .hero__actions, .hero__logo    { animation-delay: 0.10s; }
.hero__title   { animation-delay: 0.55s; }
.hero__sub     { animation-delay: 0.68s; }
.hero__actions { animation-delay: 0.80s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise-centred {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-light);
  overflow: hidden;
}
.service__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.service__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
  filter: saturate(0.55) brightness(0.72);
}
.service:hover .service__media img,
.service.is-lit .service__media img { filter: saturate(1) brightness(1); }
.service:hover .service__media img { transform: scale(1.035); }
.service__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22,19,20,0.85) 0%, rgba(22,19,20,0.1) 55%, transparent 100%);
}
.service__label {
  position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.35rem; z-index: 2;
}
.service__label h3 {
  color: var(--white);
  font-size: var(--fs-xl);
  font-variation-settings: "wdth" 115, "wght" 700;
  margin-bottom: 0.3rem;
}
.service__label p { color: rgba(255,255,255,0.78); font-size: var(--fs-sm); margin: 0; }

.service__body { padding: 1.6rem; border-top: 3px solid var(--cyan); }
.service__body ul { margin: 0; padding: 0; list-style: none; }
.service__body li {
  display: flex; gap: 0.7rem; align-items: baseline;
  padding-block: 0.45rem;
  font-size: var(--fs-sm);
}
.service__body li + li { border-top: 1px solid var(--line-light); }
.service__body li::before {
  content: ""; flex: none;
  width: 3px; height: 12px; border-radius: 2px;
  background: var(--cyan);
  transform: translateY(1px);
}

/* Three supporting propositions */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line-light);
}
.pillar h4 {
  font-size: var(--fs-lg);
  font-variation-settings: "wdth" 108, "wght" 650;
  margin-bottom: 0.5rem;
}
.pillar p { font-size: var(--fs-sm); color: var(--slate-soft); margin: 0; }

/* ==========================================================================
   Case studies
   ========================================================================== */

.cases { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }

.case {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  background: var(--ink-panel);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.case:hover { border-color: rgba(0,225,255,0.55); background: #262122; }

.case__media { position: relative; overflow: hidden; background: #000; }
.case__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.4) brightness(0.6);
  transition: filter 1s var(--ease), transform 0.9s var(--ease);
}
.case.is-lit .case__media img { filter: saturate(1) brightness(0.92); }
.case:hover .case__media img { transform: scale(1.04); filter: saturate(1) brightness(1); }

.case__body { padding: clamp(1.4rem, 2.5vw, 2rem); }
.case__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  font-size: var(--fs-xs);
  color: var(--cyan);
  font-variation-settings: "wght" 600;
  margin-bottom: 0.7rem;
}
.case__meta span:not(:first-child) { color: rgba(255,255,255,0.5); }
.case__body h3 {
  font-size: var(--fs-xl);
  font-variation-settings: "wdth" 112, "wght" 700;
  margin-bottom: 0.55rem;
}
.case__body p { color: rgba(255,255,255,0.66); font-size: var(--fs-sm); margin-bottom: 1.1rem; }

.case__more {
  display: inline-block;
  color: var(--cyan);
  font-size: var(--fs-sm);
  font-variation-settings: "wght" 600;
  padding-bottom: 0.3rem;
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.4s var(--ease);
}
.case:hover .case__more,
.case:focus-visible .case__more { background-size: 100% 1px; }

/* Featured — first entry runs wide with the image alongside the text */
.case--featured { grid-column: 1 / -1; border-radius: 0; }
@media (min-width: 860px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
  .case--featured { display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .case--featured .case__media { height: 100%; min-height: 380px; }
  .case--featured .case__body {
    padding: clamp(2rem, 3.5vw, 3.25rem);
    display: flex; flex-direction: column; justify-content: center;
  }
  .case--featured .case__body h3 { font-size: var(--fs-2xl); }
  .case--featured .case__body p { font-size: var(--fs-base); }
}
@media (max-width: 859px) {
  .case__media { aspect-ratio: 16 / 10; }
}

.cases__empty {
  border: 1px dashed var(--line-dark);
  padding: 2.5rem;
  text-align: center;
  color: rgba(255,255,255,0.55);
}

/* ==========================================================================
   Case study dialog
   ========================================================================== */

.case-dialog {
  width: min(880px, calc(100vw - 2rem));
  max-height: min(88vh, 960px);
  padding: 0;
  border: none;
  border-radius: 2px;
  background: var(--paper);
  color: var(--slate);
  overflow: hidden;
}
.case-dialog::backdrop { background: rgba(12, 10, 11, 0.78); backdrop-filter: blur(4px); }
.case-dialog[open] { animation: dialog-in 0.35s var(--ease); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.case-dialog__scroll { max-height: min(88vh, 960px); overflow-y: auto; }
.case-dialog__media { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.case-dialog__media img { width: 100%; height: 100%; object-fit: cover; }

.case-dialog__close {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 3;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(22,19,20,0.72); color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 2px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.case-dialog__close:hover { background: var(--cyan); color: var(--ink); border-color: var(--cyan); }
.case-dialog__close svg { width: 18px; height: 18px; }

.case-dialog__body { padding: clamp(1.75rem, 4vw, 2.75rem); }
.case-dialog__body h3 { font-size: var(--fs-2xl); margin-bottom: 0.6rem; }
.case-dialog__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem;
  font-size: var(--fs-sm); color: var(--slate-soft);
  margin-bottom: 1.5rem;
}
.case-dialog__meta span:first-child { color: var(--cyan-deep); font-variation-settings: "wght" 650; }

.scope { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.scope li {
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--cyan);
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  font-variation-settings: "wght" 550;
  color: var(--ink);
  background: var(--white);
}

/* ==========================================================================
   Previous clients
   ========================================================================== */

.clients__viewport { position: relative; overflow: hidden; }
.clients__viewport::before,
.clients__viewport::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(40px, 8vw, 110px);
  z-index: 2; pointer-events: none;
}
.clients__viewport::before { left: 0;  background: linear-gradient(to right, var(--mist), transparent); }
.clients__viewport::after  { right: 0; background: linear-gradient(to left,  var(--mist), transparent); }

.clients__track {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: max-content;
  animation: marquee var(--marquee-dur, 40s) linear infinite;
}
.clients__viewport:hover .clients__track,
.clients__viewport:focus-within .clients__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Fewer than five logos: hold them still and centred rather than looping */
.clients__viewport.is-static { overflow: visible; }
.clients__viewport.is-static::before,
.clients__viewport.is-static::after { display: none; }
.clients__viewport.is-static .clients__track {
  animation: none;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 1.5rem;
  padding-inline: var(--gutter);
}

.client {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: clamp(190px, 24vw, 280px);
  aspect-ratio: 350 / 200;   /* the size logo files are supplied at */
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 2px;
  overflow: hidden;
}
.client img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 0.9rem;
}
.clients__loading { text-align: center; color: var(--slate-soft); font-size: var(--fs-sm); }

a.client { text-decoration: none; }

/* ==========================================================================
   About
   ========================================================================== */

.about { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .about { grid-template-columns: 1.05fr 0.95fr; align-items: start; } }

.about__note + .about__note { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line-light); }
.about__note h3 {
  font-size: var(--fs-lg);
  font-variation-settings: "wdth" 108, "wght" 650;
  margin-bottom: 0.55rem;
}

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.fact { background: var(--paper); padding: clamp(1.4rem, 3vw, 2rem); }
.fact h4 {
  font-size: var(--fs-lg);
  font-variation-settings: "wdth" 110, "wght" 700;
  margin-bottom: 0.3rem;
}
.fact p { font-size: var(--fs-sm); color: var(--slate-soft); margin: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 960px) { .contact { grid-template-columns: 0.85fr 1.15fr; } }

.contact__title { font-size: var(--fs-2xl); margin-bottom: 0.8rem; }
.contact__lead p { color: rgba(255,255,255,0.66); }

.contact__list { margin: 2rem 0 0; padding: 0; list-style: none; }
.contact__list li { border-top: 1px solid var(--line-dark); }
.contact__list li:last-child { border-bottom: 1px solid var(--line-dark); }
.contact__list a, .contact__list div {
  display: flex; align-items: center; gap: 1rem;
  padding-block: 1.1rem;
  color: var(--white); text-decoration: none;
}
.contact__list a:hover { color: var(--cyan); }
.contact__list svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.contact__list small { display: block; color: rgba(255,255,255,0.45); font-size: var(--fs-xs); }
.contact__list strong { font-variation-settings: "wght" 600; font-size: var(--fs-base); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { background: var(--ink); color: rgba(255,255,255,0.6); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer img { height: 34px; width: auto; margin-bottom: 1.25rem; }
.footer h4 {
  color: var(--white);
  font-size: var(--fs-sm);
  font-variation-settings: "wdth" 105, "wght" 650;
  margin-bottom: 1rem;
}
.footer ul { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.footer li { padding-block: 0.3rem; }
.footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer a:hover { color: var(--cyan); }
.footer p { font-size: var(--fs-sm); }

.footer__social { display: flex; gap: 1rem; margin-top: 1.5rem; }
.footer__social svg { width: 18px; height: 18px; }

.footer__base {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-xs);
}
.footer__base p { margin: 0; font-size: var(--fs-xs); }
.footer__base nav { display: flex; gap: 1.5rem; }

/* ==========================================================================
   Terms page
   ========================================================================== */

.page-head { background: var(--ink-deep); padding-block: calc(var(--nav-h) + 3.5rem) clamp(3rem, 6vw, 4.5rem); }
.page-head h1 { color: var(--white); font-size: var(--fs-3xl); margin-bottom: 0.6rem; }
.page-head p { color: rgba(255,255,255,0.55); margin: 0; }

.legal { padding-block: clamp(3rem, 6vw, 5rem); }
.legal__intro { margin-bottom: 3rem; }
.legal__callout {
  border-left: 3px solid var(--cyan);
  background: var(--mist);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.25rem;
  font-size: var(--fs-sm);
}
.legal__contact { border: 1px solid var(--line-light); padding: 1.4rem; font-size: var(--fs-sm); }
.legal__contact div { display: flex; gap: 0.6rem; padding-block: 0.2rem; }
.legal__contact dt { color: var(--slate-soft); min-width: 8.5rem; }

.legal section { margin-bottom: 2.75rem; }
.legal h2 {
  font-size: var(--fs-lg);
  font-variation-settings: "wdth" 108, "wght" 700;
  padding-bottom: 0.6rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line-light);
}
.legal h2 b { color: var(--cyan-deep); font-variation-settings: "wght" 700; }
.legal .clause { display: flex; gap: 1rem; margin-bottom: 0.9rem; font-size: var(--fs-sm); }
.legal .clause > b {
  flex: none; min-width: 2.6rem;
  color: var(--cyan-deep);
  font-variation-settings: "wght" 600;
  font-variant-numeric: tabular-nums;
}
.legal .clause p { margin-bottom: 0.6rem; }
.legal .clause ol { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.legal .clause li { margin-bottom: 0.45rem; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__logo, .hero__title, .hero__sub, .hero__actions,   .meter__bar { transform: scaleY(1); }
  .clients__track { animation: none; width: 100%; overflow-x: auto; }
  .clients__viewport { overflow-x: auto; }
  .case__media img, .service__media img { filter: none; }
}


/* ==========================================================================
   Case study pages
   ========================================================================== */

.cs-hero { background: var(--ink-deep); padding-block: calc(var(--nav-h) + 3rem) clamp(2.5rem, 5vw, 4rem); }

.cs-hero__grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); align-items: stretch; }
@media (min-width: 780px) { .cs-hero__grid { grid-template-columns: 0.62fr 1fr; } }

.cs-hero__logo,
.cs-hero__lead { border-radius: 2px; overflow: hidden; background: var(--ink-panel); }
.cs-hero__logo {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  aspect-ratio: 350 / 200;   /* the size client logos are supplied at */
  padding: clamp(1rem, 2vw, 1.75rem);
}
.cs-hero__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cs-hero__lead { aspect-ratio: 4 / 3; }
.cs-hero__lead img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 780px) {
  .cs-hero__grid { align-items: stretch; }
  .cs-hero__logo { aspect-ratio: auto; }
  .cs-hero__lead { aspect-ratio: auto; min-height: 340px; }
}

.cs-back {
  display: inline-block;
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-sm);
  text-decoration: none;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}
.cs-back:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.cs-title {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  font-size: var(--fs-3xl);
  color: var(--white);
}
.cs-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem;
  margin-top: 0.9rem;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.5);
}
.cs-meta span:first-child { color: var(--cyan); font-variation-settings: "wght" 650; }

.cs-body { padding-block: clamp(3rem, 6vw, 4.5rem); }
.cs-body > .wrap > p {
  font-size: var(--fs-lg);
  max-width: 62ch;
  margin-bottom: 1.4rem;
}
.cs-body h2 {
  font-size: var(--fs-xl);
  font-variation-settings: "wdth" 110, "wght" 700;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 1rem;
}

/* Image rows — add or remove figures and the row re-flows on its own. */
.cs-row {
  display: grid;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  margin: clamp(2rem, 4vw, 3rem) 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
@media (min-width: 1060px) {
  .cs-body .cs-row { width: calc(100% + 180px); margin-left: -90px; }
}
.cs-row figure { margin: 0; }
.cs-row img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 2px;
  background: var(--mist);
  transition: transform 0.6s var(--ease);
}
.cs-row a { display: block; overflow: hidden; border-radius: 2px; }
.cs-row a:hover img { transform: scale(1.03); }
.cs-row figcaption {
  margin-top: 0.55rem;
  font-size: var(--fs-xs);
  color: var(--slate-soft);
}

.cs-spec {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--mist);
  border-left: 3px solid var(--cyan);
}
.cs-spec h2 { margin-top: 0; }
.cs-spec ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 2rem; }
@media (max-width: 640px) { .cs-spec ul { columns: 1; } }
.cs-spec li { padding-block: 0.35rem; font-size: var(--fs-sm); break-inside: avoid; }
.cs-spec li::before { content: "\2014"; color: var(--cyan-deep); margin-right: 0.6rem; }

.cs-next { border-top: 1px solid var(--line-light); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.cs-next h2 { font-size: var(--fs-lg); margin-bottom: 1.25rem; }

/* ==========================================================================
   Image lightbox (case study pages)
   ========================================================================== */

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(12, 10, 11, 0.88); }
.lightbox img { max-width: 94vw; max-height: 92vh; width: auto; border-radius: 2px; }
.lightbox[open] { animation: dialog-in 0.3s var(--ease); }

/* Contact panel — holds the heading, blurb and the contact form */
.contact__cta {
  background: var(--ink-panel);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--cyan);
  border-radius: 2px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  align-self: start;
}
.contact__cta h3 {
  font-size: var(--fs-xl);
  font-variation-settings: "wdth" 110, "wght" 700;
  margin-bottom: 0.7rem;
}
.contact__cta p { color: rgba(255,255,255,0.66); margin-bottom: 1.6rem; }
.contact__cta .btn + .btn { margin-left: 0.75rem; }
@media (max-width: 520px) {
  .contact__cta .btn { display: flex; width: 100%; justify-content: center; }
  .contact__cta .btn + .btn { margin-left: 0; margin-top: 0.75rem; }
}

/* ==========================================================================
   Contact form
   Sits inside the .contact__cta panel on the homepage. Posts to contact.php.
   ========================================================================== */

.form { margin-top: 1.75rem; }

.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 620px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}

.form__field { margin-bottom: 1.1rem; }
.form__row .form__field { margin-bottom: 0; }
.form__row + .form__row,
.form__row + .form__field { margin-top: 1.1rem; }

.form__field label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(255,255,255,0.66);
  font-size: var(--fs-xs);
  font-variation-settings: "wdth" 105, "wght" 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form__field label span { color: var(--cyan); }

.form__field input,
.form__field textarea {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--white);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.form__field textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }

.form__field input::placeholder,
.form__field textarea::placeholder { color: rgba(255,255,255,0.32); }

.form__field input:hover,
.form__field textarea:hover { border-color: rgba(255,255,255,0.3); }

.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(0, 225, 255, 0.16);
}

/* A field the visitor needs to fix */
.form__field.is-invalid input,
.form__field.is-invalid textarea { border-color: #FF6B6B; }

.form__error {
  margin: 0.45rem 0 0;
  color: #FF8F8F;
  font-size: var(--fs-xs);
}

/* The spam trap. Hidden from people without using display:none, which some
   bots check for. Leave this alone. */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit { margin-top: 1.5rem; }
.form__submit[disabled] { opacity: 0.55; cursor: progress; }

.form__status {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--cyan);
  background: rgba(0, 225, 255, 0.08);
  color: var(--white);
  font-size: var(--fs-sm);
}
.form__status.is-error {
  border-left-color: #FF6B6B;
  background: rgba(255, 107, 107, 0.1);
}

.form__note {
  margin: 1.4rem 0 0;
  color: rgba(255,255,255,0.45);
  font-size: var(--fs-xs);
}
.form__note a { color: rgba(255,255,255,0.7); }
.form__note a:hover { color: var(--cyan); }

/* The whole case card is a link now, so it needs link resets. */
a.case { text-decoration: none; }
a.case h3 { color: var(--white); }

/* "More projects" links at the foot of a case study */
.cs-next__links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cs-next__links a {
  display: inline-block;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--line-light);
  border-left: 3px solid var(--cyan);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-variation-settings: "wght" 600;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.cs-next__links a:hover { background: var(--mist); border-color: var(--cyan); border-left-color: var(--cyan); }
