/* ==========================================================================
   Mercury Events — site styles
   Design system: maroon #8B1538, navy #132854, white.
   Type: Playfair Display (headings), Roboto (body), Inter (footer details).
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair";
  src: url("../fonts/playfair-latin-opsz-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --maroon: #8B1538;
  --navy: #132854;
  --white: #ffffff;
  --ink: #000000;
  --mist: #B4B9C9;
  --dash: #D9D9D9;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --numerals: "Playfair", "Playfair Display", Georgia, serif;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --inter: "Inter", "Roboto", system-ui, sans-serif;

  --gutter: clamp(20px, 6.11vw, 88px);     /* 88px at 1440 */
  --inset: clamp(24px, 15.42vw, 222px);    /* 222px at 1440 */
  --nav-h: clamp(84px, 9.1vw, 131px);      /* 131px at 1440 */
  --section: clamp(84px, 12vw, 180px);
  --h1: clamp(2.375rem, 1.6rem + 2.2vw, 3rem);   /* 48px on desktop */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--maroon); color: #fff; }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }
.footer :focus-visible, .nav :focus-visible, .hero :focus-visible, .phero :focus-visible { outline-color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 18px;
  background: #fff; color: var(--maroon); border-radius: 20px; font-weight: 700;
  transition: top .2s;
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: calc(1264px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.h-display {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--h1);
  line-height: 1.134;
  letter-spacing: 0;
}
.h-center { text-align: center; }
.lead { font-size: clamp(1rem, .9rem + .5vw, 1.25rem); line-height: 1.25; }

/* ---------- Buttons: white pills with a maroon border ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 177px; height: 40px; padding: 0 28px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--maroon);
  color: var(--maroon);
  font-family: var(--sans); font-weight: 900; font-size: 1rem; line-height: 1.134;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--maroon); color: var(--white); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(139, 21, 56, .8); }
.btn:active { transform: translateY(0); }
.btn--navy { border-color: var(--navy); color: var(--navy); }
.btn--navy:hover, .btn--navy:focus-visible { background: var(--navy); color: var(--white); box-shadow: 0 10px 24px -12px rgba(19, 40, 84, .8); }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Animated flag line (Qatari flag colours) ---------- */
.flag-line {
  display: block;
  height: clamp(10px, 1.11vw, 16px);
  background-image: linear-gradient(90deg, var(--maroon) 0%, #fff 33.333%, var(--maroon) 66.666%, #fff 100%);
  background-size: 300% 100%;
  background-position: 50% 0;           /* resting state: white on the left, maroon on the right */
  transform-origin: left center;
}
.flag-line--thin {
  width: min(623px, 72%);
  height: 3px;
  margin-inline: auto;
  border-radius: 3px;
  background-image: linear-gradient(90deg, var(--maroon) 0%, rgba(139, 21, 56, .12) 33.333%, var(--maroon) 66.666%, rgba(139, 21, 56, .12) 100%);
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  transform-origin: center;
}
.flag-line--footer { height: 12px; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  color: #fff;
  pointer-events: none;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .82) 28%, rgba(0, 0, 0, .42) 62%, rgba(0, 0, 0, 0) 100%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.nav.is-scrolled::before, .nav--solid::before { opacity: 1; }
.nav__inner {
  width: min(876px, 100% - var(--gutter) * 2);
  height: 100%;
  margin-inline: auto;
  padding: 24px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: auto;
}
.nav__logo { display: block; width: clamp(60px, 5.28vw, 76px); flex: none; }
.mlogo { width: 100%; height: auto; fill: currentColor; overflow: visible; }
.mlogo__blade { opacity: 0; }

.nav__list { display: flex; align-items: center; gap: clamp(28px, 4.17vw, 60px); margin: 0; padding: 0; list-style: none; }
.nav__link {
  position: relative; display: block; padding: 4px 0 12px;
  font-weight: 300; font-size: 1rem; line-height: 22px; white-space: nowrap;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--maroon);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { font-weight: 700; }

.nav__toggle { display: none; width: 44px; height: 44px; position: relative; pointer-events: auto; }
.nav__toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; transition: transform .4s var(--ease), opacity .3s; }
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 21px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__inner { width: calc(100% - var(--gutter) * 2); }
  .nav__toggle { display: block; z-index: 2; }
  .nav__logo { position: relative; z-index: 2; }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    display: grid; place-items: center;
    background: var(--navy);
    opacity: 0; visibility: hidden;
    transition: opacity .45s var(--ease), visibility 0s linear .45s;
    pointer-events: auto;
  }
  .nav__menu::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, #fff, var(--maroon)); }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 26px; }
  .nav__link { font-family: var(--serif); font-weight: 900; font-size: 2rem; line-height: 1.1; padding-bottom: 14px;
    opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .nav__link.is-active { font-weight: 900; }
  .nav.is-open .nav__link { opacity: 1; transform: none; }
  .nav.is-open li:nth-child(1) .nav__link { transition-delay: .08s; }
  .nav.is-open li:nth-child(2) .nav__link { transition-delay: .14s; }
  .nav.is-open li:nth-child(3) .nav__link { transition-delay: .20s; }
  .nav.is-open li:nth-child(4) .nav__link { transition-delay: .26s; }
}

/* ==========================================================================
   Hero — background video, dark overlay, text on top
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  height: 100vh; height: 100svh; min-height: 560px;
  display: flex; align-items: center;
  padding: var(--nav-h) var(--inset) clamp(48px, 8vh, 110px);
  color: #fff; background: #050308; overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; will-change: transform; }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 1.2s ease; }
.hero__video.is-ready { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, .7); }

.hero__content { display: flex; flex-direction: column; align-items: flex-start; gap: 34px; max-width: 836px; }
.hero__title { font-family: var(--serif); font-weight: 900; font-size: var(--h1); line-height: .935; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero__title .line > span { display: block; }
.hero__sub { font-weight: 500; font-size: clamp(1.0625rem, .95rem + .45vw, 1.25rem); line-height: 1.2; }
.hero__sub span { display: block; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; width: 1px; height: 54px; margin-left: -.5px;
  background: rgba(255, 255, 255, .25); overflow: hidden;
}
.hero__scroll::after { content: ""; position: absolute; inset: 0; background: #fff; animation: scrollhint 2.2s var(--ease) infinite; }
@keyframes scrollhint { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ==========================================================================
   Intro — "10+ events delivered in Qatar" and the flag bar
   ========================================================================== */
.intro { padding-top: clamp(64px, 8.4vw, 120px); text-align: center; }
.intro__text { max-width: 760px; margin: clamp(30px, 4.2vw, 60px) auto 0; font-size: clamp(1.25rem, 1.05rem + .75vw, 1.75rem); line-height: 1.5;}
.intro .flag-line { margin-top: clamp(48px, 5.2vw, 75px); }

/* ==========================================================================
   Built for Qatar — carousel
   ========================================================================== */
.built { --wA: min(1003px, 69.65vw); padding-top: clamp(84px, 13.5vw, 200px); }
.built__head { width: var(--wA); max-width: calc(100% - var(--gutter) * 2); margin-inline: auto; padding-left: 4px; }
.built__head em { font-style: normal; color: var(--maroon); }
.built__head .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.built__head .line > span { display: block; }

.carousel {
  --hA: calc(var(--wA) / 1.875);
  --wS: calc(var(--wA) * .4726);
  --hS: calc(var(--wS) / 2);
  --gap: 10px;
  position: relative; margin-top: clamp(22px, 2.4vw, 34px);
  -webkit-user-select: none; user-select: none; touch-action: pan-y;
  overflow-x: clip;
}
.carousel__zoom { transform-origin: 50% 100%; will-change: transform; }   /* grows upward when leaving */
.carousel__stage { transform-origin: 50% 0; will-change: transform; }      /* shrinks from the top when arriving */
.carousel__track {
  display: flex; align-items: center; gap: var(--gap);
  height: var(--hA); width: max-content;
  transition: transform .95s var(--ease);
  will-change: transform; cursor: grab;
}
.carousel.is-dragging .carousel__track { transition: none; cursor: grabbing; }
.carousel.is-jumping .carousel__track, .carousel.is-jumping .slide, .carousel.is-jumping .slide__cap, .carousel.is-jumping .slide img { transition: none !important; }
.slide {
  position: relative; flex: none; display: block;
  width: var(--wS); height: var(--hS);
  border-radius: 20px; overflow: hidden; background: #111; color: #fff;
  transition: width .95s var(--ease), height .95s var(--ease);
}
.slide.is-active { width: var(--wA); height: var(--hA); }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform 1.4s var(--ease); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .65) 100%); }
.slide__cap {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 18px 22px;
  font-family: var(--serif); font-weight: 900; font-size: 1rem; line-height: 1.1; white-space: nowrap;
  transition: padding .95s var(--ease), font-size .95s var(--ease);
}
.slide.is-active .slide__cap { padding: clamp(16px, 1.7vw, 24px) clamp(20px, 2.9vw, 42px); font-size: clamp(1rem, .8rem + .75vw, 1.5rem); }
.slide__title { overflow: hidden; text-overflow: ellipsis; }

.carousel__dots { display: flex; justify-content: center; gap: 10px; margin-top: clamp(20px, 2.3vw, 33px); }
.carousel__dot { width: 30px; height: 10px; background: var(--dash); transition: background-color .4s var(--ease), transform .4s var(--ease); }
.carousel__dot:hover { background: #b9bdc9; }
.carousel__dot.is-active { background: var(--navy); }

.built__text { max-width: calc(669px + var(--gutter) * 2); margin: clamp(56px, 7.6vw, 110px) auto 0; padding-inline: var(--gutter); text-align: center; }

@media (max-width: 760px) {
  .built { --wA: 84vw; }
  .carousel { --gap: 8px; }
  .slide, .slide img { border-radius: 14px; }
  .slide__cap { padding: 10px 12px; font-size: .75rem; }
  .carousel__dot { width: 20px; height: 6px; }
  .carousel__dots { gap: 7px; }
}

/* ==========================================================================
   Our Work — bento grid
   ========================================================================== */
.work { padding-top: var(--section); }
.work__grid { position: relative; display: grid; gap: 24px; margin-top: clamp(40px, 6.3vw, 90px); }
.work-row { display: grid; gap: 24px 14px; }
.work-row--a { grid-template-columns: 625fr 309fr 308fr; grid-template-rows: 255fr 178fr; aspect-ratio: 1264 / 457; }
.work-row--b { grid-template-columns: 301fr 463fr 462fr; grid-template-rows: 195fr 167fr; aspect-ratio: 1264 / 386; }
.work-row--c { grid-template-columns: 462fr 788fr; grid-template-rows: 1fr; aspect-ratio: 1264 / 255; }
.work-row--d { grid-template-columns: 388fr 488fr 388fr; grid-template-rows: 1fr; aspect-ratio: 1264 / 300; }
.tile--fifa     { grid-column: 1; grid-row: 1 / 3; }
.tile--summit   { grid-column: 2; grid-row: 1; }
.tile--vodafone { grid-column: 3; grid-row: 1; }
.tile--samila   { grid-column: 2 / 4; grid-row: 2; }
.tile--f1       { grid-column: 1 / 3; grid-row: 1; }
.tile--michelin { grid-column: 3; grid-row: 1 / 3; }
.tile--eaa      { grid-column: 1; grid-row: 2; }
.tile--katara   { grid-column: 2; grid-row: 2; }

.tile { position: relative; display: block; min-width: 0; min-height: 0; border-radius: 20px; overflow: hidden; background: #111; color: #fff; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .78) 100%); opacity: 0; transition: opacity .5s var(--ease); }
.tile__title {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 24px clamp(14px, 2.5vw, 36px);
  font-family: var(--serif); font-weight: 600; font-size: clamp(.9375rem, .7rem + .55vw, 1.25rem); line-height: 1.1; text-align: center;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile:hover .tile__title, .tile:focus-visible .tile__title { opacity: 1; transform: none; }
@media (hover: none) {
  .tile::after { opacity: 1; }
  .tile .tile__title { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .work__grid, .work-row { gap: 10px; }
  .work-row--a, .work-row--b, .work-row--c, .work-row--d { grid-template-columns: 1fr 1fr; grid-template-rows: none; aspect-ratio: auto; }
  .tile { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 1 / 1; border-radius: 14px; }
  .tile--fifa, .tile--samila, .tile--f1, .tile--michelin, .tile--samsung { grid-column: 1 / -1 !important; aspect-ratio: 16 / 10; }
  .tile--samila, .tile--f1 { aspect-ratio: 16 / 7; }
  .tile__title { padding: 14px 12px; }
}

/* ==========================================================================
   Our Partnerships
   ========================================================================== */
.partners { padding-top: var(--section); text-align: center; }
.partners__text { max-width: 760px; margin: clamp(30px, 4.2vw, 60px) auto 0; }
.partners .flag-line { margin-top: clamp(64px, 11.5vw, 166px); }
.partner {
  display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap;
  gap: 14px clamp(20px, 2.9vw, 42px);
  margin-top: clamp(48px, 6.6vw, 96px);
}
.partner__logo { width: clamp(220px, 26vw, 374px); }
.partner__note { font-family: var(--serif); font-weight: 500; font-size: clamp(1.125rem, .9rem + .7vw, 1.5rem); line-height: 1.2; padding-bottom: clamp(8px, 1.5vw, 22px); }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { padding-top: var(--section); }
.stats__row { display: flex; justify-content: center; align-items: flex-start; gap: clamp(12px, 1.9vw, 27px); }
.stat {
  flex: 0 1 300px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 9px 9px 27px; border-radius: 25px;
  color: var(--navy); text-align: center;
  transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease);
}
.stat:hover { background: var(--navy); color: #fff; box-shadow: 0 30px 50px -30px rgba(19, 40, 84, .7); }
.stat__img { width: 100%; aspect-ratio: 282 / 252; border-radius: 19px; overflow: hidden; }
.stat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stat:hover .stat__img img { transform: scale(1.06); }
.stat__num { font-family: var(--numerals); font-variation-settings: "opsz" 12; font-weight: 700; font-size: clamp(1.625rem, 1rem + 2vw, 2.5rem); line-height: 1.2; text-transform: capitalize; }
.stat__label { max-width: 246px; margin-top: -9px; font-size: clamp(.9375rem, .8rem + .5vw, 1.25rem); line-height: 1.2; text-transform: capitalize; }
.stats__cta { display: flex; justify-content: center; margin-top: clamp(36px, 5vw, 72px); }
.stats .flag-line { margin-top: clamp(40px, 4.4vw, 64px); }
@media (max-width: 760px) {
  .stats__row { flex-direction: column; align-items: center; gap: 8px; }
  .stat { flex: none; width: min(340px, 100%); }
}

/* ==========================================================================
   Our Clients — logo marquee
   ========================================================================== */
.clients { padding-top: var(--section); overflow: hidden; }
.marquee { --mgap: clamp(38px, 6vw, 100px); --g: calc(var(--mgap) * (1 + var(--g1, 0) + var(--g2, 0))); margin-top: clamp(40px, 6vw, 86px); overflow: hidden; }
.marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
.js .marquee { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }   /* drag sideways, scroll the page up and down */
.js .marquee.is-dragging { cursor: grabbing; }
.marquee__set img { -webkit-user-drag: none; pointer-events: none; }
.marquee__set { display: flex; align-items: center; flex: none; gap: var(--g); padding-right: var(--g); }
.marquee__set img { height: clamp(52px, 7vw, 100px); object-fit: contain; }
.marquee__set img.is-wide { height: clamp(44px, 6vw, 86px); }
.no-js .marquee__track { animation: marquee 32s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Closing — giant lockup that folds into the wordmark
   ========================================================================== */
.closing {
  --mw: min(100vw, 1440px, 118vh);
  position: relative; height: 100vh; min-height: 360px; margin-top: clamp(56px, 8vw, 120px);
  color: var(--navy); overflow: hidden;
}
.closing svg { fill: currentColor; }
/* The lockup is drawn from separate pieces (M, rules, feet). A hairline outline in the same
   colour makes neighbouring pieces overlap, so no thin white seams show at large sizes. */
.closing__top use, .closing__bottom use, .mlogo__seam { stroke: currentColor; stroke-width: 2.6px; stroke-linejoin: round; }
.closing__top, .closing__bottom { position: absolute; left: 0; right: 0; margin-inline: auto; width: var(--mw); max-width: none; will-change: transform; }
.closing__top svg, .closing__bottom svg { width: 100%; height: 100%; }
.closing__top { top: 0; aspect-ratio: 945 / 400; transform-origin: 50% 0; }
.closing__bottom { bottom: 0; aspect-ratio: 945 / 85; transform-origin: 50% 100%; }
.closing__center {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: clamp(20px, 4.4vh, 56px); padding-inline: var(--gutter); text-align: center;
}
.closing__word { width: min(483px, 62vw, 46vh); height: auto; }
.closing__tag { font-weight: 700; font-size: clamp(1.0625rem, .6rem + 1.75vw, 2rem); line-height: 1.2; text-transform: capitalize; max-width: min(100%, 1060px); }
.reduce-motion .closing { height: auto; min-height: 0; padding: var(--section) 0; }
.reduce-motion .closing__top, .reduce-motion .closing__bottom { display: none; }
.reduce-motion .closing__center { position: static; }

/* ==========================================================================
   Footer / Contact
   ========================================================================== */
.footer { position: relative; z-index: 2; background: var(--navy); color: #fff; }
/* Homepage: the footer rises over the last part of the pinned closing section. */
.footer--overlap { margin-top: -22vh; }
.reduce-motion .footer--overlap { margin-top: 0; }
.footer__main { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: clamp(64px, 10.1vw, 146px) var(--gutter) 60px; }
.contact { display: flex; align-items: center; gap: 38px; width: min(871px, 100%); }
.contact__map { position: relative; flex: 0 1 380px; aspect-ratio: 380 / 350; border-radius: 20px; overflow: hidden; background: #e9eaee; }
.contact__map img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 1.2s var(--ease); }
.contact__map:hover img { transform: scale(1.08); }
.contact__form { flex: 1 1 453px; min-width: 0; display: flex; flex-direction: column; gap: 17px; }
.contact__title { font-family: var(--serif); font-weight: 900; font-size: 2.25rem; line-height: 1.1; margin-bottom: 13px; }
.field {
  width: 100%; height: 40px; padding: 8px 20px;
  background: rgba(255, 254, 254, .58); border: 1px solid transparent; border-radius: 10px;
  font: 400 1rem/1.4 var(--sans); color: #000;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.field::placeholder { color: rgba(0, 0, 0, .6); opacity: 1; }
.field:focus { outline: none; background: rgba(255, 254, 254, .82); border-color: #fff; }
.field.is-invalid { border-color: #ff9db4; background: rgba(255, 228, 234, .7); }
textarea.field { height: 182px; resize: vertical; min-height: 110px; }
.contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact__actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.contact__status { flex: 1; font-size: .9375rem; line-height: 1.3; color: var(--mist); min-height: 1.3em; }
.contact__status.is-ok { color: #c9f2d6; }
.contact__status.is-error { color: #ffc2cf; }

.footer__info { display: flex; align-items: center; justify-content: center; gap: clamp(32px, 6.9vw, 100px); width: min(872px, 100%); padding-block: 16px; }
.footer__logo { flex: 0 1 318px; display: flex; justify-content: center; }
.footer__logo .mlogo { width: 170px; }
.footer__details { flex: 0 1 455px; display: flex; flex-direction: column; gap: 22px; font-family: var(--inter); font-style: normal; font-size: 1rem; line-height: 22px; color: var(--mist); }
.footer__details a { transition: color .3s; }
.footer__details a:hover { color: #fff; }
.footer__bar { padding: 24px var(--gutter) 34px; text-align: center; font-family: var(--inter); font-size: .75rem; line-height: 1.4; color: var(--mist); border-top: 1px solid rgba(180, 185, 201, .16); }

@media (max-width: 760px) {
  .contact { flex-direction: column-reverse; align-items: stretch; gap: 28px; }
  .contact__map { flex: none; width: 100%; aspect-ratio: 16 / 10; }
  .contact__form { flex: none; }
  .footer__info { flex-direction: column; text-align: center; gap: 30px; }
  .footer__logo, .footer__details { flex: none; }
  .contact__actions { flex-direction: column-reverse; align-items: stretch; }
  .contact__actions .btn { width: 100%; }
}

/* ==========================================================================
   Project page (template)
   ========================================================================== */
/* Until main.js fills in the project, keep the heading and gallery hidden.
   The reveal animation is a safety net in case the script never runs. */
.is-loading-project .phero__content, .is-loading-project .pbody { visibility: hidden; animation: project-reveal 0s 4s forwards; }
@keyframes project-reveal { to { visibility: visible; } }
.phero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(440px, 44.4vw, 639px);
  display: flex; align-items: flex-end;
  padding: var(--nav-h) var(--inset) clamp(56px, 10.1vw, 146px);
  color: #fff; background: #0b0b0d;
}
.phero__media { position: absolute; inset: -6% 0; z-index: -2; will-change: transform; }
.phero__media img { width: 100%; height: 100%; object-fit: cover; }
.phero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .7) 69.64%); }
.phero__content { display: flex; flex-direction: column; gap: 22px; }
.phero__title { font-family: var(--serif); font-weight: 900; font-size: var(--h1); line-height: .935; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.phero__title span { display: block; }
.phero__sub { font-size: clamp(1.125rem, .9rem + .7vw, 1.5rem); line-height: 1.2; }

.pbody { padding-top: clamp(72px, 12.5vw, 180px); overflow: hidden; overflow: clip; }   /* pieces travel a long way while animating; keep them from stretching the page */
.pbody__grid { position: relative; display: grid; grid-template-columns: 594fr 348fr; gap: 10px 44px; width: min(986px, 100%); margin-inline: auto; align-items: start; }
.pgallery { display: grid; grid-template-columns: 248fr 332fr; gap: 11px 14px; }
.pshot { position: relative; border-radius: 20px; overflow: hidden; background: #eee; }
.pshot img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.pshot--1 { grid-column: 1 / -1; aspect-ratio: 594 / 527; }
.pshot--2 { aspect-ratio: 248 / 215; }
.pshot--3 { aspect-ratio: 332 / 215; }
.pshot--wide { grid-column: 1 / -1; aspect-ratio: 986 / 261; }
.pmore { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; margin-top: 1px; }
.pshot--more { aspect-ratio: 486 / 423; }
.pshot--more-full { grid-column: 1 / -1; aspect-ratio: 986 / 430; }
.pstats { display: flex; flex-direction: column; gap: clamp(28px, 5.28vw, 76px); padding-top: clamp(8px, 1.25vw, 18px); margin: 0; color: var(--navy); }
.pstat { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.pstat__value { font-family: var(--serif); font-weight: 800; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.2; margin: 0; }
.pstat__label { font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.2; margin: 0; }
.pbody__note { text-align: center; color: var(--navy); margin-top: clamp(32px, 4vw, 56px); }
.is-simple .pbody__grid, .is-simple .pgallery { grid-template-columns: 1fr; }
.is-simple .pshot--1 { aspect-ratio: 16 / 9; }
.pbody .flag-line { margin-top: clamp(72px, 13.6vw, 196px); }

/* Discover More: thumbnails of the other projects. On hover a card turns navy and shows its year. */
.discover { padding: clamp(64px, 9vw, 130px) 0 clamp(72px, 9vw, 130px); overflow: hidden; overflow: clip; }
.discover__grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 50px clamp(14px, 1.9vw, 27px); margin-top: clamp(40px, 5vw, 80px); }   /* row gap leaves room for the hover card and year */
.dcard { position: relative; isolation: isolate; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--navy); text-align: center; transition: color .45s var(--ease); }
/* The navy card and the year sit outside the layout, so they never push the rows apart. */
.dcard::before { content: ""; position: absolute; z-index: -1; inset: -7px -7px -42px; border-radius: 26px; background: var(--navy); opacity: 0; transition: opacity .45s var(--ease); }
.dcard__img { display: block; width: 100%; aspect-ratio: 334 / 185; border-radius: 20px; overflow: hidden; background: #eee; }
.dcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.dcard__title { font-family: var(--serif); font-weight: 600; font-size: clamp(.9375rem, .8rem + .45vw, 1.25rem); line-height: 1.3; padding-inline: 8px; }
.dcard__year { position: absolute; left: 0; right: 0; top: 100%; margin-top: 9px; font-weight: 700; font-size: clamp(1rem, .9rem + .3vw, 1.25rem); line-height: 1; opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.dcard:hover, .dcard:focus-visible { z-index: 2; color: #fff; }
.dcard:hover::before, .dcard:focus-visible::before { opacity: 1; }
.dcard:hover .dcard__year, .dcard:focus-visible .dcard__year { opacity: 1; transform: none; }
.dcard:hover .dcard__img img, .dcard:focus-visible .dcard__img img { transform: scale(1.05); }
.dcard:focus-visible { outline: none; }

.footer--compact .footer__main { padding-top: clamp(64px, 11vw, 158px); padding-bottom: clamp(56px, 7.5vw, 108px); }

@media (max-width: 820px) {
  .pbody__grid { grid-template-columns: 1fr; gap: 12px; }
  .pgallery { gap: 10px; }
  .pstats { order: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 34px 20px; padding: 36px 0 0; }
  .pstat:last-child { grid-column: 1 / -1; }
  .pshot, .pshot img { border-radius: 14px; }
  .pshot--wide { aspect-ratio: 16 / 7; }
  .pmore { gap: 10px; }
  .discover__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .dcard { gap: 8px; }
  .dcard::before { display: none; }
  .dcard:hover, .dcard:focus-visible { color: var(--navy); }
  .dcard__img { border-radius: 14px; }
  .dcard__year { display: none; }
}

/* ==========================================================================
   Motion helpers
   ========================================================================== */
.js [data-reveal] { visibility: hidden; }

/* Scroll-driven in/out (see inOut() in main.js) */
.js [data-inout] { opacity: 0; }
.io, .js [data-inout].io {
  transform: translate3d(calc(var(--x1, 0px) + var(--x2, 0px)), calc(var(--y1, 0px) + var(--y2, 0px)), 0);
  opacity: calc(var(--o1, 1) * var(--o2, 1));
  will-change: transform, opacity;
}
.reduce-motion [data-inout] { opacity: 1; }
.reduce-motion [data-reveal] { visibility: visible !important; }

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