/* =========================================================
   YORK CABINETRY — main stylesheet
   Sections: 1 TOKENS · 2 RESET/BASE · 3 LAYOUT · 4 COMPONENTS
             5 PAGE: HOME / CONTACT / COMPANY / PROJECTS · 6 UTILITIES
   Breakpoints (mobile-first, min-width only):
     --bp-tablet  768px   tablet and up
     --bp-desktop 1025px  desktop and up
     1280px               wide desktop: only for 4-in-a-row grids
   (CSS variables cannot be used inside @media, so the two values
   are written literally in the queries below; keep them in sync.)
   ========================================================= */


/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
  /* Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-heading: #2d2c2b;
  --color-text: #7d7b79;
  --color-text-strong: #4d4d4d;
  /* Brand red from the logo's maple leaf (#e92c2d / #a91f29), darkened slightly so
     text on white passes contrast (5:1); a lighter tint for the dark menu panel. */
  --color-accent: #d1262b;
  --color-accent-on-dark: #ff5a5f;
  --color-icon: #e92c2d;
  --color-icon-hover: #a91f29;
  --color-panel: #1f1f1f;
  --color-divider-dark: rgb(255 255 255 / 0.15);
  --color-focus: #517bc0;
  --color-border: #cfcfcf;
  --color-success: #1e6b33;
  --color-success-bg: #e8f4eb;
  --color-error-bg: #fbeced;
  /* Shown where a photo will appear, until it has loaded (instead of black). */
  --color-placeholder: #d9d3cb;
  --color-surface: #f6f4f1;                       /* light band behind every other services block */
  --color-tile-overlay: rgb(0 0 0 / 0.35);        /* darkens service tiles so the white label reads */
  --color-tile-overlay-hover: rgb(0 0 0 / 0.5);
  --color-backdrop: rgb(0 0 0 / 0.5);             /* behind the cookie preferences dialog */
  --color-lightbox: rgb(0 0 0 / 0.9);             /* the page stays faintly visible behind the photo */
  --color-lightbox-button: rgb(120 120 120 / 0.85); /* mid grey: readable over both dark and light photos */

  /* Text over a photo (hero, CTA): darkest behind the centred text, lighter towards
     the edges so the photo stays clear. Percentages scale with the section. */
  --gradient-banner: radial-gradient(ellipse 70% 60% at 50% 50%, rgb(0 0 0 / 0.5) 0%, rgb(0 0 0 / 0.32) 55%, rgb(0 0 0 / 0.08) 100%);

  /* Same shape as --gradient-banner, darker: the CTA photo is very light. */
  --gradient-cta: radial-gradient(ellipse 70% 60% at 50% 50%, rgb(0 0 0 / 0.62) 0%, rgb(0 0 0 / 0.45) 55%, rgb(0 0 0 / 0.2) 100%);
  --gradient-panel: linear-gradient(to bottom,
    rgb(0 0 0 / 0.04) 0%, rgb(0 0 0 / 0.12) 25%, rgb(0 0 0 / 0.38) 50%,
    rgb(0 0 0 / 0.12) 75%, rgb(0 0 0 / 0.04) 100%);

  /* Typography */
  --font-body: "Poppins", sans-serif;
  --font-alt: "Lato", sans-serif;
  --font-ui: "Inter", sans-serif;

  --fs-btn-small: 13px;
  --fs-detail: 14px;
  --fs-base: 16px;
  --fs-md: 17px;
  --fs-lg: 18px;
  --fs-nav-mobile: 20px;
  --fs-card: 19px;
  --fs-feature: 20px;
  --fs-feature-mobile: 21px;
  --fs-feature-tablet: 22px;
  --fs-footer-title: 22px;
  --fs-panel: 25px;
  --fs-section: 27px;
  --fs-banner-title: 30px;   /* 41px from desktop */
  --fs-banner-text: 17px;    /* 21px from desktop */
  --fs-step-number: 44px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-text: 1.6;
  --lh-body: 2.15;
  --lh-nav: 25px;
  --lh-quote: 25px;
  --lh-list: 26px;

  --ls-body: -0.1px;
  --ls-wide: 0.5px;
  --ls-title: 2.3px;
  --ls-button: 2.5px;

  /* Spacing */
  --space-3xs: 3px;
  --space-nav: 6px;
  --space-2xs: 5px;
  --space-xs: 10px;
  --space-sm: 15px;
  --space-md: 20px;
  --space-lg: 25px;
  --space-xl: 30px;
  --space-2xl: 35px;
  --space-3xl: 40px;
  --space-4xl: 50px;
  --space-5xl: 65px;
  --space-6xl: 75px;
  --space-7xl: 100px;
  --space-footer: 3em;

  /* Layout */
  --container-width: 1500px;
  --gutter: var(--space-lg);   /* side space; 50px on desktop, in line with the header logo */
  --header-pad-inline: var(--gutter);
  --header-height: 96px;
  --logo-width: 140px;
  --footer-logo-width: 150px;
  --hero-floor: 520px;   /* hero never gets shorter than this (landscape phones) */
  --hero-content-width: 76%;   /* leaves room for the arrows */
  --cta-min-height: 641px;
  --page-hero-height: 340px;   /* 440px tablet, 520px desktop */
  --map-height: 360px;         /* 450px from tablet */
  --textarea-height: 160px;
  --card-height: 400px;
  --icon-feature: 60px;
  --icon-quote: 65px;
  --icon-small: 16px;
  --icon-contact: 20px;
  --icon-contact-lg: 28px;
  --icon-menu: 32px;
  --icon-arrow: 28px;
  --hero-btn-width: 260px;   /* fits the longest label, EXPLORE VANITIES */

  /* Service accordion heights (mobile values; overridden per breakpoint) */
  --accordion-gap: var(--space-sm);   /* 4px on desktop, where the panels sit side by side */
  --accordion-item: 300px;
  --accordion-height: 620px;

  /* Partner logo strip */
  --partners-visible: 3;
  --partners-step: 3s;   /* time per logo, as on the original slider */

  /* Shape */
  --radius-sm: 2px;
  --select-arrow: 5px;
  --bullet-size: 8px;
  --tap-size: 48px;
  --dialog-width: 640px;   /* round lightbox buttons: comfortable finger target */   /* half-width of the chevron on form selects */
  --radius-round: 50%;

  /* Shadows */
  --shadow-text: 0 2px 12px rgb(0 0 0 / 0.6);
  --shadow-float: 0 4px 24px rgb(0 0 0 / 0.12);   /* cookie banner and corner button over the page */
  --border: 1px solid;
  --border-thick: 4px solid;
  --aspect-card: 4 / 3;
  --project-logo-height: 56px;
  --card-min-width: 340px;   /* project cards: 3 → 2 → 1 per row as space shrinks */
  --measure: 820px;
  --lightbox-pad-block: 72px;    /* room for the close button above the photo */
  --lightbox-pad-inline: 110px;  /* desktop: arrows sit beside the photo, not on it */          /* comfortable line length for intro paragraphs */
  --project-logo-width: 160px;

  /* Motion */
  --duration-fast: 0.3s;
  --duration-base: 0.45s;
  --duration-slow: 0.6s;
  --duration-reveal: 0.8s;
  --delay-reveal: 0.2s;
  --duration-kenburns: 10s;
  --duration-slide: 0.8s;      /* hero cross-fade */
  --duration-hero-zoom: 6s;    /* Ken Burns zoom per slide */
  --reveal-shift: 40px;
  --zoom-hover: 1.06;
  --zoom-kenburns: 1.3;

  /* Z-index */
  --z-base: 1;
  --z-raised: 2;
  --z-header: 100;
  --z-overlay: 900;
  --z-modal: 1000;
}

@media (min-width: 768px) {
  :root {
    --partners-visible: 5;
    --hero-content-width: 80%;
    --icon-arrow: 40px;
    --page-hero-height: 440px;
    --map-height: 450px;
    --accordion-item: 340px;
  }
}

@media (min-width: 1025px) {
  :root {
    --partners-visible: 7;
    --hero-content-width: 75%;
    --fs-banner-title: 41px;
    --page-hero-height: 520px;
    --fs-banner-text: 21px;
    --gutter: var(--space-4xl);
    --logo-width: 160px;   /* desktop only; phones/tablets keep 140px */
    --accordion-gap: 4px;
    --header-pad-inline: var(--space-4xl);
  }
}


/* =========================================================
   2. RESET / BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

h1, h2, h3, h4, p, ul, figure, blockquote {
  margin: 0;
}

h1, h2, h3, h4 {
  color: var(--color-heading);
  line-height: var(--lh-tight);
}

ul {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-modal);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-black);
  color: var(--color-white);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: none;
}


/* =========================================================
   3. LAYOUT
   ========================================================= */
.container {
  width: 100%;
  max-width: calc(var(--container-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  margin-top: var(--space-6xl);
}

.section--tight {
  margin-top: var(--space-4xl);
}

.section__title {
  margin-bottom: var(--space-2xl);
  color: var(--color-black);
  font-size: var(--fs-section);
  font-weight: var(--fw-medium);
}

.section__title--light {
  color: var(--color-white);
}

.section__actions {
  margin-top: var(--space-2xl);
  text-align: center;
}

.section__actions--loose {
  margin-top: var(--space-4xl);
}


/* =========================================================
   4. COMPONENTS
   ========================================================= */

/* ---------- 4.1 Button ---------- */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-black);
  border-radius: var(--radius-sm);
  background: var(--color-black);
  color: var(--color-white);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}

/* Hover inverts to white with a black outline, like the logo frame. */
.btn:hover,
.btn:focus-visible {
  background: var(--color-white);
  color: var(--color-black);
}

.btn--light {
  border-color: var(--color-white);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
}

/* Keeps its white border (from .btn--light) so it stands out on the dark photo. */
.btn--outline {
  border-color: var(--color-white);
  background: transparent;
  color: var(--color-white);
}

.btn--light:hover,
.btn--light:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

/* Black outline on white (cookie banner, legal tabs); fills black on hover. */
.btn--dark-outline {
  background: transparent;
  color: var(--color-black);
}

.btn--dark-outline:hover,
.btn--dark-outline:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
}

/* ---------- 4.2 Site header ---------- */
.site-header {
  position: relative;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding-inline: var(--header-pad-inline);
  background: var(--color-white);
}

.site-header__inner {
  flex: 1;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin-inline: auto;
}

.site-header__logo img {
  width: var(--logo-width);
}

.site-header__toggle {
  display: flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-black);
}

.site-header__toggle svg {
  width: var(--icon-menu);
  height: var(--icon-menu);
  fill: currentColor;
}

/* Mobile/tablet: full-screen panel, opened by js/main.js (menu).
   .main-nav__head copies the header's padding and layout, so the white
   logo and the close button sit exactly where the logo and hamburger were. */
.is-menu-open,
.is-lightbox-open {
  overflow: hidden;
}

.main-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  overflow-y: auto;
  background: var(--color-panel);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base), visibility var(--duration-base);
}

.main-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.main-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding-inline: var(--header-pad-inline);
}

.main-nav__logo img {
  width: var(--logo-width);
}

.main-nav__close {
  display: flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-white);
}

.main-nav__close svg {
  width: var(--icon-menu);
  height: var(--icon-menu);
  fill: currentColor;
}

.main-nav__list {
  margin: var(--space-xl) var(--header-pad-inline) 0;
  border-top: var(--border) var(--color-divider-dark);
}

.main-nav__item {
  border-bottom: var(--border) var(--color-divider-dark);
}

.main-nav__link {
  display: block;
  padding: var(--space-md) 0;
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: var(--fs-nav-mobile);
  font-weight: var(--fw-regular);
  line-height: var(--lh-nav);
  letter-spacing: var(--ls-wide);
  transition: color var(--duration-fast);
}

.main-nav__link:hover,
.main-nav__link:focus-visible,
.main-nav__link[aria-current="page"] {
  color: var(--color-accent-on-dark);
}

@media (min-width: 1025px) {
  .site-header__toggle,
  .main-nav__head {
    display: none;
  }

  .main-nav {
    position: static;
    overflow: visible;
    background: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .main-nav__list {
    margin: 0;
    border: 0;
  }

  .main-nav__item {
    border: 0;
  }

  .main-nav__list {
    display: flex;
  }

  .main-nav__link {
    padding: 0 var(--space-md);
    color: var(--color-black);
    font-size: var(--fs-base);
  }

  .main-nav__link:hover,
  .main-nav__link:focus-visible,
  .main-nav__link[aria-current="page"] {
    color: var(--color-accent);
  }
}

/* ---------- 4.3 Site footer ---------- */
.site-footer {
  padding: var(--space-5xl) var(--gutter) var(--space-lg);
  background: var(--color-white);
  text-align: center;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: var(--container-width);
  margin-inline: auto;
  padding-bottom: var(--space-footer);
  border-bottom: var(--border) var(--color-text);
}

.site-footer__logo {
  width: var(--footer-logo-width);
  margin-inline: auto;
}

.site-footer__about {
  margin-top: var(--space-md);
}

.site-footer__columns {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.site-footer__title {
  margin-bottom: var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--fs-footer-title);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-title);
}

.footer-links {
  display: grid;
  gap: var(--space-xs);
}

.footer-links__link {
  color: var(--color-black);
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-list);
  transition: color var(--duration-fast);
}

.footer-links__link[href]:hover {
  color: var(--color-accent);
}

/* <address> marks the contact block for search engines; browsers italicise it by default. */
.site-footer__address {
  font-style: normal;
}

.contact-list {
  display: grid;
  gap: var(--space-sm);
  justify-items: center;
}

.contact-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-black);
  font-size: var(--fs-lg);   /* same size as the footer links */
  font-weight: var(--fw-regular);
  line-height: var(--lh-list);
  text-align: left;
}

.contact-list__icon {
  flex: none;
  width: var(--icon-contact);
  height: var(--icon-contact);
  fill: var(--color-icon);
  transition: fill var(--duration-fast);
}

.contact-list__item:hover .contact-list__icon {
  fill: var(--color-icon-hover);
}

.contact-list__link:hover,
.contact-list__link:focus-visible {
  color: var(--color-accent);
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs) var(--space-4xl);
  max-width: var(--container-width);
  margin-inline: auto;
  padding: var(--space-lg) 0 var(--space-2xl);
  border-bottom: var(--border) var(--color-black);
}


.site-footer__bottom {
  display: grid;
  justify-items: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
}

.site-footer__small {
  color: var(--color-black);
  font-size: var(--fs-lg);   /* same type as the footer links above */
  font-weight: var(--fw-regular);
  line-height: var(--lh-list);
}

/* Phones and tablets: everything centred (owner request 2026-10-27); left-aligned only on desktop. */
@media (min-width: 768px) {
  .site-footer {
    padding-inline: var(--space-4xl);
  }

  .site-footer__about {
    max-width: var(--measure);
    margin-inline: auto;
  }

  .site-footer__columns {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-footer__col {
    flex: 0 0 calc(50% - var(--space-xl) / 2);
  }

  /* Own row on tablets, so the address fits on one line. */
  .site-footer__col--contact {
    flex-basis: 100%;
  }

  .site-footer__legal {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (min-width: 1025px) {
  .site-footer {
    text-align: left;
  }

  .site-footer__top {
    flex-direction: row;
    gap: var(--space-7xl);
  }

  .site-footer__brand {
    flex: 0 0 34%;
    padding-inline: var(--space-xs);
  }

  .site-footer__logo {
    margin-inline: 0;
  }

  .site-footer__about {
    max-width: none;
    text-align: justify;
  }

  .contact-list {
    justify-items: start;
  }

  .site-footer__columns {
    flex: 1;
    flex-wrap: nowrap;
  }

  .site-footer__col--pages    { flex: 0 0 19%; }
  .site-footer__col--services { flex: 0 0 27%; }
  .site-footer__col--contact  { flex: 0 0 42%; }

  .site-footer__title {
    margin-top: var(--space-xs);
  }

  .site-footer__small {
    font-size: var(--fs-md);
  }
}

/* ---------- 4.4 Banner: centred text over a dark photo (hero slides, CTA) ---------- */
.banner__content {
  position: relative;
  z-index: var(--z-raised);
  color: var(--color-white);
  text-align: center;
  text-shadow: var(--shadow-text);
}

.banner__title {
  margin-bottom: var(--space-lg);
  color: var(--color-white);
  font-size: var(--fs-banner-title);
  font-weight: var(--fw-semibold);
}

.banner__text {
  margin-bottom: var(--space-xl);
  font-size: var(--fs-banner-text);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  text-shadow: none;
}

.banner__actions .btn {
  white-space: nowrap;
}

/* ---------- 4.5 Reveal on scroll (js/main.js: reveal) ---------- */
/* Hidden only when JS runs, so content stays visible without it. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--duration-reveal), transform var(--duration-reveal);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}


/* ---------- 4.6 Call to action (includes/cta.php, every page) ---------- */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cta-min-height);
  margin-top: var(--space-4xl);
  padding: 0 var(--gutter);
  overflow: hidden;
  background: var(--color-placeholder);
}

.cta__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns var(--duration-kenburns) linear infinite alternate;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-cta);
}

/* Shared by the hero slides and the CTA background. */
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(var(--zoom-kenburns)); }
}

@media (min-width: 1025px) {
  .cta__content {
    width: 60%;
  }
}

/* ---------- 4.7 Page hero (inner pages: photo + h1) ---------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--page-hero-height);
  padding: var(--space-4xl) var(--gutter);
  overflow: hidden;
  background: var(--color-placeholder);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-banner);
}

.page-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__content .banner__text {
  margin-bottom: 0;
}

/* ---------- 4.8 Photos: placeholder colour and fade-in ---------- */
.service-accordion__image,
.project-card__image,
.testimonials__media img,
.about__media img,
.audience-card__image {
  background: var(--color-placeholder);
}

/* Full-width photos ([data-fade]) appear softly once loaded; js/main.js (photos)
   adds .is-loaded. Hidden only with JS, so without JS they show at once. */
.js [data-fade] {
  opacity: 0;
  transition: opacity var(--duration-slow) ease;
}

.js [data-fade].is-loaded {
  opacity: 1;
}

/* ---------- 4.9 Form ---------- */
.form {
  display: grid;
  gap: var(--space-md);
}

.form__row {
  display: grid;
  gap: var(--space-md);
}

.form__field {
  display: grid;
  gap: var(--space-2xs);
}

.form__label {
  color: var(--color-black);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}

.form__required {
  color: var(--color-accent);
}

.form__input {
  width: 100%;
  padding: var(--space-sm);
  border: var(--border) var(--color-border);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-black);
  font: inherit;
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  transition: border-color var(--duration-fast);
}

.form__input:hover {
  border-color: var(--color-text);
}

/* Own chevron: the browser arrow sat against the right border and cannot be moved. */
.form__select {
  appearance: none;
  padding-right: calc(var(--space-md) * 2 + var(--select-arrow) * 2);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-black) 50%),
    linear-gradient(135deg, var(--color-black) 50%, transparent 50%);
  background-position:
    calc(100% - var(--space-md) - var(--select-arrow)) 50%,
    calc(100% - var(--space-md)) 50%;
  background-size: var(--select-arrow) var(--select-arrow);
  background-repeat: no-repeat;
}

.form__input:focus-visible {
  border-color: var(--color-black);
  outline-offset: 0;
}

.form__input[aria-invalid="true"] {
  border-color: var(--color-accent);
}

.form__textarea {
  min-height: var(--textarea-height);
  resize: vertical;
}

.form__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  cursor: pointer;
}

.form__check input {
  flex: none;
  width: var(--icon-contact);
  height: var(--icon-contact);
  margin: 0;
  accent-color: var(--color-black);
}

.form__error {
  color: var(--color-accent);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.form__note {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.form__submit {
  justify-self: start;
}

.form__notice {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-left: var(--border-thick) currentColor;
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.form__notice a {
  text-decoration: underline;
}

.form__notice--success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.form__notice--error {
  background: var(--color-error-bg);
  color: var(--color-accent);
}

/* Honeypot: off-screen instead of display:none, which some bots detect. */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}


/* ---------- 4.10 Gallery: photo grid, each photo opens in the lightbox ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs);
  margin-top: var(--space-3xl);
}

.gallery__link {
  display: block;
  overflow: hidden;
}

.gallery__image {
  width: 100%;
  aspect-ratio: var(--aspect-card);
  object-fit: cover;
  background: var(--color-placeholder);
  transition: transform var(--duration-slow) ease;
}

@media (hover: hover) {
  .gallery__link:hover .gallery__image {
    transform: scale(var(--zoom-hover));
  }
}

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }
}

@media (min-width: 1025px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- 4.11 Lightbox (includes/lightbox.php, js/main.js: lightbox) ----------
   A modal <dialog>: it sits in the browser's top layer (no z-index needed),
   keeps keyboard focus inside and closes with Esc by itself. */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--color-white);
}

.lightbox::backdrop {
  background: var(--color-lightbox);
}

.lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--lightbox-pad-block) 0;
  touch-action: pan-y;   /* horizontal swipes go to the script, vertical ones stay native */
}

.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateX(var(--lightbox-drag, 0px));
  transition: opacity var(--duration-fast), transform var(--duration-fast) ease;
  user-select: none;
}

.lightbox__image.is-loaded {
  opacity: 1;
}

/* While a finger drags the photo it follows without delay. */
.lightbox.is-dragging .lightbox__image {
  transition: none;
}

.lightbox__arrow,
.lightbox__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--tap-size);
  height: var(--tap-size);
  padding: 0;
  border: 0;
  border-radius: var(--radius-round);
  background: var(--color-lightbox-button);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.lightbox__arrow:hover,
.lightbox__close:hover {
  background: var(--color-white);
  color: var(--color-black);
}

.lightbox__arrow svg,
.lightbox__close svg {
  width: var(--icon-contact-lg);
  height: var(--icon-contact-lg);
  fill: currentColor;
}

.lightbox__arrow {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__arrow--prev {
  left: var(--space-xs);
}

.lightbox__arrow--next {
  right: var(--space-xs);
}

.lightbox__close {
  top: var(--space-sm);
  right: var(--space-sm);
}

@media (min-width: 1025px) {
  .lightbox__stage {
    padding-inline: var(--lightbox-pad-inline);
  }

  .lightbox__arrow--prev {
    left: var(--space-xl);
  }

  .lightbox__arrow--next {
    right: var(--space-xl);
  }

  .lightbox__close {
    top: var(--space-lg);
    right: var(--space-xl);
  }
}


/* ---------- 4.12 Text links inside running text ---------- */
.form__link,
.cookie-banner__link,
.legal-panel a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ---------- 4.13 Cookie consent (includes/cookie-consent.php, js/main.js: consent) ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: var(--z-overlay);
  padding-block: var(--space-md);
  border-top: var(--border) var(--color-border);
  background: var(--color-white);
  box-shadow: var(--shadow-float);
}

.cookie-banner__inner {
  display: grid;
  gap: var(--space-md);
}

.cookie-banner__text,
.cookie-dialog__text {
  color: var(--color-text-strong);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.cookie-banner__text strong {
  color: var(--color-black);
  font-weight: var(--fw-semibold);
}

/* Phones: REJECT and ACCEPT ALL side by side, PREFERENCES below them. */
.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
}

.cookie-actions .btn {
  padding: var(--space-sm);
  font-size: var(--fs-btn-small);
}

.cookie-actions__more {
  grid-column: 1 / -1;
  order: 1;
}

.cookie-dialog {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--dialog-width);
  max-height: calc(100svh - 2 * var(--gutter));
  padding: var(--space-lg);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  overflow-y: auto;
}

.cookie-dialog::backdrop {
  background: var(--color-backdrop);
}

.cookie-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.cookie-dialog__title {
  color: var(--color-black);
  font-size: var(--fs-panel);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
}

.cookie-dialog__close {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tap-size);
  height: var(--tap-size);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-black);
  cursor: pointer;
}

.cookie-dialog__close svg {
  width: var(--icon-contact-lg);
  height: var(--icon-contact-lg);
  fill: currentColor;
}

.cookie-dialog__text {
  margin-bottom: var(--space-lg);
}

.cookie-options {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: var(--border) var(--color-border);
  color: var(--color-text-strong);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
  cursor: pointer;
}

.cookie-option input {
  flex: none;
  width: var(--icon-contact);
  height: var(--icon-contact);
  margin: 0;
  accent-color: var(--color-black);
}

.cookie-option__title {
  display: block;
  margin-bottom: var(--space-2xs);
  color: var(--color-black);
  font-weight: var(--fw-semibold);
}

.cookie-option__text {
  display: block;
  font-size: var(--fs-detail);
}

.cookie-actions--dialog {
  grid-template-columns: 1fr;
}

.cookie-corner {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  z-index: var(--z-overlay);
  display: grid;
  place-items: center;
  width: var(--tap-size);
  height: var(--tap-size);
  padding: 0;
  border: var(--border) var(--color-border);
  border-radius: var(--radius-round);
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: var(--shadow-float);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

/* display: grid above would otherwise override the hidden attribute. */
.cookie-corner[hidden] {
  display: none;
}

.cookie-corner:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.cookie-corner svg {
  width: var(--icon-contact-lg);
  height: var(--icon-contact-lg);
  fill: currentColor;
}

@media (min-width: 768px) {
  .cookie-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .cookie-actions__more {
    order: 0;
  }

  .cookie-dialog {
    padding: var(--space-xl);
  }

  .cookie-actions--dialog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) {
  .cookie-banner__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-3xl);
  }
}


/* =========================================================
   5. PAGE: HOME
   ========================================================= */

/* ---------- 5.1 Hero slider ---------- */
/* Slides are stacked; only .is-active is visible (cross-fade).
   js/main.js (hero) rotates them; without JS the first slide stays. */
.hero {
  position: relative;
  /* Header + hero fill exactly one screen on every device.
     svh = height with the phone's browser bars shown (vh fallback first). */
  min-height: max(var(--hero-floor), calc(100vh - var(--header-height)));
  min-height: max(var(--hero-floor), calc(100svh - var(--header-height)));
  overflow: hidden;
  background: var(--color-placeholder);
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slide) ease, visibility 0s linear var(--duration-slide);
}

.hero__slide.is-active {
  z-index: var(--z-base);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duration-slide) ease;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-banner);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide.is-active .hero__image {
  animation: kenburns var(--duration-hero-zoom) linear forwards;
}

.hero__content {
  max-width: var(--hero-content-width);
}

/* Same width on every slide, so the buttons don't jump when the label changes. */
.hero__actions .btn {
  width: var(--hero-btn-width);
  text-align: center;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: var(--z-raised);
  padding: var(--space-xs);
  border: 0;
  background: none;
  color: var(--color-white);
  transform: translateY(-50%);
}

.hero__arrow svg {
  width: var(--icon-arrow);
  height: var(--icon-arrow);
  fill: currentColor;
}

.hero__arrow--prev {
  left: var(--space-xs);
}

.hero__arrow--next {
  right: var(--space-xs);
}

/* ---------- 5.2 Features strip ---------- */
.features {
  padding: var(--space-4xl) 0 var(--space-xl);
  background: var(--color-black);
  color: var(--color-white);
  text-align: center;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.feature {
  padding: 0 var(--space-xl) var(--space-lg);
}

.feature__icon {
  width: var(--icon-feature);
  height: var(--icon-feature);
  margin-inline: auto;
  fill: currentColor;
}

.feature__title {
  margin-top: var(--space-lg);
  color: var(--color-white);
  font-size: var(--fs-feature-mobile);
  font-weight: var(--fw-regular);
}

.feature__text {
  margin-top: var(--space-sm);
  font-family: var(--font-alt);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature__title {
    font-size: var(--fs-feature-tablet);
  }
}

@media (min-width: 1025px) {
  .feature__title {
    font-size: var(--fs-feature);
  }

  .feature__text {
    font-size: var(--fs-md);
  }
}

/* Extra breakpoint (wide desktop): 4 in a row only from 1280px; below that the
   boxes would be about 200px wide, so they stay 2×2. */
@media (min-width: 1280px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--space-4xl);
  }
}

/* ---------- 5.3 Service accordion ---------- */
/* Phones/tablets: plain stacked panels, all open (no hover on touch screens).
   Desktop: side-by-side panels; the hovered one widens and shows its button.
   "Open" = :hover or :focus-within (keyboard users reach the button). */
.service-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--accordion-gap);
}

.service-accordion__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--accordion-item);
  overflow: hidden;
}

.service-accordion__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Darkening stays on in the open panel so the title remains readable. */
.service-accordion__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  background: var(--gradient-panel);
  pointer-events: none;
}

.service-accordion__title {
  position: relative;
  z-index: var(--z-raised);
  color: var(--color-white);
  font-size: var(--fs-panel);
  font-weight: var(--fw-black);
  text-align: center;
  text-shadow: var(--shadow-text);
}

.service-accordion__btn {
  position: absolute;
  bottom: var(--space-xl);
  left: 0;
  right: 0;
  z-index: var(--z-raised);
  width: max-content;
  margin-inline: auto;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-btn-small);
}

@media (min-width: 1025px) {
  .service-accordion {
    flex-direction: row;
    height: var(--accordion-height);
  }

  .service-accordion__item {
    flex: 1 1 0;
    height: auto;
    min-width: 0;
    transition: flex-grow var(--duration-slow) ease;
  }

  .service-accordion__item:is(:hover, :focus-within) {
    flex-grow: 3;
  }

  .service-accordion:has(.service-accordion__item:is(:hover, :focus-within)) .service-accordion__item:not(:hover, :focus-within) {
    flex-grow: 0.7;
  }

  /* Button shows only in the open panel, after it has started to grow. */
  .service-accordion__btn {
    bottom: var(--space-4xl);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(var(--space-xs));
    transition: background-color var(--duration-fast), color var(--duration-fast),
      opacity var(--duration-base) ease var(--delay-reveal),
      transform var(--duration-base) ease var(--delay-reveal),
      visibility 0s linear var(--delay-reveal);
  }

  .service-accordion__item:is(:hover, :focus-within) .service-accordion__btn {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* ---------- 5.4 Partner logo strip (continuous marquee) ---------- */
.partners {
  padding: var(--space-md) 0 var(--space-xs);
}

.partners__viewport {
  max-width: var(--container-width);
  margin-inline: auto;
  overflow: hidden;
  container-type: inline-size;
}

/* Two identical lists; moving the track by -50% loops seamlessly.
   --partners-count is set by js/main.js (partners). */
.partners__track {
  display: flex;
  width: max-content;
  animation: partners-scroll calc(var(--partners-count, 22) * var(--partners-step)) linear infinite;
}

.partners__list {
  display: flex;
}

.partners__item {
  display: flex;
  justify-content: center;
  width: calc(100cqi / var(--partners-visible));
}

.partners__logo {
  filter: grayscale(100%);
  transition: filter var(--duration-fast) ease;
}

.partners__item:hover .partners__logo {
  filter: grayscale(0%);
}

@keyframes partners-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 5.5 Testimonials ---------- */
/* Order: mobile = quotes then photo; tablet = photo first;
   desktop = quote | photo | quote (as on the approved design). */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
  padding-block: var(--space-4xl);
}

.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: var(--space-md);
}

.testimonial__icon {
  width: var(--icon-quote);
  height: var(--icon-quote);
  fill: var(--color-black);
}

.testimonial__text {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  text-align: justify;
}

.testimonial__text strong {
  font-weight: var(--fw-bold);
}

.testimonial__meta {
  display: grid;
  gap: var(--space-2xs);
}

.testimonial__client {
  color: var(--color-black);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.testimonial__project {
  color: var(--color-text-strong);
  font-family: var(--font-alt);
  font-size: var(--fs-lg);
  font-style: italic;
  font-weight: var(--fw-regular);
  line-height: var(--lh-list);
  letter-spacing: var(--ls-wide);
}

.testimonials__media {
  height: var(--card-height);
  overflow: hidden;
  transition-delay: var(--delay-reveal);
}

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

@media (min-width: 768px) {
  .testimonials {
    gap: var(--space-md);
  }

  .testimonials__media {
    order: -1;
  }

  .testimonial {
    padding-block: var(--space-xl);
  }

  .testimonial__text {
    line-height: var(--lh-quote);
  }
}

@media (min-width: 1025px) {
  .testimonials {
    display: grid;
    grid-template-columns: 45fr 40fr 45fr;
    align-items: center;
    padding-block: 0 var(--space-lg);
  }

  .testimonials__media {
    order: 0;
  }

  .testimonial--left {
    padding: var(--space-2xl) var(--space-4xl) var(--space-lg) 0;
  }

  .testimonial--right {
    padding: var(--space-2xl) 0 var(--space-lg) var(--space-4xl);
  }
}

/* ---------- 5.6 Project cards ---------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1;   /* square like the photos, at every width (a fixed height made narrow cards tall and thin) */
  overflow: hidden;
}

.project-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) ease;
}

.project-card__title {
  position: relative;
  z-index: var(--z-raised);
  padding: var(--space-sm) var(--space-xl);
  background: var(--color-white);
  color: var(--color-black);
  font-size: var(--fs-card);
  font-weight: var(--fw-medium);
  text-align: center;
  transition: transform var(--duration-base) ease, opacity var(--duration-base) ease;
}

/* Hover: photo zooms, title slides away; hovering the title itself cancels it.
   Only on devices with a real mouse — a tap on a phone must not hide the name. */
@media (hover: hover) {
  .project-card:hover .project-card__image {
    transform: scale(var(--zoom-hover));
  }

  .project-card:hover .project-card__title {
    transform: translateY(110%);
    opacity: 0;
  }

  .project-card:has(.project-card__title:hover) .project-card__image {
    transform: none;
  }

  .project-card:has(.project-card__title:hover) .project-card__title {
    transform: none;
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .project-card__title {
    padding-block: var(--space-lg);
  }
}

@media (min-width: 1025px) {
  .project-card__title {
    padding-inline: 0;
  }
}

/* Extra breakpoint (wide desktop), same reason as the features strip (5.2): 2×2 until 1279px. */
@media (min-width: 1280px) {
  .project-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =========================================================
   5. PAGE: CONTACT
   ========================================================= */
.contact {
  display: grid;
  gap: var(--space-5xl);
}

.contact__intro {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.contact__details {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  font-style: normal;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact__icon {
  flex: none;
  width: var(--icon-contact-lg);
  height: var(--icon-contact-lg);
  fill: var(--color-icon);
}

.contact__label {
  margin-bottom: var(--space-3xs);
  color: var(--color-black);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.contact__value {
  color: var(--color-black);
  font-size: var(--fs-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.contact__link {
  transition: color var(--duration-fast);
}

.contact__link:hover,
.contact__link:focus-visible {
  color: var(--color-accent);
}

.map {
  margin-top: var(--space-6xl);
}

.map__frame {
  display: block;
  width: 100%;
  height: var(--map-height);
  border: 0;
}

/* The CTA follows the map directly, without the usual gap. */
.map + .cta {
  margin-top: 0;
}

@media (min-width: 1025px) {
  .contact {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-7xl);
  }
}


/* =========================================================
   5. PAGE: COMPANY
   ========================================================= */
.about {
  display: grid;
  gap: var(--space-4xl);
  align-items: center;
}

.about__text p {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.about__text p + p {
  margin-top: var(--space-md);
}

.about__media img {
  width: 100%;
}

/* Black band like the homepage features strip, with numbered steps. */
.process {
  margin-top: var(--space-6xl);
  padding: var(--space-5xl) 0 var(--space-4xl);
  background: var(--color-black);
  color: var(--color-white);
}

.process__list {
  display: grid;
  gap: var(--space-3xl);
  padding: 0;
  list-style: none;
}

.process__step {
  padding-top: var(--space-md);
  border-top: var(--border) var(--color-divider-dark);
}

.process__number {
  display: block;
  color: var(--color-accent-on-dark);
  font-size: var(--fs-step-number);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.process__title {
  margin-top: var(--space-xs);
  color: var(--color-white);
  font-size: var(--fs-feature);
  font-weight: var(--fw-regular);
}

.process__text,
.value-card__text,
.audience-card__text {
  margin-top: var(--space-xs);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.values {
  display: grid;
  gap: var(--space-xl);
}

.value-card {
  padding: var(--space-xl);
  border: var(--border) var(--color-border);
  border-top: var(--border-thick) var(--color-accent);
}

.value-card__title,
.audience-card__title {
  color: var(--color-black);
  font-size: var(--fs-card);
  font-weight: var(--fw-medium);
}

.audiences {
  display: grid;
  gap: var(--space-3xl);
}

.audience-card__image {
  width: 100%;
  aspect-ratio: var(--aspect-card);
  object-fit: cover;
}

.audience-card__title {
  margin-top: var(--space-md);
}

@media (min-width: 768px) {
  .process__list,
  .values {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tablet: one card per row, photo beside the text (3 in a row would be too narrow). */
  .audience-card {
    display: grid;
    grid-template-columns: 2fr 3fr;
    column-gap: var(--space-xl);
    align-items: center;
  }

  .audience-card__image {
    grid-row: span 2;
  }

  .audience-card__title {
    align-self: end;
    margin-top: 0;
  }

  .audience-card__text {
    align-self: start;
  }
}

@media (min-width: 1025px) {
  .about {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7xl);
  }

  .audiences {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .audience-card {
    display: block;
  }

  .audience-card__title {
    margin-top: var(--space-md);
  }
}

/* Extra breakpoint (wide desktop), same reason as the features strip (5.2). */
@media (min-width: 1280px) {
  .process__list,
  .values {
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--space-3xl);
  }
}


/* =========================================================
   5. PAGE: PROJECTS
   ========================================================= */
.projects-intro p {
  max-width: var(--measure);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

/* Columns follow the space, not fixed breakpoints: as many cards as fit at
   --card-min-width (so a card is never squeezed), at most 3 per row. */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, var(--card-min-width)), calc((100% - 2 * var(--space-xl)) / 3)), 1fr));
  gap: var(--space-xl);
}

.project-item {
  display: flex;
  flex-direction: column;
  border: var(--border) var(--color-border);
}

.project-item__media {
  position: relative;
  overflow: hidden;
}

.project-item__image {
  width: 100%;
  aspect-ratio: var(--aspect-card);
  object-fit: cover;
  background: var(--color-placeholder);
  transition: transform var(--duration-base) ease;
}

.project-item__status {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-2xs) var(--space-xs);
  background: var(--color-black);
  color: var(--color-white);
  font-size: var(--fs-btn-small);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.project-item__status--progress {
  background: var(--color-accent);
}

.project-item__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--space-lg);
}

.project-item__title {
  color: var(--color-black);
  font-size: var(--fs-card);
  font-weight: var(--fw-medium);
}

.project-item__location {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-2xs);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.project-item__icon {
  flex: none;
  width: var(--icon-small);
  height: var(--icon-small);
  fill: var(--color-icon);
}

.project-item__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.project-item__facts li {
  padding: var(--space-3xs) var(--space-xs);
  border: var(--border) var(--color-border);
  font-size: var(--fs-detail);
  line-height: var(--lh-snug);
}

.project-item__facts strong {
  color: var(--color-black);
  font-weight: var(--fw-semibold);
}

.project-item__details {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-md) 0 var(--space-lg);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.project-item__details dt {
  color: var(--color-black);
  font-weight: var(--fw-semibold);
}

.project-item__details dd {
  margin: 0;
  color: var(--color-text-strong);
  font-weight: var(--fw-regular);
}

/* Logo sits at the bottom, so logos line up across a row of cards;
   same height for every logo, wide ones are scaled down to fit. */
.project-item__logo {
  width: auto;
  max-width: var(--project-logo-width);
  height: var(--project-logo-height);
  margin-top: auto;
  object-fit: contain;
  object-position: left center;
}

@media (hover: hover) {
  .project-item:hover .project-item__image {
    transform: scale(var(--zoom-hover));
  }
}


/* =========================================================
   5. PAGE: SERVICES
   ========================================================= */
.services-overview {
  padding-bottom: var(--space-6xl);
}

.services-intro {
  max-width: var(--measure);
  margin-bottom: var(--space-3xl);
}

.service-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.service-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-placeholder);
  color: var(--color-white);
}

.service-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-tile-overlay);
  transition: background var(--duration-fast);
}

.service-tile__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) ease;
}

.service-tile__label {
  position: relative;
  z-index: var(--z-raised);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

@media (hover: hover) {
  .service-tile:hover .service-tile__image {
    transform: scale(var(--zoom-hover));
  }

  .service-tile:hover::after {
    background: var(--color-tile-overlay-hover);
  }
}

/* Less space on phones, so a jump from the tiles puts the heading near the top of the screen. */
.service-block {
  padding-block: var(--space-3xl);
}

.service-block--tinted {
  background: var(--color-surface);
}

.service-block__intro {
  display: grid;
  gap: var(--space-lg);
}

.service-block__text {
  max-width: var(--measure);
}

.service-block__points {
  display: grid;
  gap: var(--space-xs);
  color: var(--color-text-strong);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.service-block__points li {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

/* Small red square as the bullet. */
.service-block__points li::before {
  content: "";
  flex: none;
  width: var(--bullet-size);
  height: var(--bullet-size);
  background: var(--color-accent);
}

@media (min-width: 768px) {
  .service-tiles {
    gap: var(--space-lg);
  }

  .service-block {
    padding-block: var(--space-6xl);
  }
}

/* 2×2 tiles until desktop, so "HOSPITALITY" never gets squeezed. */
@media (min-width: 1025px) {
  .service-tiles {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-tile__label {
    font-size: var(--fs-card);
    letter-spacing: var(--ls-button);
  }

  .service-block__intro {
    grid-template-columns: 3fr 2fr;
    align-items: end;
    gap: var(--space-5xl);
  }
}


/* =========================================================
   5. PAGE: LEGAL
   ========================================================= */
/* Flex gap instead of margins: panels hidden by js/main.js (legal) leave no gap. */
.legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}

.legal-tabs {
  scroll-margin-top: var(--space-xl);
}

.legal-tabs__list {
  display: grid;
  gap: var(--space-sm);
}

.legal-tabs__tab {
  display: block;
  text-align: center;
}

.legal-tabs__tab[aria-current] {
  background: var(--color-black);
  color: var(--color-white);
}

.legal-panel {
  max-width: var(--measure);
  color: var(--color-text-strong);
  font-weight: var(--fw-regular);
  line-height: var(--lh-text);
}

.legal-panel__updated {
  color: var(--color-text);
  font-size: var(--fs-detail);
}

.legal-panel h3 {
  margin: var(--space-2xl) 0 var(--space-xs);
  color: var(--color-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.legal-panel p,
.legal-panel ul {
  margin-bottom: var(--space-md);
}

.legal-panel ul {
  padding-left: var(--space-lg);
  list-style: disc;
}

.legal-panel li + li {
  margin-top: var(--space-xs);
}

.legal-panel strong {
  color: var(--color-black);
  font-weight: var(--fw-semibold);
}

/* The COOKIE SETTINGS button needs JS, so it only shows when JS runs. */
.legal-panel__action {
  display: none;
}

.js .legal-panel__action {
  display: block;
}

@media (min-width: 768px) {
  .legal-tabs__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .legal-tabs__list {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* =========================================================
   6. UTILITIES
   ========================================================= */

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important; /* utility must win over component rules */
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important; /* accessibility: respect the OS setting */
    transition: none !important;
  }

  .partners__viewport {
    overflow-x: auto;
  }
}
