/* =========================================================
   Janik Seelandt Bauelemente — Stylesheet
   Self-hosted fonts only (DSGVO: keine externen Ressourcen)
   ========================================================= */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Roboto-Variable.woff2") format("woff2-variations"),
       url("../fonts/Roboto-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/RobotoSlab-Variable.woff2") format("woff2-variations"),
       url("../fonts/RobotoSlab-Variable.woff2") format("woff2");
}

:root {
  --c-ink: #0d1b2a;
  --c-ink-soft: #2a3a4d;
  --c-muted: #5b6c80;
  --c-line: #e6e2db;
  --c-bg: #f7f4ee;
  --c-bg-alt: #ffffff;
  --c-bg-dark: #0f2942;
  --c-bg-dark-2: #0a1d33;
  --c-accent: #c87f3c;
  --c-accent-soft: #e6a86b;
  --c-accent-ink: #7a4a1f;
  --c-success: #1f7a4a;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .04), 0 1px 4px rgba(13, 27, 42, .04);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, .06), 0 2px 6px rgba(13, 27, 42, .04);
  --shadow-lg: 0 24px 60px rgba(13, 27, 42, .14);

  --maxw: 1180px;
  --pad: clamp(20px, 4vw, 40px);
  --gap: clamp(20px, 3vw, 32px);

  --t-fast: 180ms cubic-bezier(.4,.0,.2,1);
  --t: 280ms cubic-bezier(.4,.0,.2,1);

  --font-sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --font-serif: "Roboto Slab", "Iowan Old Style", "Palatino Linotype", Georgia, "Book Antiqua", serif;
}

@media (prefers-color-scheme: dark) {
  /* Site is brand-light by design; we keep light look in dark OS too. */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tabular numerals for figures */
.hero-trust strong, .footer-meta { font-variant-numeric: tabular-nums; }

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

a {
  color: var(--c-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-accent-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .4em;
  color: var(--c-ink);
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -.02em;
}
h3 {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
}
p  { margin: 0 0 1em; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-ink); color: #fff; padding: 10px 14px;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, .85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.site-header.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--c-bg-dark);
  color: var(--c-accent);
  font-family: var(--font-serif);
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: -.01em;
  font-size: .98rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.01em;
}
.brand-text em {
  font-style: normal; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--c-muted);
  font-weight: 500;
}

/* Nav */
.nav-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 6px; align-items: center;
}
.nav-list a {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: .96rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-list a:hover { background: rgba(13,27,42,.06); }
.nav-list .cta-link {
  background: var(--c-ink);
  color: #fff;
}
.nav-list .cta-link:hover {
  background: var(--c-accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--c-line);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: ""; display: block;
  width: 20px; height: 2px;
  background: var(--c-ink);
  margin: 0 auto;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before { position: absolute; top: -7px; left: 0; }
.nav-toggle .bars::after  { position: absolute; top:  7px; left: 0; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-list {
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--c-bg-alt);
    flex-direction: column;
    align-items: stretch;
    padding: 14px var(--pad) 22px;
    gap: 4px;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform var(--t), opacity var(--t), visibility var(--t);
  }
  .nav-list.is-open {
    transform: translateY(0);
    opacity: 1; visibility: visible;
  }
  .nav-list a { padding: 14px 12px; border-radius: 10px; }
  .nav-list .cta-link {
    text-align: left; margin-top: 0;
    background: transparent; color: inherit; font-weight: 500;
  }
  .nav-list .cta-link:hover { background: rgba(13,27,42,.06); color: inherit; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: -.005em;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t-fast),
              color var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary {
  background: var(--c-ink);
  color: #fff;
  box-shadow: 0 10px 26px rgba(13, 27, 42, .25);
}
.btn-primary:hover {
  background: var(--c-accent);
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 14px 32px rgba(200, 127, 60, .4);
}
.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: rgba(13, 27, 42, .2);
}
.btn-ghost:hover {
  background: var(--c-ink);
  color: #fff;
  border-color: var(--c-ink);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .3);
}
.btn-whatsapp:hover {
  background: #1da851;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(37, 211, 102, .45);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 10vw, 130px);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(200,127,60,.18), transparent 60%),
    radial-gradient(70% 70% at 10% 90%, rgba(15,41,66,.08), transparent 60%),
    linear-gradient(180deg, #faf7f1 0%, #f0ebe1 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 46%;
  background-image: url("../img/products/hero.jpg");
  background-size: cover;
  background-position: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  opacity: .55;
}
@media (max-width: 900px) {
  .hero-bg::after { display: none; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-accent-ink);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow-light { color: var(--c-accent-soft); }
.hero .eyebrow::before { content: none; }
@media (max-width: 430px) {
  .eyebrow { display: flex; flex-wrap: wrap; }
  .eyebrow .eyebrow-sep { display: none; }
  .eyebrow .eyebrow-loc { flex-basis: 100%; }
}

.hero-inner { position: relative; }
@media (min-width: 901px) {
  .hero-inner > *:not(.hero-trust) { max-width: 60%; }
}
.hero h1 {
  max-width: 18ch;
  margin-bottom: .35em;
}
.hero h1 .accent {
  color: var(--c-accent);
  white-space: nowrap;
}

.hero .lead {
  max-width: 56ch;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--c-ink-soft);
  margin-top: 1.2em;
}

.motto {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--c-ink);
  border-left: 2px solid var(--c-accent);
  padding-left: 18px;
  margin: 24px 0 32px;
}

.hero-cta {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 14px;
  margin-bottom: 36px;
}
.hero-cta .btn {
  width: 100%; max-width: 320px;
  justify-content: center;
}
@media (max-width: 560px) {
  .hero-cta .btn { max-width: 340px; }
}

.hero-trust {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: clamp(20px, 4vw, 48px);
  flex-wrap: wrap;
  padding-top: 24px;
}
.hero-trust li { color: var(--c-muted); font-size: .95rem; }
.hero-trust strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--c-ink);
  line-height: 1;
  margin-bottom: 4px;
}
@media (max-width: 560px) {
  .hero-inner { text-align: center; }
  .hero .eyebrow { justify-content: center; }
  .hero h1,
  .hero .lead { margin-left: auto; margin-right: auto; }
  .motto { border-left: none; padding-left: 0; }
  .hero-cta { align-items: center; }

  .hero-trust {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .hero-trust li {
    padding: 8px 0;
    font-size: .9rem;
    text-align: center;
  }
  .hero-trust strong { font-size: 1.4rem; margin-bottom: 4px; }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 9vw, 120px) 0;
}
.section-light { background: var(--c-bg-alt); }
.section-dark {
  background: linear-gradient(160deg, var(--c-bg-dark) 0%, var(--c-bg-dark-2) 100%);
  color: #f0ebe1;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(240,235,225,.86); }

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(32px, 5vw, 60px);
  text-align: center;
}
.section-sub {
  color: var(--c-muted);
  font-size: 1.05rem;
}
.section-dark .section-sub { color: rgba(240,235,225,.7); }

.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-about {
  grid-template-columns: 1fr 1.4fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
@media (max-width: 760px) {
  .grid-about { grid-template-columns: 1fr; }
}

/* ---------- Cards (services) ---------- */

.card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8d2c5;
}
.card .icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: rgba(200,127,60,.12);
  color: var(--c-accent);
  border-radius: 14px;
  margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; fill: currentColor; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--c-muted); margin-bottom: 0; }

/* ---------- Products ---------- */

.product {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d8d2c5;
  color: inherit;
}
.product:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.product h3 { padding: 18px 22px 0; }
.product p { padding: 0 22px 22px; color: var(--c-muted); margin: 6px 0 0; }

.product-zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(13, 27, 42, .7);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-4px) scale(.92);
  transition: opacity var(--t), transform var(--t);
  pointer-events: none;
  z-index: 2;
}
.product-zoom svg { width: 18px; height: 18px; fill: currentColor; }
.product:hover .product-zoom,
.product:focus-visible .product-zoom {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .product-zoom { opacity: 1; transform: none; }
}

.product-art {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e9e2d1 0%, #d4c8ad 100%);
  position: relative; overflow: hidden;
}
.product-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.4,.0,.2,1);
}
.product:hover .product-art img {
  transform: scale(1.04);
}
.product-art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13,27,42,.18));
  pointer-events: none;
}

/* ---------- About ---------- */

.about-portrait { display: grid; place-items: center; }
.portrait-frame {
  width: min(340px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 6px rgba(200,127,60,.25),
    0 30px 60px rgba(0,0,0,.35);
}
.portrait-frame::after {
  content: "";
  position: absolute; inset: -18px;
  border-radius: 50%;
  border: 1px dashed rgba(200,127,60,.45);
  pointer-events: none;
}
.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-dark blockquote {
  margin: 24px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--c-accent);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.5;
  color: #fff;
  background: rgba(255,255,255,.04);
  border-radius: 0 12px 12px 0;
}
.section-dark blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: .9rem;
  font-style: normal;
  color: var(--c-accent-soft);
}

/* ---------- Contact ---------- */

.section-contact {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(200,127,60,.12), transparent 60%),
    var(--c-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin-bottom: 36px;
}

.contact-card {
  display: block;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-accent-soft);
}
.contact-card .icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--c-ink);
  color: var(--c-accent);
  border-radius: 12px;
  margin-bottom: 16px;
}
.contact-card .icon svg { width: 22px; height: 22px; fill: currentColor; }
.contact-card h3 { margin-bottom: 6px; }
.contact-card p {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--c-ink);
  margin-bottom: 14px;
}
.contact-link {
  font-size: .92rem;
  font-weight: 600;
  color: var(--c-accent-ink);
  letter-spacing: .02em;
}
.contact-link-muted { color: var(--c-muted); font-weight: 500; }
.contact-card-wa .icon { background: #25d366; color: #fff; }
.contact-card-wa:hover { border-color: #25d366; }
.contact-card-wa .contact-link { color: #1da851; }
.contact-card-static { cursor: default; }
.contact-card-static:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--c-line); }

.contact-note {
  text-align: center;
  font-size: .92rem;
  color: var(--c-muted);
  max-width: 60ch;
  margin: 0 auto;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--c-bg-dark);
  color: rgba(240,235,225,.8);
  padding: 48px 0 28px;
  font-size: .92rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand address {
  font-style: normal;
  line-height: 1.6;
}
.footer-brand strong { color: #fff; }
.footer-brand a {
  color: rgba(240,235,225,.85);
  text-decoration: none;
}
.footer-brand a:hover { color: #fff; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  justify-content: flex-end;
}
@media (max-width: 700px) {
  .footer-nav { justify-content: flex-start; }
}
.footer-nav a {
  color: rgba(240,235,225,.8);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.footer-nav a:hover { color: #fff; border-color: var(--c-accent); }
.footer-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 18px;
  margin: 8px 0 0;
  color: rgba(240,235,225,.5);
  font-size: .82rem;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Legal page styles ---------- */
.legal {
  padding: clamp(48px, 7vw, 90px) 0;
  background: var(--c-bg-alt);
}
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .4em; }
.legal h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--c-ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--c-accent-ink); }
.legal .meta {
  display: inline-block;
  margin-bottom: 24px;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 36px;
  font-weight: 600;
  text-decoration: none;
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 4px;
}
.back-link:hover { color: var(--c-accent-ink); border-color: var(--c-accent); }

/* ---------- Focus ring (a11y) ---------- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Lightbox ---------- */
html.lightbox-open { overflow: hidden; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  inset: 0;
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(8, 14, 24, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lb-fade .25s ease-out;
}
@keyframes lb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-figure {
  margin: 0;
  max-width: min(94vw, 1400px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  background: #0a1d33;
  animation: lb-pop .3s cubic-bezier(.2, .8, .2, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
@keyframes lb-pop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.lightbox-caption {
  font-family: var(--font-sans);
  font-size: .95rem;
  color: rgba(255, 255, 255, .85);
  text-align: center;
  max-width: 70ch;
  letter-spacing: .005em;
  margin: 0;
}
.lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-sans);
  font-size: .82rem;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .55);
  font-variant-numeric: tabular-nums;
}

.lightbox button {
  position: absolute;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
  z-index: 1;
}
.lightbox button:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .3);
}
.lightbox button svg { width: 22px; height: 22px; fill: currentColor; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-close:hover { transform: scale(1.06); }
.lightbox-prev  { top: 50%; left: 24px;  transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: 24px; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 600px) {
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox button { width: 40px; height: 40px; }
  .lightbox-figure { max-width: 96vw; }
  .lightbox-img    { max-height: 72vh; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox[open], .lightbox-img { animation: none; }
}
