
/* ===========================================================
   TOKENS
=========================================================== */
:root {
  --color-black: #030712;      /* Neutral/100 */
  --color-text-70: #374151;    /* Neutral/70 */
  --color-text-60: #4b5563;    /* Neutral/60 */
  --color-text-50: #6b7280;    /* Neutral/50 */
  --color-line-20: #e5e7eb;    /* Neutral/20 */
  --color-white: #ffffff;
  --color-footer-bg: #05080a;
  --color-muted-heading: #aeb2ba;
  --color-surface-1: #f4f4f4;
  --color-surface-2: #ebebeb;
  --color-surface-3: #f9fafb;

  --font-body: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1920px;
  --gutter: 72px;
}

/* ===========================================================
   RESET
=========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

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

.icon { display: block; flex-shrink: 0; }
.icon-flip { transform: rotate(180deg); }

/* ===========================================================
   SHARED LAYOUT
=========================================================== */
main, header, footer { width: 100%; }

.navbar__inner,
.hero__container,
.works,
.about__row,
.testimonials,
.footer__body,
.footer__cta,
.footer__bottom,
.mobile-nav {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
}

/* ===========================================================
   BUTTONS
=========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--white { background: var(--color-white); color: var(--color-black); }
.btn--dark { background: var(--color-black); color: var(--color-white); }
.btn--outline { background: transparent; color: var(--color-black); border-color: var(--color-black); }

.btn--outline-dim {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-text-60);
  flex: 1;
  padding: 8px 20px;
}

.btn--icon { padding: 10px; background: var(--color-white); position: relative; }
.btn--icon .icon--close { display: none; }
.btn--icon[aria-expanded="true"] .icon--menu { display: none; }
.btn--icon[aria-expanded="true"] .icon--close { display: block; }

.btn--icon-outline { padding: 12px; border: 1px solid var(--color-black); background: transparent; }
.btn--icon-outline .icon { width: 24px; height: 24px; }

/* Hover — light buttons invert to dark and vice versa */
.btn--white:hover { background: var(--color-black); color: var(--color-white); }
.btn--dark:hover { background: var(--color-white); color: var(--color-black); border-color: var(--color-black); }
.btn--outline:hover { background: var(--color-black); color: var(--color-white); }
.btn--outline-dim:hover { background: var(--color-white); color: var(--color-black); border-color: var(--color-white); }
.btn--icon:hover { background: var(--color-black); color: var(--color-white); }
.btn--icon-outline:hover { background: var(--color-black); color: var(--color-white); border-color: var(--color-black); }

/* ===========================================================
   NAVBAR
=========================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  transition: background-color 0.25s ease;
}
.navbar.is-scrolled,
.navbar.is-open { background: var(--color-white); }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
  transition: opacity 0.2s ease, color 0.25s ease;
}
.navbar__logo:hover { opacity: 0.6; }
.navbar.is-scrolled .navbar__logo,
.navbar.is-open .navbar__logo { color: var(--color-black); }

.navbar__menu { display: flex; align-items: center; gap: 16px; }

/* Mobile nav panel — hidden by default */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 var(--gutter) 24px;
  gap: 4px;
  border-top: 1px solid var(--color-line-20);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 14px 0 14px 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  border-bottom: 1px solid var(--color-line-20);
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--color-surface-1); padding-left: 12px; }

/* ===========================================================
   HERO
=========================================================== */
.hero {
  position: relative;
  color: var(--color-white);
  min-height: 1000px;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #05080a;
  z-index: -1;
}

.hero__bg--photo {
  background-size: cover;
  background-position: center;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 10, 0.55) 0%, rgba(5, 8, 10, 0.88) 100%);
}

.hero__container { display: flex; width: 100%; max-width: var(--container-max); margin-inline: auto; }

.hero__row { display: flex; align-items: flex-end; gap: 141px; width: 100%; }

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-transform: uppercase;
  max-width: 1056px;
}

.hero__eyebrow { font-weight: 500; font-size: 18px; line-height: 1.2; }
.hero__title { font-weight: 600; font-size: 64px; line-height: 1; }

.hero__desc { display: flex; flex-direction: column; gap: 24px; flex: 1; min-width: 0; }
.hero__desc p { font-size: 16px; line-height: 1.3; text-align: justify; text-transform: uppercase; }

/* ===========================================================
   WORKS
=========================================================== */
.works {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: var(--gutter);
}

.works__header { display: flex; align-items: center; gap: 24px; }
.works__header h2 { flex: 1; font-weight: 500; font-size: 32px; text-transform: uppercase; }

/* Horizontal carousel variant — e.g. montelux's "Selected works", showing
   every other project as a scrollable row instead of the homepage's
   stacked list. */
.works__carousel-viewport { width: 100%; overflow: hidden; }
.works__carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.works__carousel::-webkit-scrollbar { display: none; }
.works__carousel .project { flex: 0 0 400px; max-width: 85vw; scroll-snap-align: start; }
.works__carousel .project__content { flex-direction: column; align-items: flex-start; gap: 16px; }

.works__list { display: flex; flex-direction: column; gap: 48px; }

.project { display: flex; flex-direction: column; gap: 24px; }
.project--extra.is-hidden { display: none; }

.project__image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-surface-1);
}
.project__image img { width: 100%; height: 100%; object-fit: cover; }

.project__image--montelux { aspect-ratio: 1920 / 1080; background: var(--color-surface-1); }
.project__image--wecliq { aspect-ratio: 1920 / 1080; background: var(--color-surface-2); }
.project__image--metis { aspect-ratio: 1920 / 1467; background: #050505; }
.project__image--smartair { aspect-ratio: 1920 / 1080; }
.project__image--nordroof { aspect-ratio: 1600 / 900; background: var(--color-surface-1); }
.project__image--exience { aspect-ratio: 1920 / 1080; background: var(--color-surface-2); }
.project__image--linqly { aspect-ratio: 1920 / 1440; background: var(--color-surface-1); }

.project__content { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }

.project__text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; text-transform: uppercase; }
.project__text h3 { font-weight: 500; font-size: 20px; line-height: 1.3; }
.project__text h3 a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease, color 0.15s ease;
}
.project__text h3 a:hover { background-size: 100% 1px; color: var(--color-text-60); }
.project__text p { font-weight: 400; font-size: 16px; line-height: 1.5; color: var(--color-text-70); }

/* Arrow button — hidden on mobile (max-width: 640px); h3 title link still reaches the project */
.project__arrow { display: inline-flex; flex-shrink: 0; }

.works__more { display: flex; justify-content: center; }

/* ===========================================================
   ABOUT
=========================================================== */
.about { padding: var(--gutter); display: flex; justify-content: flex-end; flex-direction: column; }
.about__row { display: flex; align-items: flex-end; gap: 72px; }
.about__content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.about__text { display: flex; flex-direction: column; gap: 24px; text-transform: uppercase; }
.about__title { font-weight: 600; font-size: 64px; line-height: 1; }
.about__title--muted { color: var(--color-muted-heading); }
.about__quote { font-weight: 400; font-size: 16px; line-height: 1.5; text-align: justify; color: var(--color-text-70); max-width: 697px; }

/* Uppercase variant — scoped so the homepage's About quote keeps its current casing */
.about--upper .about__quote { text-transform: uppercase; }

.about__tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
  font-size: 16px;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-text-50);
  white-space: nowrap;
}

/* ===========================================================
   ABOUT PAGE — bio/story text + stats
=========================================================== */
.about-story { padding: var(--gutter); max-width: var(--container-max); margin-inline: auto; }
.about-story__row { display: flex; gap: 48px; align-items: flex-start; }
.about-story__col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about-story__col h2 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
.about-story__col p { font-size: 16px; line-height: 1.6; color: var(--color-text-70); text-align: justify; text-transform: uppercase; }
.about-story__cta { margin-top: 8px; }

.stats { padding: 0 var(--gutter) var(--gutter); max-width: var(--container-max); margin-inline: auto; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stats__item { display: flex; flex-direction: column; gap: 8px; padding-top: 24px; border-top: 1px solid var(--color-line-20); }
.stats__number { font-weight: 600; font-size: 96px; line-height: 1; }
.stats__label { font-size: 14px; text-transform: uppercase; color: var(--color-text-60); letter-spacing: 0.28px; }

/* ===========================================================
   TESTIMONIALS — always a horizontal carousel
=========================================================== */
.testimonials { display: flex; flex-direction: column; gap: 24px; padding: var(--gutter); }

.testimonials__header { display: flex; align-items: center; gap: 24px; }
.testimonials__header h2 { flex: 1; font-weight: 500; font-size: 32px; text-transform: uppercase; }
.testimonials__nav { display: flex; gap: 12px; }

.testimonials__viewport { width: 100%; overflow: hidden; }

.testimonials__grid {
  display: flex;
  gap: 20px;
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.testimonials__grid::-webkit-scrollbar { display: none; }

.testimonial {
  flex: 0 0 calc(50% - 10px);
  scroll-snap-align: start;
  min-width: 0;
  background: var(--color-surface-3);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.testimonial__top { display: flex; flex-direction: column; gap: 6px; }
.testimonial__meta { display: flex; align-items: center; justify-content: space-between; }
.testimonial__meta h3 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
.icon--stars { color: var(--color-black); }

.testimonial__location { font-size: 16px; color: var(--color-text-70); text-transform: uppercase; }
.testimonial__quote { font-size: 16px; line-height: 1.5; text-align: justify; text-transform: uppercase; color: var(--color-text-70); }

.testimonial__tags { display: flex; flex-wrap: wrap; gap: 12px; }
.testimonial__tags li {
  border: 1px solid var(--color-black);
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--color-text-70);
}

/* ===========================================================
   FOOTER
=========================================================== */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 72px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer__cta { padding-bottom: 72px; border-bottom: 1px solid var(--color-line-20); display: flex; flex-direction: column; gap: 24px; width: 100%; margin-bottom: 72px; }
.footer__cta-labels { display: flex; justify-content: space-between; font-weight: 500; font-size: 16px; text-transform: uppercase; }

.footer__email-wrap { width: 100%; overflow: hidden; }
.footer__email {
  display: block;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 105px; /* fallback before JS measures; JS fits it exactly to the row width */
}

.footer__body { display: flex; flex-direction: column; gap: 24px; width: 100%; margin-bottom: 24px; }
.footer__socials { display: flex; gap: 16px; }
.footer__columns { display: flex; gap: 64px; }

.footer__brand { flex: 1; min-width: 0; display: flex; color: var(--color-white); }
.icon--footer-logo { width: 100%; height: auto; aspect-ratio: 95 / 45; }

.footer__bottom { display: flex; gap: 64px; font-size: 16px; text-transform: uppercase; color: var(--color-line-20); width: 100%; }
.footer__bottom p:first-child { flex: 1; }
.footer__bottom p:last-child { text-align: right; }

/* ===========================================================
   PROJECT (CASE STUDY) PAGES
=========================================================== */
.project-hero {
  padding: calc(var(--gutter) + 24px) var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: var(--container-max);
  margin-inline: auto;
}

.project-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  color: var(--color-text-60);
  width: fit-content;
}
.project-hero__back .icon { transform: rotate(180deg); width: 18px; height: 18px; transition: transform 0.2s ease; }
.project-hero__back:hover { color: var(--color-black); }
.project-hero__back:hover .icon { transform: rotate(180deg) translateX(4px); }

.project-hero__meta { display: flex; flex-direction: column; gap: 20px; }
.project-hero__eyebrow { font-weight: 500; font-size: 16px; text-transform: uppercase; color: var(--color-text-60); letter-spacing: 0.32px; }
.project-hero__title { font-weight: 600; font-size: 48px; line-height: 1.1; text-transform: uppercase; max-width: 1200px; }
.project-hero__tagline { font-weight: 400; font-size: 20px; line-height: 1.4; text-transform: uppercase; color: var(--color-text-70); max-width: 900px; }

.project-hero__tags { display: flex; flex-wrap: wrap; gap: 12px; }
.project-hero__tags li {
  border: 1px solid var(--color-black);
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: var(--color-text-70);
}

.project-hero__image { width: 100%; overflow: hidden; background: var(--color-surface-1); }
.project-hero__image img { width: 100%; height: auto; object-fit: cover; }

/* Full-bleed cover variant — hero image as a full-screen background with
   text overlaid on top, matching the homepage hero (e.g. montelux). */
.project-hero--cover {
  position: relative;
  max-width: none;
  margin-inline: 0;
  min-height: 1000px;
  justify-content: space-between;
  padding: var(--gutter);
  padding-top: calc(var(--gutter) + 96px);
  color: var(--color-white);
  overflow: hidden;
}
.project-hero--cover .project-hero__back,
.project-hero--cover .project-hero__eyebrow,
.project-hero--cover .project-hero__tagline { color: var(--color-line-20); }
.project-hero--cover .project-hero__back:hover { color: var(--color-white); }
.project-hero--cover .project-hero__title { color: var(--color-white); }
.project-hero--cover .project-hero__tags li { border-color: var(--color-line-20); color: var(--color-white); }
.project-hero--cover .project-hero__image {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.project-hero--cover .project-hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1) 0%, rgba(3, 7, 18, 0.85) 100%);
}
.project-hero--cover .project-hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* Two-column split, matching the homepage hero: title left, tagline + tags
   pinned to the right. Same 3fr/2fr grid + gap as .project-bio__row so the
   right column's left edge lines up exactly between the hero and the bio
   section below it. */
.project-hero--cover .project-hero__meta { width: 100%; display: grid; grid-template-columns: 2fr 1fr; align-items: end; gap: 24px; }
.project-hero--cover .project-hero__intro { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.project-hero--cover .project-hero__desc { display: flex; flex-direction: column; gap: 20px; min-width: 0; align-items: flex-start; }

.project-overview {
  padding: var(--gutter);
  max-width: var(--container-max);
  margin-inline: auto;
}
.project-overview__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 24px; align-items: start; }
/* Title-only left column / heading+description right column — same 2fr:1fr
   ratio as the hero and bio rows, for sections where one side is just a
   short label and the other carries the real copy. */
.project-overview__row--split { grid-template-columns: 2fr 1fr; }
.project-overview__col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project-overview__col h2, .project-overview__col h3 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
.project-overview__col p { font-size: 16px; line-height: 1.5; color: var(--color-text-70); text-align: justify; }

/* Uppercase body copy variant — scoped so other project pages keep their current casing */
.project-overview--upper .project-overview__col p { text-transform: uppercase; }

/* Two-column bio + role list — bespoke case-study intro (e.g. montelux) */
.project-bio {
  padding: var(--gutter);
  max-width: var(--container-max);
  margin-inline: auto;
}
/* Editorial fixed ratio — proportional columns instead of hug/equal-flex,
   so the split reads intentionally regardless of how short either side's
   content is. */
.project-bio__row { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.project-bio__text { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project-bio__text h2 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
.project-bio__role { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project-bio__role h3 { font-weight: 500; font-size: 20px; text-transform: uppercase; }
.project-bio__desc { font-size: 16px; line-height: 1.5; color: var(--color-text-70); text-align: justify; text-transform: uppercase; }
.project-bio__role-title { font-weight: 500; font-size: 16px; text-transform: uppercase; color: var(--color-text-70); }
.project-bio__tags {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--color-text-50);
}

/* Unequal-width image pair — pairs a desktop screenshot with its mobile
   counterpart at a shared height. Each frame hugs its image (width:auto
   at height:100%), so the wide/narrow proportions fall out naturally from
   each image's own aspect ratio. */
.project-duo {
  padding: 0 var(--gutter) var(--gutter);
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 48px;
  height: 42vw;
  max-height: 780px;
  min-height: 360px;
}
.project-duo__item { flex: 0 0 auto; overflow: hidden; }
.project-duo__item img { display: block; width: auto; height: 100%; }

/* Rotating duo frame — holds a fixed stack of images that slide through
   one at a time instead of a single static image. The frame's size comes
   from a fixed aspect-ratio (not hugging one image), so it stays put as
   the rotation cycles through images of slightly different proportions.
   Both columns share one keyframe animation; the narrow column just plays
   it in reverse, which flips the slide direction for free. */
.project-duo__item--rotator { position: relative; height: 100%; }
.project-duo__item--rotator.project-duo__item--wide { aspect-ratio: 1.7; }
.project-duo__item--rotator.project-duo__item--tablet { aspect-ratio: 1.33; }
.project-duo__item--rotator.project-duo__item--narrow { aspect-ratio: 0.47; }

/* Compact height — for triple rows mixing wider aspect columns (e.g.
   montelux's pc+tablet+mobile), where the default duo height would make
   the combined row overflow the container. Kept separate from
   .project-duo--triple (which is just the 3-column direction/stagger
   pattern) since triples of same-aspect narrow columns (e.g. wecliq's
   three phone columns) fit fine at full height and read better bigger. */
.project-duo--compact { height: 24vw; max-height: 460px; min-height: 220px; }
.project-duo__strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 600%;
  animation: project-duo-rotate 30s ease-in-out infinite;
}
.project-duo__item--narrow .project-duo__strip { animation-direction: reverse; }

/* Triple layout alternates direction per column by position (1st and 3rd
   bottom-to-top, 2nd top-to-bottom) regardless of what aspect-ratio class
   each column uses — works whether the three columns are different device
   types (montelux: wide/tablet/narrow) or all the same type (wecliq: three
   narrow phone columns). Overrides the narrow-is-always-reverse default
   above since these selectors are more specific. */
.project-duo--triple .project-duo__item:nth-child(1) .project-duo__strip,
.project-duo--triple .project-duo__item:nth-child(3) .project-duo__strip { animation-direction: normal; }
.project-duo--triple .project-duo__item:nth-child(2) .project-duo__strip { animation-direction: reverse; }

/* Stagger the three columns so they slide in sequence (1st, then 2nd,
   then 3rd) instead of all swapping images at the same instant. */
.project-duo--triple .project-duo__item:nth-child(1) .project-duo__strip { animation-delay: 0s; }
.project-duo--triple .project-duo__item:nth-child(2) .project-duo__strip { animation-delay: 1.5s; }
.project-duo--triple .project-duo__item:nth-child(3) .project-duo__strip { animation-delay: 3s; }
.project-duo__strip img {
  display: block;
  width: 100%;
  height: 16.6667%;
  flex: 0 0 16.6667%;
  object-fit: contain;
}
@keyframes project-duo-rotate {
  0%, 14.667% { transform: translateY(0%); }
  16.667%, 31.333% { transform: translateY(-16.6667%); }
  33.333%, 48% { transform: translateY(-33.3333%); }
  50%, 64.667% { transform: translateY(-50%); }
  66.667%, 81.333% { transform: translateY(-66.6667%); }
  83.333%, 100% { transform: translateY(-83.3333%); }
}

/* 5-image variant — same idea, different stack size/timing so the math
   still lands exactly on each frame. */
.project-duo__strip--5 { height: 500%; animation-name: project-duo-rotate-5; }
.project-duo__strip--5 img { height: 20%; flex: 0 0 20%; }
@keyframes project-duo-rotate-5 {
  0%, 17.6% { transform: translateY(0%); }
  20%, 37.6% { transform: translateY(-20%); }
  40%, 57.6% { transform: translateY(-40%); }
  60%, 77.6% { transform: translateY(-60%); }
  80%, 100% { transform: translateY(-80%); }
}

/* 7-image variant. */
.project-duo__strip--7 { height: 700%; animation-name: project-duo-rotate-7; }
.project-duo__strip--7 img { height: 14.2857%; flex: 0 0 14.2857%; }
@keyframes project-duo-rotate-7 {
  0%, 12.57% { transform: translateY(0%); }
  14.2857%, 26.86% { transform: translateY(-14.2857%); }
  28.5714%, 41.14% { transform: translateY(-28.5714%); }
  42.8571%, 55.43% { transform: translateY(-42.8571%); }
  57.1429%, 69.71% { transform: translateY(-57.1429%); }
  71.4286%, 84% { transform: translateY(-71.4286%); }
  85.7143%, 100% { transform: translateY(-85.7143%); }
}

/* 4-image variant. */
.project-duo__strip--4 { height: 400%; animation-name: project-duo-rotate-4; }
.project-duo__strip--4 img { height: 25%; flex: 0 0 25%; }
@keyframes project-duo-rotate-4 {
  0%, 22% { transform: translateY(0%); }
  25%, 47% { transform: translateY(-25%); }
  50%, 72% { transform: translateY(-50%); }
  75%, 100% { transform: translateY(-75%); }
}

.project-gallery { padding: 0 var(--gutter) var(--gutter); max-width: var(--container-max); margin-inline: auto; }
.project-gallery__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.project-gallery__item { overflow: hidden; background: var(--color-surface-1); }
.project-gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* PC/desktop screenshots — two-up on larger screens */
.project-gallery--pc .project-gallery__grid { grid-template-columns: repeat(2, 1fr); }
.project-gallery--pc .project-gallery__item:only-child { grid-column: 1 / -1; }

/* Panning banner — the image renders at its natural aspect ratio (scaled
   only to the frame's height, never cropped/stretched) and slowly pans
   left/right within the clipped frame via background-position, which the
   browser interpolates without needing to know the image's pixel size. The
   <img> stays in the DOM (visually hidden) so alt text is preserved. */
.project-gallery__item--pan {
  position: relative;
  height: 34vw;
  max-height: 620px;
  min-height: 300px;
  padding: 20px 0;
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: 0% center;
  background-origin: content-box;
  animation: project-gallery-pan 45s linear infinite alternate;
}
/* Opposite phase — starts panning the other way, so two banners placed
   near each other read as moving in contrasting directions instead of
   in sync. */
.project-gallery__item--pan-reverse { animation-direction: alternate-reverse; }
.project-gallery__item--pan img {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes project-gallery-pan {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}

/* Larger variant — scoped so it doesn't affect the shared default used on
   montelux. */
.project-gallery__item--pan-lg { height: 40vw; max-height: 720px; min-height: 340px; padding: 24px 0; }

/* Extra-large variant — for banners of tall/narrow phone-screen strips
   where the screens need to stay readable. */
.project-gallery__item--pan-xl { height: 46vw; max-height: 860px; min-height: 400px; padding: 28px 0; }

/* Flush variant — no padding, for images that already carry their own
   opaque background (nothing transparent for the padding to give
   breathing room around), where the padding just reads as a mismatched
   grey stripe against the image's own background color. */
.project-gallery__item--pan-flush { padding: 0; }

/* ===========================================================
   RESPONSIVE
=========================================================== */
@media (max-width: 1440px) {
  :root { --gutter: 48px; }
  .hero__title, .about__title { font-size: 48px; }
  .hero__row { gap: 64px; }
}

@media (max-width: 1200px) {
  .project-hero__title { font-size: 40px; }
}

@media (max-width: 1080px) {
  .hero__row,
  .about__row,
  .about-story__row,
  .project__content,
  .footer__columns {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .project-overview__row,
  .project-bio__row,
  .project-hero--cover .project-hero__meta { grid-template-columns: 1fr; }
  .about__tags { align-items: flex-start; }
  .project-hero--cover .project-hero__desc { max-width: none; align-items: flex-start; }
  /* testimonials intentionally NOT stacked — stays a horizontal carousel */
  .testimonial { flex: 0 0 calc(50% - 10px); }
  .hero, .project-hero--cover { min-height: 720px; }
}

@media (max-width: 900px) {
  .hero__desc p, .about__quote, .testimonial__quote, .hero__eyebrow, .project-overview__col p, .project-bio__text p {
    text-align: left;
  }
  .project-gallery--pc .project-gallery__grid { grid-template-columns: 1fr; }
  .project-duo { flex-direction: column; height: auto; max-height: none; min-height: 0; }
  .project-duo__item img { width: 100%; height: auto; }
  .project-duo__item--rotator { height: auto; }
  .project-duo__strip img { width: 100%; height: 16.6667%; }
  .project-duo__strip--5 img { height: 20%; }
  .project-duo__strip--7 img { height: 14.2857%; }
  .project-duo__strip--4 img { height: 25%; }
  .project-gallery__item--pan { height: 55vw; min-height: 200px; padding: 16px 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .hero, .project-hero--cover { min-height: 100vh; min-height: 100svh; padding-bottom: 40px; }
  .hero__title, .about__title { font-size: 32px; }
  .hero__row { gap: 32px; }
  .footer__socials { flex-wrap: wrap; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .testimonial { flex: 0 0 100%; padding: 20px; }
  .works__header h2, .testimonials__header h2 { font-size: 24px; }
  .stats__grid { grid-template-columns: 1fr; }
  .stats__number { font-size: 64px; }
  .footer { padding-top: 48px; }
  .footer__cta { padding-bottom: 48px; margin-bottom: 48px; }
  .footer__email { font-size: clamp(28px, 11vw, 105px); }
  .project-hero { gap: 24px; padding-top: 40px; }
  .project-hero__title { font-size: 28px; }
  .project-overview__row { gap: 32px; }
  .project__arrow { display: none; }
}

@media (max-width: 400px) {
  .works__header, .testimonials__header { flex-wrap: wrap; }
}
