/* =========================================================
   YORK CABINETRY — main stylesheet
   Sections: 1 TOKENS · 2 RESET/BASE · 3 LAYOUT · 4 COMPONENTS
             5 PAGE: HOME · 6 UTILITIES
   Breakpoints (mobile-first, min-width only):
     --bp-tablet  768px   tablet and up
     --bp-desktop 1025px  desktop and up
   (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;

  /* 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-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-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;
  --radius-round: 50%;

  /* Shadows */
  --shadow-text: 0 2px 12px rgb(0 0 0 / 0.6);
  --border: 1px solid;
  --border-thick: 4px solid;
  --aspect-card: 4 / 3;

  /* 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);
}

/* ---------- 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 {
  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-base);
  line-height: var(--lh-snug);
}

@media (min-width: 768px) {
  .site-footer {
    padding-inline: var(--space-4xl);
    text-align: left;
  }

  .site-footer__brand {
    max-width: 50%;
  }

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

  .site-footer__about {
    text-align: justify;
  }

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

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

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

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

@media (min-width: 1025px) {
  .site-footer__top {
    flex-direction: row;
    gap: var(--space-7xl);
  }

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

  .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;
}

.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-black);
}

.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 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);
}

.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;
  }
}


/* =========================================================
   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-black);
}

.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) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--space-4xl);
  }

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

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

/* ---------- 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;
  min-height: var(--card-height);
  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-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .project-card__title {
    padding-inline: 0;
  }
}

/* =========================================================
   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);
  }

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

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

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


/* =========================================================
   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;
  }
}
