/* ==========================================================================
   Baltic Industrial Composites — site styles
   Plain CSS, no framework. Mobile-first.
   ========================================================================== */

:root {
  --green: #119562;
  --green-700: #0c7a50;
  --green-50: #e9f6f0;
  --ink: #0e1a1f;
  --ink-2: #24333a;
  --steel: #5b5d5f;
  --muted: #5f6b70;
  --line: #dde3e1;
  --bg: #ffffff;
  --bg-alt: #f3f5f4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 31, .06), 0 8px 24px rgba(14, 26, 31, .06);
  --max: 1200px;
  --header-h: 72px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px;
  font: 600 1rem/1.2 var(--font); text-decoration: none;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--ink); color: #c9d3d6; font-size: .875rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #8fe0bd; }
.topbar-group { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-group span, .topbar-group a { display: inline-flex; align-items: center; gap: 7px; }
.topbar svg { width: 15px; height: 15px; opacity: .8; }
@media (max-width: 860px) { .topbar { display: none; } }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { height: 46px; width: auto; }
@media (min-width: 980px) { .brand img { height: 56px; } }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

.main-nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 8px 20px 24px; box-shadow: var(--shadow);
  display: none;
}
.nav-open .main-nav { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li a {
  display: block; padding: 14px 4px; color: var(--ink); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.main-nav li a[aria-current="page"] { color: var(--green-700); }
.main-nav .btn { margin-top: 18px; width: 100%; }

@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: flex !important; align-items: center; gap: 28px; padding: 0; border: 0; box-shadow: none; background: none; }
  .main-nav ul { display: flex; gap: 4px; }
  .main-nav li a { border: 0; padding: 8px 12px; border-radius: 8px; font-size: .975rem; }
  .main-nav li a:hover { background: var(--bg-alt); color: var(--ink); }
  .main-nav li a[aria-current="page"] { background: var(--green-50); }
  .main-nav .btn { margin: 0; width: auto; min-height: 44px; padding: 10px 20px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  padding: 120px 0 64px;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8,18,22,.88) 0%, rgba(8,18,22,.62) 50%, rgba(8,18,22,.18) 100%),
    linear-gradient(0deg, rgba(8,18,22,.75) 0%, rgba(8,18,22,0) 45%);
}
.hero h1 { color: #fff; max-width: 15em; margin-bottom: .45em; }
.hero .lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: #dfe8ea; max-width: 38em; margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-700); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero .eyebrow, .dark .eyebrow { color: #7fdcb3; }

/* Page hero (inner pages) */
.page-hero { position: relative; isolation: isolate; background: var(--ink); color: #fff; padding: 72px 0 56px; overflow: hidden; }
.page-hero.has-image { padding: 120px 0 56px; }
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8,18,22,.9), rgba(8,18,22,.55) 60%, rgba(8,18,22,.3));
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 18em; }
.page-hero p { color: #dbe5e7; max-width: 42em; font-size: 1.125rem; margin: 0; }
.breadcrumb { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .875rem; color: #aebbbe; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumb a { color: #e3eced; text-decoration: none; }
.breadcrumb a:hover { color: #7fdcb3; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-alt { background: var(--bg-alt); }
.dark { background: var(--ink); color: #c9d3d6; }
.dark h2, .dark h3 { color: #fff; }
.section-head { max-width: 46em; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.125rem; }
.dark .section-head p { color: #b4c1c4; }
.section-head.split { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.section-head.split > div { max-width: 44em; }

/* ---------- Stats ---------- */
.stats { background: var(--green); color: #fff; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.stats li { padding: 28px 12px; text-align: center; border-right: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18); }
.stats li:nth-child(2n) { border-right: 0; }
.stats strong { display: block; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.stats span { font-size: .95rem; opacity: .92; }
@media (min-width: 760px) {
  .stats ul { grid-template-columns: repeat(4, 1fr); }
  .stats li { border-bottom: 0; padding: 36px 12px; }
  .stats li:nth-child(2n) { border-right: 1px solid rgba(255,255,255,.18); }
  .stats li:last-child { border-right: 0; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid { gap: 28px; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: 1rem; }
.card-link { margin-top: auto; font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #c8d1ce; }
.card:hover .card-media img { transform: scale(1.04); }
.card-num { font-size: .8rem; font-weight: 700; color: var(--green-700); letter-spacing: .1em; margin-bottom: 6px; }

.card-cta { background: var(--ink); border-color: var(--ink); color: #c9d3d6; justify-content: flex-end; min-height: 280px; }
.card-cta h3 { color: #fff; }
.card-cta p { color: #b4c1c4; }
.card-cta .card-link { color: #7fdcb3; }

/* ---------- Standards strip ---------- */
.standards { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.standards li {
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-weight: 650; color: var(--ink); font-size: .95rem;
}
.standards li small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
.dark .standards li { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); color: #fff; }
.dark .standards li small { color: #9fb0b4; }

/* ---------- Split / feature ---------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.reverse > :first-child { order: 2; } }
.split-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23119562' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.dark .checklist li::before { background-color: rgba(127,220,179,.14); }
.checklist.cols { columns: 1; display: block; }
.checklist.cols li { break-inside: avoid; margin-bottom: 10px; }
@media (min-width: 700px) { .checklist.cols { columns: 2; column-gap: 40px; } }

/* ---------- Process steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--ink); padding: 30px 26px 34px; counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; font-size: .85rem; font-weight: 700; letter-spacing: .12em; color: #7fdcb3; margin-bottom: 18px; }
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; font-size: .98rem; color: #b4c1c4; }

/* ---------- Info panels ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h3 { display: flex; align-items: center; gap: 12px; }
.icon-badge { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; }
.icon-badge svg { width: 22px; height: 22px; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel .muted { color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1040px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item {
  display: block; padding: 0; border: 0; background: var(--bg-alt); cursor: zoom-in;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-count { color: var(--muted); font-size: .95rem; margin: 0; }
.gallery-empty { padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0;
  border: 0; background: rgba(6, 12, 14, .96); color: #fff;
}
.lightbox::backdrop { background: rgba(6, 12, 14, .9); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 12px 24px; width: 100%; height: 100%; justify-content: center; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lightbox figcaption { font-size: .9rem; color: #b4c1c4; text-align: center; }
.lb-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------- Video ---------- */
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed iframe, .video-embed button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed button { padding: 0; cursor: pointer; background: #000; }
.video-embed button img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s; }
.video-embed button:hover img { opacity: .95; }
.video-embed .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.video-embed .play svg { width: 34px; height: 34px; margin-left: 4px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--green-700), var(--green)); color: #eafff5; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 56px; }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { margin: 0; max-width: 40em; }
.cta-band .btn { background: #fff; color: var(--green-700); }
.cta-band .btn:hover { background: var(--ink); color: #fff; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list strong { display: block; color: var(--ink); }
.contact-list a { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--bg-alt); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-embed button { width: 100%; height: 100%; border: 0; cursor: pointer; background: var(--bg-alt); color: var(--ink); font: 600 1rem var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; }
.map-embed button small { font-weight: 400; color: var(--muted); max-width: 26em; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1316; color: #aab8bb; font-size: .95rem; }
.footer-grid { display: grid; gap: 36px; padding-block: 64px 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-logo { background: #fff; border-radius: 8px; padding: 10px 14px; display: inline-block; margin-bottom: 18px; }
.footer-logo img { height: 40px; width: auto; }
.site-footer h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #d6e0e2; text-decoration: none; }
.site-footer a:hover { color: #7fdcb3; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .875rem; }

/* ---------- Misc ---------- */
.prose { max-width: 46em; }
.prose p { font-size: 1.1rem; }
.lead-text { font-size: 1.2rem; color: var(--ink-2); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.other-products { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.other-products a { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.other-products a:hover { border-color: var(--green); color: var(--green-700); }
.not-found { min-height: 60vh; display: flex; align-items: center; }

/* Inline icon sizing */
.card-link svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.card:hover .card-link svg { transform: translateX(3px); }
.map-embed button svg { width: 32px; height: 32px; color: var(--green); }

/* ==========================================================================
   Carousel (product pages, home)
   ========================================================================== */
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0;
  scrollbar-width: none; cursor: grab;
  margin-right: calc(50% - 50vw); padding-right: 20px;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.dragging { scroll-snap-type: none; cursor: grabbing; }
.carousel-track.dragging .carousel-slide { pointer-events: none; }
.carousel-slide {
  flex: none; scroll-snap-align: start; position: relative;
  height: clamp(230px, 36vw, 440px); min-width: calc(clamp(230px, 36vw, 440px) * .7);
  padding: 0; border: 0; border-radius: 12px; overflow: hidden;
  background: var(--line); cursor: zoom-in;
}
.carousel-slide img { height: 100%; width: auto; max-width: none; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s; user-select: none; -webkit-user-drag: none; }
.carousel-slide:hover img { transform: scale(1.04); }
.carousel-slide::after {
  content: attr(data-index); position: absolute; left: 12px; bottom: 10px;
  font: 700 .75rem/1 var(--font); letter-spacing: .08em; color: #fff;
  background: rgba(8,18,22,.55); padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.carousel-slide:hover::after, .carousel-slide:focus-visible::after { opacity: 1; transform: none; }
.carousel-bar { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.carousel-progress { flex: 1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.carousel-progress span { display: block; height: 100%; width: 0; background: var(--green); border-radius: 3px; transition: width .15s linear; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.carousel-btn:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-btn svg { width: 20px; height: 20px; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ==========================================================================
   Gallery page: filters + masonry
   ========================================================================== */
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.filter-bar .container { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 14px; }
.filter-bar .container::-webkit-scrollbar { display: none; }
.filter-btn {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font: 600 .95rem/1 var(--font); color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.filter-btn small { font-weight: 600; font-size: .78rem; color: var(--muted); background: var(--bg-alt); padding: 3px 7px; border-radius: 999px; }
.filter-btn:hover { border-color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-btn[aria-pressed="true"] small { background: rgba(255,255,255,.16); color: #fff; }

.masonry { columns: 2 160px; column-gap: 10px; }
@media (min-width: 700px) { .masonry { columns: 3; column-gap: 14px; } }
@media (min-width: 1100px) { .masonry { columns: 4; column-gap: 16px; } }
.masonry-item {
  break-inside: avoid; margin: 0 0 10px; position: relative; display: block; width: 100%;
  padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--line); cursor: zoom-in;
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
@media (min-width: 700px) { .masonry-item { margin-bottom: 14px; } }
@media (min-width: 1100px) { .masonry-item { margin-bottom: 16px; } }
.masonry-item.is-visible { opacity: 1; transform: none; }
.masonry-item[hidden] { display: none; }
.masonry-item img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .5s; }
.masonry-item:hover img { transform: scale(1.06); filter: saturate(1.1); }
.masonry-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; text-align: left;
  background: linear-gradient(0deg, rgba(8,18,22,.82), rgba(8,18,22,0));
  color: #fff; font-size: .85rem; line-height: 1.35;
  opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s;
}
.masonry-item figcaption b { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #8fe0bd; margin-bottom: 3px; }
.masonry-item:hover figcaption, .masonry-item:focus-visible figcaption { opacity: 1; transform: none; }
.gallery-summary { color: var(--muted); margin: 0 0 24px; }

::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .masonry-item { opacity: 1; transform: none; }
}

/* Lightbox caption */
.lightbox figcaption b { color: #fff; font-weight: 600; display: block; margin-bottom: 2px; }
