/* ═══════════════════════════════════════════════════════════════════════
   FLAG — flagavia.ru rebuild — light premium v2
   Single stylesheet. Tokens verbatim from .harness/design-spec.md.
   Conventions: BEM-ish block__element--modifier; bands via .band / .band--white /
   .band--dark; never hardcode grays — use tokens.
═══════════════════════════════════════════════════════════════════════ */

/* ── Design tokens (verbatim from design-spec.md) ─────────────────────── */
:root {
  /* Canvas & surfaces */
  --bg:            #f9fafb;  /* gray-50 — page canvas */
  --surface:       #ffffff;  /* cards, alternating bands */
  --surface-inset: #f3f4f6;  /* gray-100 — placeholder panels inside cards */
  --dark:          #202A36;  /* the single dark accent: display word, final band */

  /* Text */
  --ink:           #111827;  /* gray-900 — headings, nav, wordmark */
  --ink-soft:      #374151;  /* gray-700 — nav hover, list text */
  --text-2:        #4b5563;  /* gray-600 — body, subtitles, labels */
  --text-muted:    #6b7280;  /* gray-500 — light display word, captions */
  --text-on-dark:  #f9fafb;  /* body text on --dark band */

  /* Buttons */
  --btn-bg:        #d1d5db;  /* gray-300 */
  --btn-bg-hover:  #9ca3af;  /* gray-400 */
  --btn-text:      #1f2937;  /* gray-800 */

  /* Lines & depth */
  --border:        #e5e7eb;  /* gray-200 hairlines, card rings */
  --icon-muted:    #9ca3af;  /* gray-400 — placeholder glyphs, list icons */
  --shadow-card:   0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-menu:   0 12px 32px rgba(17, 24, 39, 0.12);

  /* Geometry */
  --radius-pill:   9999px;
  --radius-xl:     1rem;      /* cards, mobile menu */
  --radius-2xl:    1.25rem;   /* media panels */
  --container:     80rem;     /* 1280px, max-w-7xl */
  --gutter:        clamp(1.25rem, 4vw, 2rem);
  --section-y:     clamp(5rem, 10vw, 8rem);

  /* Typography */
  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset & base ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-2);
  font: 400 1.125rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

/* ── Skip link (hidden until keyboard focus) ───────────────────────────── */
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 60; /* above .nav (50) */
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-pill);
  font: 500 0.9375rem/1 var(--font);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 200ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

/* ── Visually hidden utility (accessible name only, no layout footprint) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inline Lucide SVG icons: stroke inherits currentColor, sized via modifier */
.icon        { flex: none; }
.icon--18    { width: 18px; height: 18px; }
.icon--24    { width: 24px; height: 24px; }
.icon--32    { width: 32px; height: 32px; }

/* ── Layout primitives ────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: 42rem;
}

.prose--center {
  margin-inline: auto;
  text-align: center;
}

/* Full-bleed page bands. Default (bare .band) = gray-50 canvas showing through. */
.band {
  padding-block: var(--section-y);
}

.band--white {
  background: var(--surface);
}

.band--dark {
  background: var(--dark);
  color: var(--text-on-dark);
}

.band--dark a:focus-visible,
.band--dark button:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible {
  outline-color: rgba(249, 250, 251, 0.7);
}

/* ── Type scale ───────────────────────────────────────────────────────── */
.display {
  font-size: clamp(3.75rem, 9vw, 6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 400;
}

.display-stat {
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--dark);
}

h2, .h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--dark);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink);
}

.eyebrow {
  font-size: 0.875rem;
  line-height: 1.3;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-2);
}

.caption {
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-muted);
}

/* Two-tone headline fragment (echoes the hero's gray-500 word) */
.tone-muted {
  color: var(--text-muted);
}

/* ── Pill button — one component, three skins ─────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 2rem;
  border: 0;
  border-radius: var(--radius-pill);
  font: 500 0.9375rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 150ms ease;
}

.pill:active {
  transform: scale(0.98);
}

.pill:focus-visible {
  outline: 2px solid #6b7280;
  outline-offset: 2px;
}

.pill--solid {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.pill--solid:hover {
  background: var(--btn-bg-hover);
}

.pill--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px #9ca3af;
  color: var(--btn-text);
}

.pill--outline:hover {
  background: rgba(255, 255, 255, 0.6);
}

.pill--light {
  background: #f9fafb;
  color: var(--btn-text);
}

.pill--light:hover {
  background: #d1d5db;
}

/* ── Card (ringed, hover lift) — certificates & fleet ─────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}

/* ── Placeholder media panel (swap contract target) ───────────────────── */
.media-panel {
  display: grid;
  place-items: center;
  background: var(--surface-inset);
  color: var(--icon-muted);
}

/* Placeholder swap contract target: fills the panel once the <img> is
   uncommented (sibling <svg> glyph removed), matching the panel's own
   aspect-ratio and radius — see .cert-panel / .fleet-panel / .simulator-panel. */
.media-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ── Quiet inset panel (§6: gray-50 on white, no chrome) ──────────────── */
.panel-quiet {
  background: var(--bg);
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 4vw, 3rem);
}

/* ── Hairline list row (equipment, состав) ────────────────────────────── */
.row-hairline {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.row-hairline:last-child {
  border-bottom: 1px solid var(--border);
}

.row-hairline .icon {
  color: var(--icon-muted);
  margin-top: 0.2em; /* optical align with 1.5 line-height text */
}

/* ── Scroll reveals (JS adds .is-visible; hidden state only under html.js) ── */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 300ms ease,
    border-color 300ms ease,
    backdrop-filter 300ms ease;
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 300ms ease;
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav--scrolled .nav__inner {
  padding-block: 1rem;
}

.nav__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font: 600 1.5rem/1 var(--font);
  color: var(--ink);
  text-decoration: none;
}

.nav__logo {
  height: 2.5rem;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font: 500 0.9375rem/1 var(--font);
  color: var(--ink);
  text-decoration: none;
  transition: color 200ms ease;
}

.nav__link:hover {
  color: var(--ink-soft);
}

/* Hamburger (hidden ≥768px) */
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--ink);
}

.nav__icon-x {
  display: none;
}

.nav__toggle[aria-expanded="true"] .nav__icon-menu {
  display: none;
}

.nav__toggle[aria-expanded="true"] .nav__icon-x {
  display: block;
}

/* Mobile dropdown panel */
.nav__menu {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-menu);
  padding: 0.5rem 0 1rem;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition:
    opacity 200ms ease-out,
    transform 200ms ease-out,
    visibility 0s linear 200ms;
}

.nav__menu.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.nav__menu-link {
  display: block;
  padding: 0.75rem 1.25rem;
  font: 500 0.9375rem/1.4 var(--font);
  color: var(--ink);
  text-decoration: none;
}

.nav__menu-link + .nav__menu-link {
  border-top: 1px solid var(--border);
}

.nav__menu-cta {
  display: flex;
  margin: 0.75rem 1.25rem 0.25rem;
}

@media (min-width: 768px) {
  .nav__menu {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: inline-flex;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

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

.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 1 — uniform light veil: keeps gray text ≥ AA over the brightest/darkest frames */
.hero__scrim--veil {
  background: rgba(255, 255, 255, 0.4);
}

/* 2 — bottom dissolve into the gray-50 canvas, no hard seam */
.hero__scrim--dissolve {
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0) 55%,
    rgba(249, 250, 251, 0.85) 88%,
    #f9fafb 100%
  );
}

/* 3 — top insurance gradient for nav legibility */
.hero__scrim--nav {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0) 160px
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: translateY(8vh); /* user amendments 2026-07-14/15: sit lower, clear of the jet in the footage */
}

/* GSAP SplitText intro: hide until JS either animates or falls back to static.
   Gated on html.js so no-JS users always see the text. */
html.js .hero__content {
  opacity: 0;
}

html.js .hero__content.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html.js .hero__content {
    opacity: 1; /* belt-and-braces: static text even if JS never runs the fallback */
  }
}

.hero__heading {
  margin-top: 0.75rem; /* user amendment 2026-07-15: label sits tighter to the heading */
  font-size: clamp(3.75rem, 9vw, 6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800; /* user amendment 2026-07-14: much bolder display */
}

.hero__line {
  display: block;
}

.hero__line--muted {
  color: var(--text-muted);
}

/* USER AMENDMENT: clear positive gap between «Премиум» and «Сервис» — no overlap */
.hero__line--dark {
  color: var(--dark);
  margin-top: 0.75rem;
}

.hero__subtitle {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-2);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Reveal transform must not fight the flex layout: hero children animate
   individually; .hero__content keeps its own translateY(-4vh). */

/* ── Section 7 — Финальный CTA + Контакты (dark band) ─────────────────── */
.contacts {
  text-align: center;
  padding-bottom: 5rem; /* footer hairline provides the closing rhythm */
}

.contacts__headline {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--text-on-dark);
}

.contacts__line {
  display: block;
}

.contacts__text {
  max-width: 42rem;
  margin: 2rem auto 0;
  color: rgba(249, 250, 251, 0.75);
}

.contacts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
}

.contacts__link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font: 500 1.25rem/1 var(--font);
  color: #ffffff;
  text-decoration: none;
  transition: color 200ms ease;
}

.contacts__link:hover {
  color: rgba(249, 250, 251, 0.7);
}

.contacts__link .icon {
  color: rgba(249, 250, 251, 0.6);
}

.contacts__cta {
  margin-top: 2.5rem;
}

/* ── Footer (continues the dark band, real contentinfo landmark) ──────── */
.footer {
  background: var(--dark);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(249, 250, 251, 0.15);
  padding-block: 2rem 2.5rem;
}

.footer__wordmark {
  font: 600 1.125rem/1 var(--font);
  color: #ffffff;
  text-decoration: none;
}

.footer__caption {
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(249, 250, 251, 0.55);
}

/* ── Section 1 — Качество (#quality) ───────────────────────────────────── */
.quality__heading {
  margin-top: 2.5rem;
}

.quality__body {
  margin-top: 1.5rem;
}

.quality__cta {
  margin-top: 2.5rem;
}

/* Two-tone fragment gets its own line (echoes .simulator__heading span idiom) */
.quality__heading .tone-muted {
  display: block;
}

/* ── Section 2 — Сертификаты (#certificates) ───────────────────────────── */
.cert-grid {
  margin-top: 2.5rem;
  display: grid;
  /* auto-fit down to 220px, but never wider than 4 columns — a 5th card
     wraps to a new row with zero CSS changes (acceptance criterion). */
  grid-template-columns: repeat(auto-fit, minmax(max(220px, calc((100% - 3 * 1.5rem) / 4)), 1fr));
  gap: 1.5rem;
}

/* Between ~768–1015px the auto-fit formula produces a 3+1 orphan row;
   force an even 2+2 wrap in that band. <768px stays 1 col and ≥1016px
   reverts to the auto-fit 4-col formula above — both unchanged. */
@media (min-width: 768px) and (max-width: 1015.98px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-grid > .reveal {
  height: 100%;
}

.cert-grid .card {
  height: 100%;
}

.cert-panel {
  margin: 8px;
  aspect-ratio: 210 / 297;
  border-radius: calc(var(--radius-xl) - 4px);
}

.cert-card__caption {
  padding: 0.75rem 1rem;
}

/* ── Section 3 — Типы судов (#fleet) ────────────────────────────────────── */
.fleet-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .fleet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fleet-grid > .reveal {
  height: 100%;
}

.fleet-grid .card {
  height: 100%;
}

.fleet-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fleet-panel {
  flex: none;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.fleet-card__name {
  padding: 1rem 1.25rem 1.25rem;
}

/* ── Section 4 — Техническая база (#base) ──────────────────────────────── */
.base-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .base-grid {
    grid-template-columns: 5fr 7fr;
    gap: 3rem;
    align-items: start;
  }

  .base__aside {
    position: sticky;
    top: 7rem;
  }
}

.base__text {
  margin-top: 1.5rem;
}

.base__caption {
  margin-top: 1rem;
}

/* ── Section 5 — Тренажерный комплекс (#simulator) ─────────────────────── */
.simulator__heading span {
  display: block;
}

.simulator__lead {
  margin-top: 1.5rem;
}

.simulator-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .simulator-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.simulator-panel {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-2xl);
  box-shadow: inset 0 0 0 1px var(--border);
}

.simulator__rows {
  margin-top: 1.5rem;
}

.simulator__closing {
  margin-top: 3rem;
}

/* ── Section 6 — 24/7 + Меньше затрат (no id) ──────────────────────────── */
.two-up-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .two-up-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.two-up__caption {
  margin-top: 0.75rem;
}

.two-up__text {
  margin-top: 1rem;
}

/* ── Reduced motion: content visible, no reveals, no lifts, poster only ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card,
  .card:hover {
    transform: none;
    box-shadow: inset 0 0 0 1px var(--border);
    transition: none;
  }

  .pill,
  .pill:active {
    transform: none;
    transition: none;
  }

  .nav,
  .nav__inner,
  .nav__link,
  .nav__menu,
  .contacts__link {
    transition: none;
  }

  .hero__video {
    display: none;
  }

  .hero {
    background: var(--bg) url("../assets/hero-poster.jpg") center / cover no-repeat;
  }
}

/* ── Specular button (React Bits SpecularButton look, vanilla WebGL2 port) ──
   Dark glass pill-rect, white label, WebGL specular rim drawn on a canvas that
   bleeds 20px past the button (js/specular-button.js). Without WebGL the
   button simply keeps this static style. */
.btn-specular {
  --sb-radius: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #f5f5f5;
  background: rgba(32, 42, 54, 0.9);
  border-radius: var(--sb-radius);
  padding: 14px 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(17, 24, 39, 0.25);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.btn-specular:hover {
  background: rgba(32, 42, 54, 1);
}

.btn-specular:active {
  transform: scale(0.97);
}

.btn-specular:focus-visible {
  outline: 2px solid rgba(32, 42, 54, 0.6);
  outline-offset: 3px;
}

/* On the dark #202A36 band the same glass reads via a lighter tint */
.btn-specular--on-dark {
  background: rgba(249, 250, 251, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-specular--on-dark:hover {
  background: rgba(249, 250, 251, 0.2);
}

.btn-specular--on-dark:focus-visible {
  outline-color: rgba(249, 250, 251, 0.7);
}

/* Canvas extends past the button so the rim glow can bleed outside the edge */
.btn-specular__fx {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  z-index: 1;
}

.btn-specular__fx canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.btn-specular__label {
  position: relative;
  z-index: 2;
}

/* ── Carousel (Untitled UI CarouselMd look, vanilla) ───────────────────────
   Round white arrow triggers over the slides, framed dot indicator at the
   bottom (active dot black), sliding track with drag + optional autoplay
   (js/carousel.js). --portrait variant for the A4 certificate scans. */
.carousel {
  position: relative;
}

.carousel--portrait {
  max-width: 26rem;
  margin-inline: auto;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: 0.75rem;
}

.carousel__track {
  display: flex;
  gap: 8px;
  touch-action: pan-y;
}

.carousel__track.is-animating {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel__item {
  flex: 0 0 100%;
  aspect-ratio: 3 / 2;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface-inset);
  cursor: grab;
}

.carousel__item--portrait {
  aspect-ratio: 210 / 297;
}

.carousel__item:active {
  cursor: grabbing;
}

.carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.15);
  cursor: pointer;
  /* Hidden until the cursor is over the carousel (or keyboard focus is inside) */
  opacity: 0;
  visibility: hidden;
  transition: background-color 150ms ease, opacity 150ms ease, visibility 150ms ease;
}

.carousel:hover .carousel__arrow,
.carousel:focus-within .carousel__arrow {
  opacity: 1;
  visibility: visible;
}

/* No hover on touch devices — keep the arrows always available there */
@media (hover: none) {
  .carousel__arrow {
    opacity: 1;
    visibility: visible;
  }
}

.carousel__arrow:hover {
  background: #ffffff;
}

.carousel__arrow:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.carousel__arrow svg {
  width: 20px;
  height: 20px;
}

.carousel__arrow--prev {
  left: 1rem;
}

.carousel__arrow--next {
  right: 1rem;
}

.carousel__indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 9999px;
  padding: 6px 10px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.15);
}

.carousel__dots {
  display: flex;
  gap: 8px;
}

.carousel__dot {
  height: 8px;
  width: 8px;
  border: none;
  padding: 0;
  appearance: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: background-color 150ms ease, transform 150ms ease;
}

.carousel__dot:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* Active indicator dot — black per user request */
.carousel__dot.is-active {
  background: #000000;
  transform: scale(1.2);
}

/* ── Zoomable image (in-place zoom over blurred overlay) ──────────────── */
img.lightbox-trigger {
  cursor: zoom-in;
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease-out, visibility 200ms ease-out;
  cursor: zoom-out;
}

.zoom-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.zoom-clone {
  position: fixed;
  z-index: 91;
  margin: 0;
  object-fit: cover;
  transform-origin: left top;
  transition: transform 200ms ease-out, border-radius 200ms ease-out;
  cursor: zoom-out;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

/* The carousel's framed dot indicator, kept on screen while zoomed */
.zoom-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 92;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease-out, visibility 200ms ease-out;
}

.zoom-indicator.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
