/* ==========================================================================
   Karim "Karza" Benkara / Drifting
   One idea runs through the page: a line held at an angle.
   Slanted cuts (--cut), thin pink lines and condensed display type carry it.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback keeps layout stable while the webfont loads */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial Narrow"), local("Helvetica Neue Condensed Bold"), local("Arial");
  size-adjust: 96%;
}

:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --fg: #ffffff;
  --muted: #a7a7a7;
  --faint: #6f6f6f;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);
  --pink: #ff2a8a;
  --pink-deep: #d91c70;
  --error: #ff6b8f;

  --font: "Archivo", "Archivo Fallback", system-ui, sans-serif;
  --display-stretch: 62%;

  --gutter: clamp(1rem, 4.2vw, 4rem);
  --max: 1560px;
  --section-y: clamp(5rem, 11vw, 10rem);
  --cut: clamp(1.75rem, 6vw, 6.5rem); /* the slant used on image masks */
  --header-h: 80px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* z-index scale */
  --z-base: 1;
  --z-header: 50;
  --z-menu: 80;
  --z-skip: 100;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg, picture { display: block; max-width: 100%; }
figure picture { height: 100%; }
img, video { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

::selection { background: var(--pink); color: #050505; }

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

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

.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  z-index: var(--z-skip);
  padding: 0.75rem 1rem;
  background: var(--pink);
  color: #050505;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Type primitives ---------- */
.display,
.section-title,
.hero__title {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.01em;
}

.section-title {
  font-size: clamp(2.75rem, 7vw, 6rem);
}

.accent { color: var(--pink); font-weight: 600; }

/* A pink parallelogram: the recurring "drift line" marker */
.slash {
  display: inline-block;
  width: 1.6em;
  height: 3px;
  background: var(--pink);
  transform: skewX(-30deg);
  vertical-align: middle;
}

.line { display: block; overflow: hidden; padding: 0.12em 0 0.04em; margin-top: -0.12em; }
.line__inner { display: block; }

/* Letter-by-letter heading reveal (built by script.js). Each word is its own mask. */
.word {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  padding: 0.14em 0.02em 0.04em;
  margin: -0.14em -0.02em -0.04em;
  vertical-align: top;
}
.char { display: inline-block; }

.placeholder-copy { color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-stretch: 80%;
  font-weight: 750;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  /* one clipped corner: a small nod to race-plate cut corners */
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.15s var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn__arrow { width: 18px; height: 18px; flex: none; transition: transform 0.3s var(--ease-out); }

.btn--primary { --btn-bg: var(--pink); --btn-fg: #050505; }
.btn--ghost { --btn-bg: rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--small { min-height: 44px; padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.btn--large { min-height: 60px; padding: 1rem 1.9rem; font-size: 1.05rem; }

@media (hover: hover) {
  .btn--primary:hover { --btn-bg: var(--fg); }
  .btn--ghost:hover { --btn-bg: var(--fg); --btn-fg: #050505; }
  .btn:hover .btn__arrow { transform: translateX(4px); }
  .hero__actions .btn--primary:hover .btn__arrow { transform: translateY(3px); }
}
.btn:focus-visible { outline-offset: 4px; clip-path: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(var(--pink), var(--pink)) left calc(100% - 8px) / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease-out), color 0.2s;
}
.text-link__arrow { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) {
  .text-link:hover { background-size: 100% 2px; }
  .text-link:hover .text-link__arrow { transform: translate(2px, -2px); }
  .text-link:hover .text-link__arrow--up { transform: translateY(-3px); }
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
}
.wordmark__slash {
  width: 22px;
  height: 18px;
  background: var(--pink);
  clip-path: polygon(45% 0, 100% 0, 55% 100%, 0 100%);
}
.wordmark__text {
  font-stretch: 62%;
  font-weight: 900;
  font-size: 2.1rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  transition: background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.site-header::before {
  /* soft top scrim so the header reads over bright video frames */
  content: "";
  position: absolute;
  inset: 0 0 -40px 0;
  background: linear-gradient(rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 0));
  pointer-events: none;
  transition: opacity 0.35s;
}
.site-header.is-solid {
  background: rgba(5, 5, 5, 0.94);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid::before { opacity: 0; }
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-solid { background: rgba(5, 5, 5, 0.82); backdrop-filter: blur(14px); }
}

.site-header__inner {
  position: relative;
  height: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav { display: none; align-items: center; }
/* The three pages sit in a framed tab bar so they read as navigation, even over the video. */
.nav__list {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(5, 5, 5, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 clamp(0.9rem, 1.6vw, 1.35rem);
  font-stretch: 80%;
  font-weight: 750;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
@media (hover: hover) {
  .nav__link:hover { background: rgba(255, 255, 255, 0.14); }
}
.nav__link[aria-current] {
  background: var(--pink);
  color: #050505;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.nav__link:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; clip-path: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.9rem 0 1.1rem;
  background: var(--pink);
  color: #050505;
  font-stretch: 80%;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.menu-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; clip-path: none; }
.menu-toggle__icon { display: grid; gap: 5px; width: 22px; }
.menu-toggle__icon span { height: 2px; background: currentColor; }
.menu-toggle__icon span:last-child { width: 62%; justify-self: end; }

@media (min-width: 768px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Mobile menu ---------- */
body.menu-open { overflow: hidden; }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 0 var(--gutter) max(2rem, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu::before {
  /* one pink diagonal across the lower part of the panel */
  content: "";
  position: absolute;
  right: -10%;
  bottom: 18%;
  width: 70%;
  height: 2px;
  background: var(--pink);
  transform: rotate(-24deg);
  pointer-events: none;
}
.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  flex: none;
}
.menu-close {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 0.25rem;
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-menu nav { margin-block: auto; padding-block: 2rem; }
/* Rows with a chevron and hairline dividers, so every item reads as a tappable link. */
.mobile-menu__list { display: grid; border-top: 1px solid var(--line-strong); }
.mobile-menu__list li { border-bottom: 1px solid var(--line-strong); }
.mobile-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  min-height: 72px;
  padding-block: 0.9rem;
  font-stretch: 62%;
  font-weight: 850;
  font-size: clamp(1.9rem, 8.4vw, 3.25rem);
  line-height: 1;
  text-transform: uppercase;
}
.mobile-menu__list a span { display: inline-block; transition: color 0.2s, transform 0.3s var(--ease-out); }
.mobile-menu__chevron {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--fg);
  transition: color 0.2s, transform 0.3s var(--ease-out);
}
.mobile-menu__list a:hover span,
.mobile-menu__list a:focus-visible span { color: var(--pink); transform: translateX(0.15em); }
.mobile-menu__list a:hover .mobile-menu__chevron,
.mobile-menu__list a:focus-visible .mobile-menu__chevron { color: var(--pink); transform: translateX(4px); }
.mobile-menu__list a:active span { color: var(--pink); }
.mobile-menu__list a[aria-current] span,
.mobile-menu__list a[aria-current] .mobile-menu__chevron { color: var(--pink); }



/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg) url("assets/images/hero-poster.webp") center / cover no-repeat;
}
.hero__media, .hero__shade { position: absolute; inset: 0; z-index: -1; }
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero__shade {
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.55) 34%, rgba(5, 5, 5, 0) 62%),
    linear-gradient(to right, rgba(5, 5, 5, 0.6) 0%, rgba(5, 5, 5, 0) 55%),
    rgba(5, 5, 5, 0.12);
}

.hero__content {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: calc(var(--header-h) + 2rem) var(--gutter) clamp(2.5rem, 7svh, 5rem);
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(0.75rem, 2svh, 1.5rem);
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero__title {
  font-size: clamp(2.6rem, min(18vw, 12.5svh), 9.75rem);
  line-height: 0.84;
}
.hero__nick { color: var(--pink); font-size: 0.68em; }
.hero__rule {
  display: block;
  width: min(42vw, 22rem);
  height: 3px;
  margin-block: clamp(1.1rem, 3svh, 1.75rem);
  background: var(--pink);
  transform-origin: left;
}
.hero__sub {
  max-width: 44ch;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.25rem, 3.5svh, 2.25rem);
}

/* Intro starting state. Only applied when JS + motion are available.
   If GSAP never runs, the CSS fallback animation reveals everything after 2.5s. */
.motion-ok [data-hero-line] { transform: translateY(105%); animation: reveal-fallback 0.01s 2.5s forwards; }
.motion-ok [data-hero-item] { opacity: 0; animation: reveal-fallback 0.01s 2.5s forwards; }
.motion-ok [data-hero-rule] { transform: scaleX(0); animation: reveal-fallback 0.01s 2.5s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.motion-ok.gsap-ready [data-hero-line],
.motion-ok.gsap-ready [data-hero-rule] { animation: none; }
/* GSAP owns these once it runs and clears its inline styles afterwards, so the end state lives here. */
.motion-ok.gsap-ready [data-hero-item] { animation: none; opacity: 1; }

@media (max-width: 767px) {
  .hero { align-items: end; }
  .hero__video { object-position: 38% 50%; }
  .hero__shade {
    background:
      linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.6) 42%, rgba(5, 5, 5, 0.05) 70%),
      rgba(5, 5, 5, 0.1);
  }
  .hero__actions .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Kuka on Karza?
   ========================================================================== */
.about {
  padding: var(--section-y) var(--gutter);
}
.about__inner {
  max-width: var(--max);
  margin-inline: auto;
}
.about .section-title {
  font-size: clamp(3rem, 9vw, 8rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.about__lead {
  max-width: 34ch;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.28;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.about__lead em { font-style: normal; color: var(--pink); }
.about__body {
  max-width: 62ch;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  color: rgba(255, 255, 255, 0.82);
}
.about__body p + p { margin-top: 1rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 62rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.facts dd {
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.1;
  text-transform: uppercase;
  hyphens: manual;
}
/* Photo after the facts: portrait, straight edges so the photographer's credit stays whole. */
.about-photo {
  position: relative;
  max-width: 520px;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  aspect-ratio: 2 / 3;
  background: var(--surface);
}
.about-photo picture { overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Desktop: the photo stands beside the text (title, lead, body, facts); on phones it follows below. */
@media (min-width: 900px) {
  .about__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .about__inner > * { grid-column: 1; }
  .about__inner > .about-photo {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
    justify-self: end;
    width: 100%;
    margin-top: 0;
  }
  .about .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1680px) {
  .about .facts { grid-template-columns: repeat(4, auto); }
}

@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(4, auto); justify-content: start; column-gap: clamp(2rem, 4vw, 4rem); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) var(--gutter) 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer__top {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.footer__title {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.86;
  text-transform: uppercase;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.contact-list { display: grid; }
.contact-list > div { padding-block: 1rem; border-top: 1px solid var(--line); }
.contact-list dt {
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.contact-list dd a {
  display: inline-block;
  padding-block: 0.25rem;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}
.contact-list dd a:hover { color: var(--pink); }
.footer__name {
  font-stretch: 66%;
  font-weight: 850;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1;
  text-transform: uppercase;
}
.footer__meta { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.footer__nav { margin-top: 1.5rem; }
.footer__nav ul { display: grid; gap: 0.1rem; }
.footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--pink); }
@media (min-width: 768px) {
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 3rem); }
}
@media (min-width: 1024px) {
  .footer__top { grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); align-items: end; }
}
.footer__bottom {
  max-width: var(--max);
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ==========================================================================
   Pantterin tragedia
   Past (intact car) -> setback (damaged car) -> direction (route to 2027).
   ========================================================================== */
.t-intro {
  position: relative;
  display: grid;
}
.t-intro__text {
  align-self: end;
  padding: clamp(1.5rem, 5vw, 3rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
}
.t-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.t-title {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.01em;
  font-size: clamp(3.4rem, 16.5vw, 9rem);
}
.t-title__accent { color: var(--pink); }
.t-lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 22ch;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.25;
  font-weight: 500;
}

.t-photo { position: relative; background: var(--surface); }
.t-photo img { width: 100%; height: 100%; object-fit: cover; }
.t-photo--intro {
  aspect-ratio: 4 / 5;
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
}
.t-photo--intro img { object-position: 50% 68%; }

@media (min-width: 900px) {
  .t-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
  .t-intro__text { padding-right: clamp(1rem, 3vw, 3rem); padding-left: max(var(--gutter), (100vw - var(--max)) / 2); }
  .t-title { font-size: clamp(3.4rem, 9.2vw, 9rem); }
  .t-photo--intro {
    aspect-ratio: auto;
    min-height: 100%;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%);
  }
  .t-photo--intro::after {
    /* soft fade where the photo meets the header */
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 160px;
    background: linear-gradient(rgba(5, 5, 5, 0.55), rgba(5, 5, 5, 0));
    pointer-events: none;
  }
}

/* ---------- Story ---------- */
.t-story {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding: var(--section-y) var(--gutter);
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
}
.t-photo--story {
  aspect-ratio: 4 / 5;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.t-photo--story img { object-position: 60% 40%; }
.t-photo__line {
  position: absolute;
  left: 0; top: 0;
  width: 3px;
  height: 45%;
  background: var(--pink);
  transform-origin: top;
}
.t-heading {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.01em;
  font-size: clamp(2.75rem, 6.4vw, 6rem);
}
.t-story__body {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 30ch;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}
.t-story__body strong { color: var(--pink); font-weight: 600; }

@media (min-width: 900px) {
  .t-story {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    column-gap: clamp(3rem, 7vw, 7rem);
  }
  .t-photo--story {
    /* bleed to the viewport edge */
    margin-left: calc(-1 * max(var(--gutter), (100vw - var(--max)) / 2));
  }
}
@media (max-width: 899px) {
  .t-photo--story { width: 88%; margin-left: calc(var(--gutter) * -1); }
}

/* ---------- Future ---------- */
.t-future {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: var(--section-y) var(--gutter);
  border-top: 1px solid var(--line);
}
.t-heading--xl { font-size: clamp(3rem, 10vw, 9.5rem); max-width: 12ch; }

.t-route { position: relative; margin-top: clamp(3rem, 6vw, 5rem); }
.t-route__track {
  position: absolute;
  left: 7px; top: 0.5rem; bottom: 0.5rem;
  width: 1px;
  background: var(--line-strong);
}
.t-route__progress {
  position: absolute;
  inset: 0;
  left: -1px;
  width: 3px;
  background: var(--pink);
  transform-origin: bottom;
}
.t-route__list { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); padding-left: 2.5rem; }
.t-route__item { position: relative; }
.t-route__item::before {
  /* marker: past = hollow grey, now = filled pink, next = hollow white */
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 0.15rem;
  width: 15px;
  height: 15px;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--fg);
  transform: skewX(-18deg);
}
.t-route__item[data-state="past"]::before { box-shadow: inset 0 0 0 2px var(--faint); }
.t-route__item[data-state="now"]::before { background: var(--pink); box-shadow: none; }
.t-route__when {
  font-stretch: 80%;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.t-route__item[data-state="now"] .t-route__when { color: var(--pink); }
.t-route__what {
  margin-top: 0.35rem;
  font-stretch: 66%;
  font-weight: 850;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
}
.t-route__item[data-state="past"] .t-route__what { color: var(--muted); }

@media (min-width: 900px) {
  .t-route__track { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 1px; }
  .t-route__progress { top: -1px; left: 0; width: auto; height: 3px; transform-origin: left; }
  /* Desktop reads in time order left to right (2026 -> now -> 2027); phones keep the goal on top. */
  .t-route__item[data-state="past"] { order: 1; }
  .t-route__item[data-state="now"] { order: 2; }
  .t-route__item[data-state="next"] { order: 3; }
  .t-route__list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2.75rem 0 0; column-gap: 2rem; }
  .t-route__item::before { left: 0; top: -2.75rem; }
}

.t-future__close {
  display: grid;
  justify-items: start;
  gap: 2rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
}
.t-future__statement {
  max-width: 24ch;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  line-height: 1.2;
  font-weight: 500;
}
.t-future__statement em { font-style: normal; color: var(--pink); }
/* International: the Lithuania photo with its caption, between the statement and the CTA. */
.t-future__close { grid-template-columns: minmax(0, 1fr); }
.t-abroad { justify-self: stretch; min-width: 0; max-width: 760px; }
.t-abroad picture {
  display: block;
  height: auto;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) * 0.6), 0 100%);
}
.t-abroad img { width: 100%; height: 100%; object-fit: cover; }
.t-abroad picture.t-abroad__second { aspect-ratio: 1200 / 1130; margin-top: 0.75rem; }
.t-abroad__caption {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--pink);
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* Entry start state (only with JS + motion). If GSAP never runs, the fallback reveals after 2.5s. */
.motion-ok:not(.gsap-ready) [data-intro-item],
.motion-ok:not(.gsap-ready) .t-intro [data-split],
.motion-ok:not(.gsap-ready) .t-intro [data-pop] { opacity: 0; animation: reveal-fallback 0.01s 2.5s forwards; }

/* ==========================================================================
   Yhteistyöt
   Full-bleed drift photo -> the offer -> overlapping garage/trophy pair + why -> inquiry.
   ========================================================================== */
.c-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}
.c-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  background: var(--surface);
}
.c-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
.c-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.55) 38%, rgba(5, 5, 5, 0) 68%),
    linear-gradient(to right, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0) 55%);
}
.c-hero__content {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: calc(var(--header-h) + 2rem) var(--gutter) clamp(4rem, 12svh, 8rem);
}
.c-title {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.01em;
  /* "Yhteistyökumppanit" is ~8.4em wide: size it to always fit one line inside the gutters. */
  font-size: clamp(2rem, calc((100vw - 2 * var(--gutter)) / 8.7), 11rem);
}
/* Partner logos straight under the title; the question follows below them. */
.c-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(1.25rem, 3.2vw, 2.75rem);
  /* Halved: the zero-height break item puts a row-gap on both sides of it. */
  row-gap: clamp(0.5rem, 1.2vw, 0.875rem);
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
/* Forces the next logo onto a new line, so the tiers stay as rows instead of reflowing. */
.c-logos__break { flex-basis: 100%; height: 0; margin: 0; }
.c-logos img { display: block; width: auto; height: calc(var(--logo-h) * var(--fit, 1)); --logo-h: clamp(26px, 3.3vw, 38px); }
/* Main sponsors sit in the middle row at a size nothing else comes close to;
   the four supporting logos share one small tier above and below them. */
.c-logos img.is-t1 { --logo-h: clamp(52px, 10vw, 124px); }
.c-logos img.is-t2 { --logo-h: clamp(42px, 7.9vw, 98px); }
.c-logos img.is-t3 { --logo-h: clamp(20px, 2.6vw, 30px); }
/* Shape corrections on top of the tier: height alone is not visual weight. */
.c-logos img.is-wide { --fit: 0.82; }  /* very wide wordmark: lower so it matches its tier in weight */
.c-logos img.is-tall { --fit: 1.5; }  /* near-square stacked logo: needs the extra height to read */
.c-logos img.is-stacked { --fit: 1.2; }  /* multi-line logo: a little extra height, not enough to dominate */
.c-logos img.is-invert { filter: brightness(0) invert(1); }  /* dark logo: flip to white so it reads on the photo */
.c-logos__placeholder {
  display: grid;
  place-items: center;
  height: clamp(28px, 4vw, 44px);
  padding-inline: 1rem;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 0.8rem;
}
.c-lead {
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 24ch;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.25;
  font-weight: 500;
}
.c-hero__actions { margin-top: clamp(1.5rem, 3.5vw, 2.5rem); }
@media (min-width: 900px) {
  .c-hero__media img { object-position: 50% 55%; }
}

/* ---------- Offer ---------- */
.c-offer {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: var(--section-y) var(--gutter);
}
.c-statement {
  max-width: 21ch;
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.01em;
  font-size: clamp(1.9rem, 8.2vw, 6.5rem);
}
@media (min-width: 900px) { .c-statement { font-size: clamp(2.5rem, 6.2vw, 6.5rem); } }
.c-offer__list {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.c-offer__item { position: relative; padding-top: 1.5rem; }
.c-offer__rule {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--line-strong);
}
.c-offer__rule::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 4.5rem;
  height: 3px;
  background: var(--pink);
}
.c-offer__title {
  font-stretch: 66%;
  font-weight: 850;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.c-offer__item p { margin-top: 0.75rem; font-size: 1.15rem; color: rgba(255, 255, 255, 0.82); }
@media (min-width: 768px) {
  .c-offer__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 5rem); max-width: 68rem; }
}

/* ---------- Photos: inside the offer section ----------
   Mobile: one after another, full width. Tablet: side by side. Desktop: side by side next to the text. */
.c-visual {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 768px) {
  .c-visual { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 1.5vw, 1.25rem); align-items: start; }
}
@media (min-width: 1024px) {
  /* text left, photos right */
  .c-offer {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    column-gap: clamp(3rem, 5vw, 6rem);
    align-items: start;
  }
  .c-statement { grid-column: 1; font-size: clamp(2.25rem, 3.9vw, 4.25rem); }
  .c-offer__list { grid-column: 1; grid-template-columns: 1fr; max-width: none; }
  .c-visual { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-top: 0; }
  .c-photo--small { margin-top: clamp(2rem, 5vw, 4.5rem); }
}

.c-photo { position: relative; aspect-ratio: 3 / 4; }
.c-photo picture { overflow: hidden; background: var(--surface); }
.c-photo img { width: 100%; height: 100%; object-fit: cover; }
.c-photo--main img { object-position: 45% 50%; }
.c-photo--small img { object-position: 35% 50%; }

.c-heading {
  font-stretch: var(--display-stretch);
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.01em;
  font-size: clamp(2.5rem, 5.6vw, 5.25rem);
}

/* ---------- Contact / inquiry ---------- */
.c-contact {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: var(--section-y) var(--gutter);
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
}
.c-contact__text { margin-top: 1.5rem; max-width: 30ch; font-size: clamp(1.15rem, 1.6vw, 1.35rem); color: rgba(255, 255, 255, 0.88); }
.c-contact__direct { margin-top: clamp(2rem, 4vw, 3rem); display: grid; }
.c-contact__direct > div { padding-block: 0.9rem; border-top: 1px solid var(--line); }
.c-contact__direct dt {
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.c-contact__direct dd a {
  display: inline-block;
  padding-block: 0.3rem;
  font-stretch: 75%;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}
.c-contact__direct dd a:hover { color: var(--pink); }
@media (min-width: 1024px) {
  .c-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------- Form (shared) ---------- */
.form { display: grid; gap: 1.5rem; }
.form__row { display: grid; gap: 1.5rem; }
.form__label {
  display: block;
  margin-bottom: 0.5rem;
  font-stretch: 80%;
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.form__reasons { border: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
@media (hover: hover) { .chip:hover span { box-shadow: inset 0 0 0 1px var(--fg); } }
.chip input:checked + span { background: var(--fg); color: #050505; box-shadow: none; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 3px; }
.input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid #2c2c2c;
  border-radius: 0;
  font-size: 1rem;
  color: var(--fg);
  transition: border-color 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.input:hover { border-color: #4a4a4a; }
.input:focus { outline: none; border-color: var(--pink); background: #151515; box-shadow: 0 0 0 1px var(--pink); }
.input--area { min-height: 9rem; resize: vertical; line-height: 1.5; }
.input[aria-invalid="true"] { border-color: var(--error); }
.field__error { margin-top: 0.4rem; font-size: 0.9rem; color: var(--error); }
.field__error:empty { display: none; }
.field__error::before { content: "! "; font-weight: 800; }
.form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__status { color: var(--error); font-weight: 500; }
.form__status:empty { display: none; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.form-success {
  display: grid;
  gap: 1rem;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 2px solid var(--pink);
}
.form-success:focus { outline: none; }
.slash--large { width: 3.5rem; height: 4px; }
.form-success__title {
  font-stretch: 66%;
  font-weight: 850;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.form-success p { color: rgba(255, 255, 255, 0.85); }
@media (min-width: 640px) {
  .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Entry start state for this page (see the tragedia block above for the pattern) */
.motion-ok:not(.gsap-ready) .c-hero [data-split],
.motion-ok:not(.gsap-ready) .c-hero [data-pop] { opacity: 0; animation: reveal-fallback 0.01s 2.5s forwards; }

/* ==========================================================================
   Page transitions (cross-document View Transitions; ignored where unsupported)
   ========================================================================== */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 0.22s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Footer without the contact block (Etusivu, Yhteistyöt): name left, links right */
.footer--compact { padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer--compact .footer__top { display: block; }
.footer--compact .footer__side { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
  .footer--compact .footer__side { display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; }
}
.footer--compact .footer__nav { margin-top: 0; }
@media (min-width: 768px) {
  .footer--compact .footer__nav ul { display: flex; gap: 2rem; }
}
.footer--compact .footer__bottom { margin-top: clamp(2rem, 4vw, 3rem); }

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


/* ==========================================================================
   Chapters: the site is one scrolling page with three "pages".
   A chapter band opens pages 2 and 3; the header bar shows which page is on screen.
   ========================================================================== */
.chapter-mark {
  /* The break between two pages: generous space above and below one pink line. */
  padding: clamp(4.5rem, 12vw, 9rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}
.chapter-mark__line {
  display: block;
  max-width: var(--max);
  height: 3px;
  margin-inline: auto;
  background: var(--pink);
  transform-origin: left;
}

.chapter-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  height: 3px;
  pointer-events: none;
}
.chapter-progress span {
  background: rgba(255, 255, 255, 0.16);
  transition: background-color 0.3s var(--ease-out);
}
.chapter-progress span.is-on { background: var(--pink); }

/* iOS shows a big play button when it blocks autoplay; the poster stays instead and the
   video starts on the first touch (script.js). */
.hero__video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.hero__video::-webkit-media-controls { display: none !important; }


/* ==========================================================================
   Galleria: portrait bookends, two stacked landscapes, then a wide track row.
   The mosaic proportions follow the source photos; lightbox keeps originals.
   ========================================================================== */
.gallery {
  padding: var(--section-y) var(--gutter);
  border-top: 1px solid var(--line);
}
.gallery__inner { max-width: var(--max); margin-inline: auto; }
.gallery__layout {
  --gallery-gap: clamp(0.5rem, 1.5vw, 1rem);
  display: grid;
  gap: var(--gallery-gap);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.gallery__grid { display: grid; gap: var(--gallery-gap); }
.gallery__grid--feature {
  grid-template-columns: 0.5904fr 0.75fr;
  grid-template-areas: "podium korjaamo" "pantteri pantteri" "yoajo yoajo";
  align-items: start;
}
.gallery__item { min-width: 0; min-height: 0; }
.gallery__item--podium { grid-area: podium; }
.gallery__item--korjaamo { grid-area: korjaamo; }
.gallery__item--pantteri { grid-area: pantteri; }
.gallery__item--yoajo { grid-area: yoajo; }
.gallery__grid--track { grid-template-columns: 1.5fr 1.501877347fr; }
.gallery__link {
  display: block;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.gallery__link picture { display: block; }
.gallery__link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  transition: transform 0.3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .gallery__link:hover img { transform: scale(1.025); }
}
.gallery__link:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
@media (min-width: 900px) {
  .gallery__grid--feature {
    grid-template-columns: 0.5904fr 0.7752fr 0.75fr;
    grid-template-rows: minmax(0, 0.75fr) minmax(0, 0.54fr);
    grid-template-areas: "podium pantteri korjaamo" "podium yoajo korjaamo";
    aspect-ratio: 2.1;
    align-items: stretch;
  }
  .gallery__grid--feature .gallery__link,
  .gallery__grid--feature picture { height: 100%; }
  .gallery__grid--feature img {
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 5, 5, 0.96);
  color: var(--fg);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 5, 5, 0.9); }
.lightbox__img {
  max-width: min(92vw, 1400px);
  max-height: 84dvh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  transition: background-color 0.2s;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: var(--pink); color: #050505; }
.lightbox__close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__count {
  position: absolute;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
@media (max-width: 767px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: max(0.75rem, env(safe-area-inset-bottom)); translate: none; }
}
