/* =====================================================================
   SUNLIGHT SPECTRUM  ·  "Sunlight is not one thing."   (about.html)
   ---------------------------------------------------------------------
   An interactive point-of-view section: sunlight = UV + visible + IR.
   Picking a band re-lights the glazing-pane visualisation live.

   Self-contained: this file + /assets/js/sunlight-spectrum.js only. Reuses
   the site's dark palette; every rule is namespaced `.sss`.

   Explicit layer order inside the simulator:
     1 studio background   .sss__stage / ::before
     2 (car photo — removed from this section)
     3 glass tint          .sss__film
     4 light rays          .sss__fx
     5 (product artwork — removed from this section)
     6 temperature card    .sss__temp
     7 selector rail       .sss__rail
     8 spectrum panel      .sss__spectrum

   Adjust in sunlight-spectrum.js:
     CONFIG.windshield  the ONE film / clip polygon (% of the car box)
     CONFIG.ticks       wavelength labels + vertical position
     CONFIG.bands       accent, temperature, film, rays, marker per band
   ===================================================================== */

.sss {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --sss-accent: #b06bff;               /* re-set by JS per active band */
  --sss-accent-soft: rgba(176, 107, 255, .16);
  --sss-film-opacity: .34;
  --sss-heat: .1;
  --sss-ray-in: #e85fff;
  --sss-ray-refl: #a78bfa;
  --sss-spark: #d7b3ff;

  position: relative;
  width: 100%;
  padding: 48px clamp(20px, 5vw, 80px) 44px;
  background:
    radial-gradient(900px 620px at 20% 6%, rgba(120, 60, 200, .16), transparent 60%),
    #050308;
  color: #f4eefb;
  overflow: hidden;
}
@media (min-width: 768px)  { .sss { padding-inline: 32px; } }
@media (min-width: 1120px) { .sss { padding-inline: clamp(72px, 6vw, 80px); } }

.sss__wrap { max-width: 1180px; margin-inline: auto; }

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

/* ------------------------------------------------------------------ *
 *  Heading
 * ------------------------------------------------------------------ */
.sss__head {
  max-width: 760px;
  margin: 0 auto clamp(28px, 4vw, 44px);
  text-align: center;
}
.sss__eyebrow {
  margin: 0 0 18px;
  font: 800 12px/1 Montserrat, Inter, Arial, sans-serif;
  letter-spacing: .22em; text-transform: uppercase; color: #b98bff;
}
.sss__headline {
  margin: 0 0 20px;
  font: 800 clamp(2rem, 3.4vw, 3.4rem)/1.04 Montserrat, Inter, Arial, sans-serif;
  letter-spacing: -.028em; color: #fff;
}
.sss__body {
  margin: 0 auto; max-width: 620px;
  font-size: clamp(.95rem, 1vw, 1.05rem); line-height: 1.75;
  color: #9a91a8;
}

/* ------------------------------------------------------------------ *
 *  Simulator — outer rounded container (the ONLY overflow:hidden)
 * ------------------------------------------------------------------ */
.sss__sim {
  position: relative;
  display: grid;
  grid-template-columns: 72% 28%;
  aspect-ratio: 16 / 7;
  min-height: 400px;
  max-height: 540px;
  border: 1px solid rgba(190, 105, 255, .35);
  border-radius: 28px;
  background: #08040e;
  box-shadow:
    0 44px 130px -34px rgba(140, 70, 255, .40),
    0 0 90px -10px rgba(150, 80, 255, .28),
    0 1px 0 rgba(255, 255, 255, .05) inset;
  overflow: hidden;
  isolation: isolate;
}

/* ================================================================== *
 *  LEFT · visualisation panel
 * ================================================================== */
.sss__viz {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
}

/* layer 1 — near-black studio ground with a low violet wash + a warm
   key pool under the car, mirroring the reference lighting */
.sss__stage {
  position: relative;
  min-height: 0;
  background:
    radial-gradient(60% 46% at 30% 8%, rgba(150, 80, 230, .22), transparent 60%),
    radial-gradient(46% 40% at 44% 92%, rgba(120, 70, 190, .16), transparent 62%),
    radial-gradient(120% 90% at 50% 60%, #140c1e, #0a0612 60%, #07040d);
}
.sss__stage::before {          /* faint hex weave, kept weak */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='104' viewBox='0 0 60 104'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04'%3E%3Cpath d='M30 1l28 16.5v33L30 67 2 50.5v-33z'/%3E%3Cpath d='M30 67l28 16.5V104M30 67L2 83.5V104'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 104px;
  pointer-events: none;
}
/* deep edge vignette — sinks the studio plate's residual grey into the panel */
.sss__stage::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(116% 96% at 42% 48%, transparent 46%, rgba(9, 5, 16, .5) 78%, rgba(9, 5, 16, .92) 100%);
}

/* Fixed-aspect frame. Its ratio == the FX svg viewBox ratio (1600/950),
   so the windshield polygon (in %) tracks the car at any viewport.
   overflow:hidden here only FRAMES the asset (fades the product roll on
   the far right into shadow) — it is not hiding mispositioned UI. */
.sss__carbox {
  position: absolute;
  inset: 0; margin: auto;
  width: calc(100% - 60px);
  max-height: calc(100% - 18px);
  aspect-ratio: 1600 / 950;
  overflow: hidden;
}

/* layer 2 — band scene. One framed photographic plate per wavelength
   (UV / RAINBOW / HEAT). Two stacked <img>; JS crossfades between them
   with a blur + scale settle. Sources live in sunlight-spectrum.js
   (CARD_IMAGES) and change on card selection. */
.sss__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0612;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07) inset,
    0 40px 90px -40px rgba(0, 0, 0, .85);
}
.sss__scene-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  opacity: 0;
  transform: scale(1.07);
  filter: blur(16px) saturate(1.08);
  will-change: opacity, transform, filter;
  transition:
    opacity .8s var(--ease),
    transform 1.15s var(--ease),
    filter .9s var(--ease);
}
.sss__scene-img.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0) saturate(1);
}
/* feather the bright plate into the dark stage + seat the temp card */
.sss__scene::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 4, 12, .28), transparent 26% 62%, rgba(6, 4, 12, .72)),
    radial-gradient(128% 108% at 50% 38%, transparent 52%, rgba(6, 4, 12, .8) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .sss__scene-img {
    transform: none;
    filter: none;
    transition: opacity .28s linear;
  }
  .sss__scene-img.is-active { transform: none; filter: none; }
}

/* rim / key light — soft violet lift on the stage */
.sss__carbox::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 58% at 24% 16%, rgba(198, 170, 255, .20), transparent 46%),
    radial-gradient(56% 44% at 62% 90%, rgba(150, 90, 255, .12), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 3;
}

/* layer 3 — windshield film + edge glow: the glazing pane is not drawn
   in this section. Kept in the DOM for JS handles; rendered off. */
.sss__film,
.sss__windglow { display: none; }

.sss__film {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(150, 90, 255, .5), rgba(90, 50, 200, .26));
  mix-blend-mode: screen;
  opacity: var(--sss-film-opacity);
  filter: blur(1px);
  transition: opacity .38s var(--ease), background .38s var(--ease);
}
.sss__film::after {                      /* activation scan, clipped with parent */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(238, 246, 255, .85) 50%, transparent 58%);
  opacity: 0; transform: translateX(-45%);
}
.sss__stage.is-scanning .sss__film::after {
  animation: sss-scan 820ms var(--ease) both;
}
@keyframes sss-scan {
  0% { opacity: 0; transform: translateX(-48%); }
  15% { opacity: 1; } 85% { opacity: .9; }
  100% { opacity: 0; transform: translateX(52%); }
}

/* windshield edge shimmer — same polygon, written by JS */
.sss__windglow {
  position: absolute; inset: 0;
  z-index: 4;
  pointer-events: none;
  border: 2px solid var(--sss-accent);
  filter: blur(1.4px) drop-shadow(0 0 7px var(--sss-accent));
  opacity: .45;
  transition: border-color .38s var(--ease), opacity .38s var(--ease);
}

/* layer 4 — abstract sun + rays. Not drawn in this section: each band
   scene photo already carries its own sun and ray treatment. */
.sss__fx { display: none; }

.sss__fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.sss__sun { transform-box: fill-box; transform-origin: center; opacity: .95; }

.sss__rayIn path {
  stroke: var(--sss-ray-in);
  stroke-width: 2.4; stroke-linecap: round;
  opacity: .5;
  filter: drop-shadow(0 0 2px var(--sss-ray-in));
  transition: stroke .38s var(--ease), opacity .38s var(--ease);
}
.sss__rayRefl path {
  stroke: var(--sss-ray-refl);
  stroke-width: 2; stroke-linecap: round;
  opacity: 0;
  filter: drop-shadow(0 0 2px var(--sss-ray-refl));
  transition: stroke .38s var(--ease), opacity .38s var(--ease);
}
.sss__stage[data-band="uv"]       .sss__rayRefl path { opacity: .8; }
.sss__stage[data-band="visible"]  .sss__rayRefl path { opacity: .25; }
.sss__stage[data-band="infrared"] .sss__rayRefl path { opacity: .5; }

.sss__spark circle {
  fill: var(--sss-spark);
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
}
.sss__heat {
  fill: none; stroke: rgba(255, 150, 70, .5); stroke-width: 3;
  opacity: calc(var(--sss-heat, 0) * .6);
  transition: opacity .38s var(--ease);
}
/* glazing pane not drawn in this section */
.sss__glass,
.sss__heat { display: none; }

/* layer 6 — floating temperature card */
.sss__temp {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 6;
  width: 220px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(20, 14, 30, .9), rgba(11, 7, 19, .92));
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 52px -22px rgba(0, 0, 0, .75);
  transition: border-color .38s var(--ease);
}
.sss__temp-label {
  margin: 0 0 4px;
  font: 800 9.5px/1 Montserrat, Inter, Arial, sans-serif;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}
.sss__temp-read { display: flex; align-items: baseline; gap: 2px; margin: 0; }
.sss__temp-value { font: 800 40px/1 Montserrat, Inter, Arial, sans-serif; color: #fff; }
.sss__temp-unit  { font: 700 15px/1 Montserrat, Inter, Arial, sans-serif; color: rgba(255, 255, 255, .7); }
.sss__temp-graph { display: block; width: 100%; height: 32px; margin: 8px 0 6px; overflow: visible; }
.sss__temp-graph polyline {
  fill: none; stroke: var(--sss-accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .38s var(--ease);
}
.sss__temp-graph circle { fill: #fff; }
.sss__temp-base {
  display: block;
  font: 700 9px/1 Montserrat, Inter, Arial, sans-serif;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
}
.sss__stage[data-band="infrared"] .sss__temp { border-color: rgba(255, 138, 61, .45); }

/* layer 7 — selector rail */
.sss__rail {
  position: relative;
  z-index: 7;
  padding: 20px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(6, 4, 12, .6) 38%, rgba(6, 4, 12, .82));
}
.sss__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sss__card {
  --card-accent: #b06bff;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 13px; row-gap: 5px;
  align-content: center;
  min-height: 72px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(16, 11, 24, .6);
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  transition: transform .32s var(--ease), border-color .32s var(--ease),
              background .32s var(--ease), box-shadow .32s var(--ease), color .32s var(--ease);
}
.sss__card:hover:not([aria-pressed="true"]) { border-color: rgba(255, 255, 255, .26); background: rgba(24, 17, 32, .72); }
.sss__card:focus-visible { outline: 2px solid var(--card-accent); outline-offset: 3px; }
.sss__card-icon  { grid-row: 1 / 3; grid-column: 1; align-self: center; width: 24px; height: 24px; color: var(--card-accent); }
.sss__card-range { grid-row: 1; grid-column: 2; font: 700 11px/1 Montserrat, Inter, Arial, sans-serif; letter-spacing: .04em; color: rgba(255, 255, 255, .62); }
.sss__card-name  { grid-row: 2; grid-column: 2; font: 800 13px/1 Montserrat, Inter, Arial, sans-serif; letter-spacing: .11em; color: var(--card-accent); }
/* per-card one-line description — shown only on the stacked mobile layout
   (see the max-width: 960px block), hidden in the desktop rail */
.sss__card-desc  { display: none; }
.sss__card-dot   {
  grid-row: 1 / 3; grid-column: 3; align-self: center;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .32);
  transition: border-color .32s var(--ease), box-shadow .32s var(--ease);
}
.sss__card-dot::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: transparent;
  transition: background .32s var(--ease);
}
.sss__card[aria-pressed="true"] {
  color: #fff;
  border-color: var(--card-accent);
  background: rgba(28, 20, 40, .78);
  box-shadow: 0 0 0 1px var(--card-accent), 0 0 30px -8px var(--card-accent);
  transform: translateY(-3px);
}
.sss__card[aria-pressed="true"] .sss__card-name { color: var(--card-accent); }
.sss__card[aria-pressed="true"] .sss__card-dot  { border-color: var(--card-accent); box-shadow: 0 0 10px -1px var(--card-accent); }
.sss__card[aria-pressed="true"] .sss__card-dot::after { background: var(--card-accent); }

/* ================================================================== *
 *  RIGHT · spectrum panel — its own surface, no overlap
 * ================================================================== */
.sss__spectrum {
  position: relative;
  min-width: 0;
  padding: clamp(26px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, #140d1f, #0f0a18);
  border-left: 1px solid rgba(255, 255, 255, .08);
}
.sss__spectrum::before {          /* honeycomb — deliberately faint */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='84' viewBox='0 0 48 84'%3E%3Cg fill='none' stroke='%23b98bff' stroke-opacity='0.09'%3E%3Cpath d='M24 1l22 13v26L24 53 2 40V14z'/%3E%3Cpath d='M24 53l22 13v18M24 53L2 66v18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 48px 84px;
  opacity: .5;
  pointer-events: none;
}
.sss__spectrum-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3vw, 32px);
  height: 100%;
  min-height: 320px;
}

/* wavelength descriptions — one per band, stacked in normal flow now that
   the tick/bar scale column has been removed */
.sss__legend { position: relative; }
.sss__leg {
  padding-left: 14px;
  border-left: 2px solid var(--leg-accent, #fff);
  transition: opacity .32s var(--ease);
}
.sss__leg + .sss__leg { margin-top: clamp(20px, 3vw, 32px); }
.sss__leg.is-dim { opacity: .48; }
.sss__leg-range { font: 700 11px/1 Montserrat, Inter, Arial, sans-serif; letter-spacing: .05em; color: var(--leg-accent, #fff); opacity: .85; }
.sss__leg-name  { margin: 6px 0 6px; font: 800 16px/1.1 Montserrat, Inter, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--leg-accent, #fff); transition: color .32s var(--ease); }
.sss__leg-desc  { display: block; max-width: 26ch; font: 500 12.5px/1.5 Inter, Montserrat, Arial, sans-serif; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .62); }

.sss__note {
  margin: 18px 0 0;
  max-width: 820px;
  font-size: 12px; line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* ------------------------------------------------------------------ *
 *  Continuous motion — only when allowed, only when on-screen
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .sss__sun          { animation: sss-sun 6s ease-in-out infinite; }
  .sss__rayIn path   { animation: sss-ray 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .24s); }
  .sss__rayRefl path { animation: sss-ray 3s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .2s); }
  .sss__spark circle { animation: sss-drift 4.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .5s); }
  .sss__heat         { animation: sss-shimmer 3.6s ease-in-out infinite; }
  .sss__windglow     { animation: sss-edge 4s ease-in-out infinite; }
}
.sss.is-offscreen .sss__sim * { animation-play-state: paused !important; }

@keyframes sss-sun     { 0%,100% { opacity: .88; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes sss-ray     { 0%,100% { opacity: .35; } 50% { opacity: .7; } }
@keyframes sss-drift   { 0%,100% { opacity: 0; transform: translateY(3px); } 45% { opacity: .85; } 60% { opacity: .6; transform: translateY(-7px); } }
@keyframes sss-shimmer { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes sss-edge    { 0%,100% { opacity: .3; } 50% { opacity: .65; } }

@media (prefers-reduced-motion: reduce) {
  .sss__marker, .sss__bracket { transition: top .18s linear, height .18s linear; }
  .sss__rayRefl path { opacity: .45; }
}

/* ------------------------------------------------------------------ *
 *  Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1180px) {          /* tablet — 60/40, spectrum stays beside */
  .sss__sim { grid-template-columns: 60% 40%; aspect-ratio: 16 / 9; min-height: 460px; max-height: none; }
  .sss__carbox { inset: 16px 18px 16px 18px; }
}

@media (max-width: 960px) {           /* stack — sim grows to fit every row */
  .sss__sim {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    height: auto;
  }
  .sss__viz { grid-template-rows: auto auto; }
  .sss__stage { min-height: 420px; }
  .sss__spectrum { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); }
  .sss__spectrum-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: 0;
  }
  /* wavelength scale becomes a horizontal row: labels flow in a flex line
     above the bar so "780 nm" / "Beyond 780 nm" can never overlap */
  .sss__scalecol { height: auto; }
  .sss__ticks {
    position: static; inset: auto;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 8px; margin-bottom: 10px;
  }
  .sss__tick {
    position: static;
    right: auto; left: auto; top: auto !important;
    transform: none;
    flex: 1 1 0; min-width: 0;
    text-align: center; white-space: normal;
    font-size: 10px; line-height: 1.3;
  }
  .sss__tick:first-child { text-align: left; }
  .sss__tick:last-child  { text-align: right; }
  .sss__bar {
    position: relative;
    top: auto; bottom: auto; right: auto; left: auto;
    width: auto; height: 12px;
    background: linear-gradient(to right,
      #7c3aed 0%, #a855f7 12%, #6366f1 24%, #3b82f6 34%,
      #22d3ee 44%, #22c55e 56%, #eab308 68%, #f97316 80%,
      #ef4444 90%, #7f1d1d 100%);
  }
  .sss__marker { top: auto !important; bottom: -5px; left: 22%; }
  .sss__bracket { display: none; }

  /* The selector cards above already list every band's range + name, so a
     stacked legend here only repeats that text on narrow screens. Keep the
     wavelength bar + marker; fold each band's one-line description into its
     own card row instead of a second list. */
  .sss__legend { display: none; }
  .sss__spectrum { padding-block: clamp(18px, 5vw, 26px); }

  .sss__card { grid-template-rows: auto auto auto; row-gap: 4px; }
  .sss__card-desc {
    display: block;
    grid-row: 3;
    grid-column: 2 / -1;
    margin-top: 2px;
    font: 500 12px/1.5 Inter, Montserrat, Arial, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, .6);
  }
}

@media (max-width: 620px) {
  .sss__sim { border-radius: 24px; }
  .sss__stage { min-height: 360px; }
  .sss__carbox { inset: 12px; }
  .sss__cards { grid-template-columns: 1fr; }
  .sss__rail { padding: 16px; }
  .sss__temp { width: 168px; top: 14px; right: 14px; padding: 10px 12px; }
  .sss__temp-value { font-size: 32px; }
}

/* =====================================================================
 * SPECTRUM LIGHTBOX — a card click opens its wavelength reference image
 *   uv       → /assets/images/sections/UV.png
 *   visible  → /assets/images/sections/RAINBOW.png
 *   infrared → /assets/images/sections/HEAT.png
 * Built and controlled from sunlight-spectrum.js.
 * ===================================================================== */
.sss__lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(8, 5, 18, .82);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.sss__lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .28s ease;
}
.sss__lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(.96);
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
}
.sss__lightbox.is-open .sss__lightbox-figure { transform: scale(1); }
.sss__lightbox-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 16px;
  border: 2px solid var(--sss-accent, #b06bff);
  box-shadow: 0 0 0 4px var(--sss-accent-soft, rgba(176, 107, 255, .16)),
              0 30px 80px -20px rgba(0, 0, 0, .7);
  background: #0b0713;
}
.sss__lightbox-cap {
  margin: 0;
  text-align: center;
  font: 600 13px/1.4 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sss-accent, #b06bff);
}
.sss__lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--sss-accent, #b06bff);
  color: #0b0713;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .6);
}
.sss__lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sss__lightbox,
  .sss__lightbox-figure { transition: none; }
}
@media (max-width: 620px) {
  .sss__lightbox-close { top: -8px; right: -8px; }
}
