/*
 * Visual refinement v4: tactile surfaces, safer typography and the interactive
 * two-dimensional lighting atelier requested for the selection chapter.
 */

:root {
  --light-rgb: 255, 198, 116;
  --light-intensity: .72;
  --paper-grey: #eef3ef;
  --pencil: #171717;
}

/* ---------- V5 / photorealistic five-state lighting sequence ---------- */

.lighting-room {
  aspect-ratio: 3 / 2;
  max-width: none;
  overflow: hidden;
  background: #0b0d10;
  box-shadow: inset 0 0 0 1px rgba(17,17,17,.22);
  transform: none;
}

.lighting-room__drawing {
  display: none;
}

.lighting-room__photo-scene {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  background: #0b0d10;
}

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

.lighting-room__installed,
.lighting-room__photo-wash {
  position: absolute;
  pointer-events: none;
  transition: opacity .18s ease-out;
  will-change: opacity;
}

.lighting-room__installed {
  z-index: 6;
  display: block;
  object-fit: contain;
  transform: none;
  transform-origin: center;
}

.lighting-room__installed--pendant {
  top: 15.2%;
  left: 50%;
  width: 19.2%;
  height: auto;
  opacity: var(--install-pendant, 0);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.28));
  transform: translateX(-50%);
}

.lighting-room.has-pendant .lighting-room__installed--pendant {
  opacity: var(--install-pendant, 1);
}

.lighting-room__installed--led {
  top: 32.35%;
  left: 27.5%;
  width: 44.1%;
  height: auto;
  opacity: var(--install-led, 0);
  filter: drop-shadow(0 0 5px rgba(var(--light-rgb), .9));
}

.lighting-room.has-led .lighting-room__installed--led {
  opacity: var(--install-led, 1);
}

.lighting-room__installed--sconce {
  z-index: 7;
  inset: 0;
  opacity: var(--install-sconce, 0);
}

.lighting-room.has-sconce .lighting-room__installed--sconce {
  opacity: var(--install-sconce, 1);
}

.lighting-room__installed--sconce img {
  position: absolute;
  top: 46.2%;
  width: auto;
  height: 8.25%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(var(--light-rgb), .7));
}

.lighting-room__installed--sconce img:first-child {
  left: 31.15%;
}

.lighting-room__installed--sconce img:last-child {
  left: 65.25%;
}

.lighting-room__installed--track {
  top: -.2%;
  left: 16.1%;
  width: 67.8%;
  height: 34%;
  object-fit: fill;
  opacity: var(--install-track, 0);
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.34));
}

.lighting-room.has-track .lighting-room__installed--track {
  opacity: var(--install-track, 1);
}

.lighting-room__photo-wash {
  z-index: 4;
  inset: 0;
  mix-blend-mode: screen;
}

.lighting-room__photo-wash--pendant {
  background: radial-gradient(ellipse at 50% 38%, rgba(var(--light-rgb), calc(var(--light-intensity) * .38)), transparent 36%);
  opacity: var(--install-pendant, 0);
}

.lighting-room.has-pendant .lighting-room__photo-wash--pendant {
  opacity: var(--install-pendant, 1);
}

.lighting-room__photo-wash--led {
  background:
    linear-gradient(180deg, transparent 25%, rgba(var(--light-rgb), calc(var(--light-intensity) * .34)) 34%, transparent 67%),
    linear-gradient(90deg, transparent 23%, rgba(var(--light-rgb), calc(var(--light-intensity) * .18)) 50%, transparent 77%);
  opacity: var(--install-led, 0);
}

.lighting-room.has-led .lighting-room__photo-wash--led {
  opacity: var(--install-led, 1);
}

.lighting-room__photo-wash--sconce {
  background:
    radial-gradient(ellipse at 31.8% 50%, rgba(var(--light-rgb), calc(var(--light-intensity) * .28)), transparent 13%),
    radial-gradient(ellipse at 65.9% 50%, rgba(var(--light-rgb), calc(var(--light-intensity) * .28)), transparent 13%);
  opacity: var(--install-sconce, 0);
}

.lighting-room.has-sconce .lighting-room__photo-wash--sconce {
  opacity: var(--install-sconce, 1);
}

.lighting-room__photo-wash--track {
  background:
    radial-gradient(ellipse at 27% 26%, rgba(var(--light-rgb), calc(var(--light-intensity) * .22)), transparent 34%),
    radial-gradient(ellipse at 73% 26%, rgba(var(--light-rgb), calc(var(--light-intensity) * .22)), transparent 34%),
    linear-gradient(rgba(var(--light-rgb), calc(var(--light-intensity) * .1)), rgba(var(--light-rgb), calc(var(--light-intensity) * .16)));
  opacity: var(--install-track, 0);
}

.lighting-room.has-track .lighting-room__photo-wash--track {
  opacity: var(--install-track, 1);
}

.lighting-room__ambient {
  z-index: 5;
  inset: 0;
}

.fixture-flight-clone {
  position: fixed;
  z-index: 999;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 12px rgba(17,17,17,.22));
  will-change: transform, opacity;
}

@media (min-width: 901px) {
  .selection-story,
  .lighting-story {
    min-height: 420vh;
  }

  .lighting-atelier__room-sheet {
    width: min(76%, 1040px);
  }

  .lighting-atelier__room-sheet:hover {
    transform: translate3d(var(--room-travel-x), -50%, 0) rotate(-.35deg);
  }

  .lighting-atelier__tape,
  .fixture-rack__heading,
  .fixture-rack__note {
    display: none;
  }

  .fixture-rack {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    pointer-events: none;
    transform: none;
  }

  .fixture-swatch,
  .fixture-swatch--pendant,
  .fixture-swatch--led,
  .fixture-swatch--sconce,
  .fixture-swatch--track {
    position: absolute;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    color: inherit;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    transform-origin: center;
    transition: opacity .12s linear, filter .2s ease;
    will-change: transform, opacity;
  }

  .fixture-swatch::before,
  .fixture-swatch.is-active::after,
  .fixture-swatch > span,
  .fixture-swatch > small {
    display: none;
  }

  .fixture-swatch > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 12px rgba(17,17,17,.22));
    transform: none;
    transition: filter .2s ease;
  }

  .fixture-swatch:hover,
  .fixture-swatch:focus-visible {
    box-shadow: none;
  }

  .fixture-swatch:hover > img,
  .fixture-swatch:focus-visible > img,
  .fixture-swatch.is-approaching > img,
  .fixture-swatch.is-handoff > img {
    filter: drop-shadow(0 16px 15px rgba(17,17,17,.3));
    transform: none;
  }

  .fixture-swatch--track > img {
    object-fit: fill;
  }

  .fixture-swatch.is-passed {
    pointer-events: none;
  }

  .room-hotspot {
    opacity: 0;
    transition: opacity .25s ease, transform .3s var(--ease-out), background .3s ease, color .3s ease, box-shadow .3s ease;
  }

  .lighting-room:hover .room-hotspot,
  .lighting-room:focus-within .room-hotspot {
    opacity: .78;
  }

  .room-hotspot--pendant { top: 17%; left: 49.3%; }
  .room-hotspot--led { top: 31.2%; left: 26.6%; }
  .room-hotspot--sconce { top: 48.4%; left: 30.2%; }
  .room-hotspot--track { top: 8%; left: 20%; }
}

/* V7: each fixture travels into place, then the matching supplied render blends in. */
.lighting-room__render-stack {
  position: absolute;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  background: #0b0d10;
  pointer-events: none;
}

.lighting-room__render {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: none;
  transition: opacity .12s linear;
  will-change: opacity;
}

.lighting-room__render:first-child {
  opacity: 1;
}

.lighting-room__moving {
  position: absolute;
  z-index: 10;
  display: block;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(100vw, 0, 0);
  transform-origin: center;
  transition: opacity .12s linear;
  will-change: transform, opacity;
}

.lighting-room__moving--pendant {
  top: 16.1%;
  left: 40.625%;
  width: 18.75%;
  height: 28.3%;
  object-fit: fill;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.28));
}

.lighting-room__moving--led {
  top: 32%;
  left: 27%;
  width: 45%;
  height: auto;
  filter: drop-shadow(0 0 5px rgba(255,198,116,.88));
}

.lighting-room__moving--sconce {
  inset: 0;
  width: 100%;
  height: 100%;
}

.lighting-room__moving--sconce img {
  position: absolute;
  top: 46.7%;
  width: auto;
  height: 8.25%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255,198,116,.68));
}

.lighting-room__moving--sconce img:first-child {
  left: 31.4%;
}

.lighting-room__moving--sconce img:last-child {
  left: 65.9%;
}

.lighting-room__moving--track {
  top: -.2%;
  left: 16.1%;
  width: 67.8%;
  height: 34%;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.34));
}

.lighting-room__track-half {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform-origin: 50% 0;
}

.lighting-room__track-half--left {
  clip-path: inset(0 50% 0 0);
  transform: translateX(-.4%) skewX(-7.5deg);
}

.lighting-room__track-half--right {
  clip-path: inset(0 0 0 50%);
  transform: translateX(-1.4%) skewX(9.5deg);
}

.lighting-room__photo-scene,
.lighting-room__drawing,
.lighting-room__ambient,
.lighting-room__drop-hint,
.room-hotspot,
.fixture-rack {
  display: none !important;
}

@media (min-width: 901px) {
  .lighting-atelier__room-sheet,
  .lighting-atelier__room-sheet:hover {
    width: min(88%, 1360px) !important;
    transform: translate3d(var(--room-travel-x), -50%, 0) rotate(0deg) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lighting-room__render,
  .lighting-room__moving {
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .fixture-swatch > img {
    width: 100%;
    height: 94px;
    grid-row: 1 / 3;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(17,17,17,.16));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lighting-room__installed,
  .lighting-room__photo-wash,
  .fixture-swatch {
    transition-duration: .01ms !important;
  }
}

/* A static texture is deliberately used instead of animated SVG noise: it is
   richer visually and considerably cheaper on ordinary Windows laptops. */
body::before {
  position: fixed;
  z-index: 889;
  inset: 0;
  pointer-events: none;
  background-image: url("../images/noise-256.webp");
  background-size: 256px 256px;
  content: "";
  opacity: .052;
  mix-blend-mode: soft-light;
}

.chapter--light {
  background-image: repeating-linear-gradient(0deg, rgba(17, 17, 17, .012) 0 1px, transparent 1px 7px);
}

.chapter--dark,
.chapter--black,
.chapter--red {
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .009) 0 1px, transparent 1px 8px);
}

.editorial-photo::after,
.desk-object::after,
.showroom__photo::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(92deg, transparent 0 9px, rgba(255,255,255,.025) 9px 10px),
    url("../images/noise-256.webp");
  background-size: auto, 220px 220px;
  content: "";
  opacity: .17;
  mix-blend-mode: soft-light;
}

.paper-note {
  background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(17,17,17,.025) 5px 6px);
}

/* Safer headline metrics. The second limit reacts to viewport height, which
   prevents headline lines from colliding on 1366x768 and similar displays. */
.display-title {
  max-width: 100%;
  font-size: clamp(58px, min(9.7vw, 17vh), 176px);
  line-height: .84;
  letter-spacing: -.067em;
  text-wrap: balance;
}

.display-title--medium {
  font-size: clamp(52px, min(7.8vw, 14vh), 138px);
  line-height: .89;
}

.hero__title {
  font-size: clamp(72px, min(11.6vw, 17.8vh), 196px);
  line-height: .77;
  letter-spacing: -.078em;
}

.partner-section__title {
  font-size: clamp(70px, min(10.8vw, 17vh), 188px);
  line-height: .78;
}

.final-cta__title {
  font-size: clamp(72px, min(11.2vw, 17vh), 192px);
  line-height: .79;
}

.showroom__address,
.condition-row h3,
.workflow-sticky__content h3,
.category-panel h3 {
  text-wrap: balance;
}

/* Always retain the operating-system cursor. */
html,
body,
a,
button,
label,
input,
textarea,
select,
html.cursor-ready body,
html.cursor-ready a,
html.cursor-ready button,
html.cursor-ready label,
html.cursor-ready input,
html.cursor-ready textarea,
html.cursor-ready select {
  cursor: auto;
}

a[href],
button,
label[for],
select,
input[type="range"],
input[type="file"] + label {
  cursor: pointer;
}

.custom-cursor {
  display: none !important;
}

/* Keep the title as an editorial composition, but reserve clear zones for
   every word so the collage never turns into unreadable text-on-text. */
@media (min-width: 901px) {
  .hero__title {
    top: clamp(88px, 10vh, 130px);
    font-size: clamp(72px, min(9.35vw, 15.2vh), 166px);
    line-height: .86;
  }

  .hero__word--for {
    margin-left: 24vw;
  }

  .hero__word--your {
    margin-left: 3vw;
  }

  .hero__word--idea {
    margin-left: 16vw;
    font-size: .8em;
  }

  .hero__photo {
    top: clamp(238px, 30vh, 330px);
    right: 4vw;
    width: min(37vw, 620px);
    height: min(50vh, 520px);
  }

  .hero__lamp {
    top: clamp(315px, 42vh, 440px);
    left: 43vw;
    width: min(20vw, 320px);
  }

  .hero__note {
    top: min(72vh, 680px);
    left: 7vw;
  }

  .hero__arrow {
    top: min(64vh, 610px);
    left: 20vw;
  }
}

/* ---------- Selection / interactive lighting atelier ---------- */

.selection-section {
  padding: 150px 0 11vh;
}

.selection-section__header {
  width: min(92vw, 1560px);
  margin-bottom: 8vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .55fr);
  gap: clamp(32px, 5vw, 90px);
}

.selection-section__header .display-title {
  font-size: clamp(58px, min(8.6vw, 15vh), 150px);
  line-height: .84;
}

.selection-section__header p {
  max-width: 590px;
  margin-bottom: 1vh;
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.48;
}

.selection-story,
.lighting-story {
  min-height: 390vh;
  background: var(--paper-grey);
}

.selection-story__sticky,
.lighting-story__sticky {
  position: sticky;
  top: 0;
  display: grid;
  height: 100svh;
  min-height: 650px;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 27vw, 450px);
  overflow: hidden;
  color: var(--black);
  background: var(--paper-grey);
  border-top: 1px solid rgba(17,17,17,.32);
  border-bottom: 1px solid rgba(17,17,17,.32);
}

.lighting-atelier {
  --atelier-gap: clamp(12px, 1.5vw, 28px);
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) clamp(205px, 20vw, 330px);
  gap: var(--atelier-gap);
  padding: clamp(58px, 7vh, 82px) clamp(18px, 2.3vw, 42px) clamp(42px, 5vh, 62px);
  overflow: hidden;
  background:
    linear-gradient(rgba(17,17,17,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.78), transparent 37%),
    #eef3ef;
  background-size: 28px 28px, 28px 28px, auto, auto;
  isolation: isolate;
}

.lighting-atelier::before {
  position: absolute;
  z-index: -1;
  inset: -10%;
  pointer-events: none;
  background-image: url("../images/noise-256.webp");
  background-size: 220px 220px;
  content: "";
  opacity: .24;
  mix-blend-mode: multiply;
  transform: rotate(1.5deg);
}

.lighting-atelier::after {
  position: absolute;
  z-index: 0;
  right: 17%;
  bottom: -18%;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--light-rgb), calc(var(--light-intensity) * .17)), transparent 68%);
  content: "";
  filter: blur(18px);
  transition: background .3s ease;
}

.lighting-atelier__meta {
  position: absolute;
  z-index: 6;
  top: 18px;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.lighting-atelier__room-sheet {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: clamp(10px, 1.6vw, 24px);
  background:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(17,17,17,.018) 6px 7px),
    #f2f0ea;
  box-shadow: 0 18px 46px rgba(17,17,17,.16), 0 0 0 1px rgba(17,17,17,.19);
  transform: rotate(-.35deg);
  transform-origin: center;
  transition: transform .6s var(--ease-out), box-shadow .6s ease;
}

.lighting-atelier__room-sheet:hover {
  box-shadow: 0 26px 70px rgba(17,17,17,.22), 0 0 0 1px rgba(17,17,17,.32);
}

.lighting-atelier__tape {
  position: absolute;
  z-index: 8;
  top: -8px;
  left: 44%;
  width: clamp(72px, 8vw, 118px);
  height: 25px;
  background: rgba(14,209,69,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  transform: rotate(-2deg);
  mix-blend-mode: multiply;
}

.lighting-room {
  --room-tilt-x: 0deg;
  --room-tilt-y: 0deg;
  position: relative;
  width: 100%;
  max-width: 940px;
  max-height: calc(100svh - 146px);
  aspect-ratio: 840 / 640;
  outline: 0;
  transform: perspective(1100px) rotateX(var(--room-tilt-x)) rotateY(var(--room-tilt-y));
  transform-origin: center;
  transition: transform .35s ease, filter .35s ease;
}

.lighting-room:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 6px;
}

.lighting-room.is-dragging-over {
  filter: contrast(1.03) drop-shadow(0 0 0 var(--red));
}

.lighting-room.is-dragging-over::after {
  position: absolute;
  z-index: 20;
  inset: 2.5%;
  border: 2px dashed var(--red);
  content: "";
  pointer-events: none;
}

.lighting-room__drawing {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.room-wall,
.room-floor {
  stroke: var(--pencil);
  stroke-width: 2.4;
}

.room-floor-line,
.room-ceiling-line,
.room-corner-line,
.room-window,
.room-window-frame,
.room-window-view,
.room-picture,
.room-picture-line,
.room-curtain,
.room-sofa-line,
.room-sofa-leg,
.room-sideboard-line,
.room-sideboard-leg,
.room-branch,
.fixture-wire,
.fixture-sconce-arm,
.fixture-track,
.fixture-track-drop {
  fill: none;
  stroke: var(--pencil);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.room-ceiling-line,
.room-corner-line {
  opacity: .35;
  stroke-width: 1.6;
}

.room-window {
  fill: #edf3ef;
}

.room-window-view {
  fill: rgba(14,209,69,.1);
}

.room-window-sun {
  fill: #dce4de;
  stroke: var(--pencil);
  stroke-width: 2;
}

.room-picture {
  fill: #f7f9f7;
}

.room-picture-dot {
  fill: var(--red);
}

.room-rug {
  fill: #bdc8c0;
  stroke: var(--pencil);
  stroke-width: 2.6;
}

.room-sofa-seat,
.room-sofa-back {
  fill: #dce4de;
  stroke: var(--pencil);
  stroke-width: 3;
}

.room-cushion {
  fill: #f7f9f7;
  stroke: var(--pencil);
  stroke-width: 2.3;
}

.room-cushion--right {
  fill: #0ed145;
}

.room-sideboard {
  fill: #aebbb2;
  stroke: var(--pencil);
  stroke-width: 3;
}

.room-vase {
  fill: #bccbc1;
  stroke: var(--pencil);
  stroke-width: 2.4;
}

.room-light-layer,
.room-fixture {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .62s ease, transform .78s var(--ease-out), filter .45s ease;
}

.room-light-layer {
  pointer-events: none;
  mix-blend-mode: screen;
}

.room-light-layer--pendant {
  transform: translateY(-16px) scale(.92);
}

.room-light-layer--led {
  transform: translateY(-10px);
}

.room-light-layer--sconce {
  transform: scale(.88);
}

.room-light-layer--track {
  transform: translateY(-12px);
}

.room-pendant-beam,
.room-led-wash,
.room-sconce-glow,
.room-track-beam {
  opacity: calc(var(--light-intensity) * .78);
}

.room-led-line,
.room-led-back {
  fill: none;
  stroke: rgb(var(--light-rgb));
  stroke-linecap: round;
  stroke-width: 7;
  filter: drop-shadow(0 0 8px rgb(var(--light-rgb)));
}

.room-sconce-glow {
  fill: rgb(var(--light-rgb));
  filter: blur(12px);
  opacity: calc(var(--light-intensity) * .27);
}

.room-track-beam {
  fill: rgb(var(--light-rgb));
  filter: blur(3px);
  opacity: calc(var(--light-intensity) * .22);
}

.fixture-pendant-shade,
.fixture-pendant-bottom,
.fixture-sconce,
.fixture-track-head {
  fill: #222;
  stroke: var(--pencil);
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.fixture-pendant-bottom {
  fill: #4c4945;
}

.fixture-bulb {
  fill: rgb(var(--light-rgb));
  stroke: var(--pencil);
  stroke-width: 2;
  filter: drop-shadow(0 0 calc(14px * var(--light-intensity)) rgb(var(--light-rgb)));
}

.lighting-room.has-pendant [data-room-fixture="pendant"],
.lighting-room.has-pendant [data-room-light="pendant"],
.lighting-room.has-led [data-room-light="led"],
.lighting-room.has-sconce [data-room-fixture="sconce"],
.lighting-room.has-sconce [data-room-light="sconce"],
.lighting-room.has-track [data-room-fixture="track"],
.lighting-room.has-track [data-room-light="track"] {
  opacity: 1;
  transform: none;
}

.lighting-room__ambient {
  position: absolute;
  z-index: 1;
  inset: 4%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 29%, rgba(var(--light-rgb), calc(var(--light-intensity) * .18)), transparent 36%),
    linear-gradient(rgba(var(--light-rgb), calc(var(--light-intensity) * .035)), rgba(var(--light-rgb), calc(var(--light-intensity) * .1)));
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity .55s ease, background .25s ease;
}

.lighting-room.has-any-light .lighting-room__ambient {
  opacity: 1;
}

.room-hotspot {
  position: absolute;
  z-index: 12;
  width: 20px;
  height: 20px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--black);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 5px rgba(14,209,69,.1);
  transition: transform .3s var(--ease-out), background .3s ease, color .3s ease, box-shadow .3s ease;
}

.room-hotspot::before {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.room-hotspot span {
  position: absolute;
  top: 50%;
  left: 27px;
  width: max-content;
  padding: 5px 7px;
  border: 1px solid rgba(17,17,17,.4);
  background: rgba(255,255,255,.96);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  opacity: 0;
  transform: translate(-4px, -50%);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.room-hotspot:hover,
.room-hotspot:focus-visible,
.room-hotspot[aria-pressed="true"] {
  color: var(--black);
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(14,209,69,.16);
  transform: scale(1.12);
}

.room-hotspot:hover span,
.room-hotspot:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

.room-hotspot--pendant { top: 26%; left: 49%; }
.room-hotspot--led { top: 11%; left: 15%; }
.room-hotspot--sconce { top: 41%; left: 22%; }
.room-hotspot--track { top: 18%; left: 71%; }

.lighting-room__drop-hint {
  position: absolute;
  z-index: 22;
  top: 50%;
  left: 50%;
  padding: 12px 16px;
  border: 2px solid var(--red);
  color: var(--red);
  background: rgba(255,255,255,.94);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
  opacity: 0;
  transform: translate(-50%, -40%);
  transition: opacity .25s ease, transform .25s ease;
}

.lighting-room.is-dragging-over .lighting-room__drop-hint {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.lighting-room__caption {
  position: absolute;
  right: 20px;
  bottom: 12px;
  left: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}

.lighting-room__caption span {
  color: var(--red);
  font-size: 16px;
  line-height: .7;
}

.fixture-rack {
  position: relative;
  z-index: 4;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto repeat(4, minmax(0, 1fr)) auto;
  gap: 5px;
  padding-left: var(--atelier-gap);
  border-left: 1px solid rgba(17,17,17,.34);
}

.fixture-rack__heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.fixture-rack__heading small {
  font-size: 7px;
  opacity: .58;
}

.fixture-swatch {
  --fixture-align-y: 0px;
  --fixture-opacity: 1;
  --fixture-rotation: 0deg;
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(74px, .78fr) 1fr;
  grid-template-rows: auto auto;
  align-items: end;
  gap: 0 8px;
  padding: 3px 3px 5px;
  text-align: left;
  border-bottom: 1px solid rgba(17,17,17,.22);
  opacity: var(--fixture-opacity);
  transition: color .3s ease, transform .42s var(--ease-out), opacity .14s linear;
  will-change: opacity;
}

.fixture-swatch svg {
  width: 100%;
  height: 100%;
  max-height: 118px;
  grid-row: 1 / 3;
  overflow: visible;
  filter: drop-shadow(0 10px 8px rgba(17,17,17,.08));
  transform: translate3d(0, var(--fixture-align-y), 0) rotate(var(--fixture-rotation));
  transform-origin: center;
  transition: transform .34s var(--ease-out), filter .3s ease;
  will-change: transform;
}

.fixture-swatch > span {
  align-self: end;
  font-family: var(--display);
  font-size: clamp(19px, 1.65vw, 30px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.05em;
}

.fixture-swatch > small {
  align-self: start;
  margin-top: 6px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
  opacity: .62;
}

.fixture-swatch:nth-of-type(2) { --fixture-rotation: 2deg; }
.fixture-swatch:nth-of-type(3) { --fixture-rotation: -3deg; }
.fixture-swatch:nth-of-type(4) { --fixture-rotation: 2.5deg; }
.fixture-swatch:nth-of-type(5) { --fixture-rotation: -1.5deg; }

.fixture-swatch:hover,
.fixture-swatch:focus-visible {
  color: var(--red);
  transform: translateX(-6px);
}

.fixture-swatch:hover svg,
.fixture-swatch:focus-visible svg {
  filter: drop-shadow(0 18px 10px rgba(17,17,17,.16));
  transform: translate3d(0, calc(var(--fixture-align-y) - 4px), 0) rotate(0deg) scale(1.04);
}

.fixture-swatch.is-active::after {
  position: absolute;
  top: 10%;
  right: 2%;
  color: var(--red);
  font-family: var(--hand);
  font-size: clamp(12px, 1.1vw, 18px);
  content: "в комнате ↙";
  transform: rotate(-7deg);
}

.fixture-swatch.is-active svg {
  filter: drop-shadow(0 16px 12px rgba(14,209,69,.22));
}

.swatch-wire,
.swatch-body,
.swatch-led,
.swatch-led-dot,
.swatch-track,
.swatch-ray {
  fill: none;
  stroke: var(--pencil);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.swatch-body {
  fill: #292929;
}

.swatch-bulb {
  fill: #e8d3a6;
  stroke: var(--pencil);
  stroke-width: 3;
}

.swatch-led {
  stroke: #a87b43;
  stroke-width: 11;
}

.swatch-led-dot {
  stroke: #fff4cf;
  stroke-dasharray: 1 25;
  stroke-width: 7;
}

.swatch-ray {
  stroke: var(--red);
  stroke-width: 3;
}

.fixture-rack__note {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: clamp(13px, 1.02vw, 17px);
  font-style: italic;
  line-height: 1.15;
  transform: rotate(-2deg);
}

.fixture-rack__note em {
  color: var(--red);
  font-family: var(--hand);
  font-style: normal;
}

.lighting-story__panel {
  position: relative;
  z-index: 5;
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(14px, 2vh, 24px);
  padding: clamp(34px, 5.5vh, 62px) clamp(24px, 2.5vw, 44px) clamp(28px, 4vh, 50px);
  color: var(--cream);
  background:
    linear-gradient(120deg, rgba(255,255,255,.025), transparent 42%),
    url("../images/noise-256.webp"),
    var(--black);
  background-size: auto, 210px 210px, auto;
  background-blend-mode: normal, soft-light, normal;
  border-left: 1px solid rgba(255,255,255,.2);
}

.lighting-story__stage-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .18em;
}

.lighting-story__stage-meta strong {
  margin-left: auto;
  color: var(--red);
  font-family: var(--display);
  font-size: clamp(58px, min(6vw, 10vh), 96px);
  line-height: .65;
  letter-spacing: -.08em;
}

.lighting-story__stage-meta small {
  font-size: 9px;
  opacity: .5;
}

.lighting-story__steps {
  position: relative;
  min-height: 0;
}

.lighting-story .selection-step {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: 0;
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity .38s ease, transform .55s var(--ease-out);
}

.lighting-story .selection-step.is-active {
  opacity: 1;
  transform: none;
}

.lighting-story .selection-step__number {
  display: none;
}

.lighting-story .selection-step h3 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(36px, min(4vw, 7vh), 70px);
  line-height: .9;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.lighting-story .selection-step p {
  max-width: 36ch;
  margin: clamp(17px, 2.4vh, 28px) 0 0;
  font-size: clamp(14px, 1.12vw, 18px);
  line-height: 1.48;
  opacity: .82;
}

.lighting-console {
  display: grid;
  gap: 15px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.22);
}

.lighting-console__presets,
.lighting-console__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lighting-console__presets button,
.lighting-console__actions button {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.34);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

.lighting-console__presets button:hover,
.lighting-console__presets button:focus-visible,
.lighting-console__presets button.is-active,
.lighting-console__actions button:hover,
.lighting-console__actions button:focus-visible {
  border-color: var(--red);
  color: var(--black);
  background: var(--red);
  transform: translateY(-2px);
}

.lighting-range {
  display: grid;
  gap: 7px;
}

.lighting-range > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.lighting-range output {
  color: var(--red);
}

.lighting-range input {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.lighting-range input::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(255,255,255,.32);
}

.lighting-range input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -6.5px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  appearance: none;
  background: var(--red);
}

.lighting-range input::-moz-range-track {
  height: 2px;
  background: rgba(255,255,255,.32);
}

.lighting-range input::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--red);
}

.lighting-story__instruction {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: .07em;
  opacity: .55;
}

.lighting-story__instruction span {
  color: var(--red);
  font-size: 18px;
}

.lighting-story__progress {
  right: 0;
  left: 0;
  z-index: 12;
  background: rgba(17,17,17,.24);
}

.fixture-flight {
  position: fixed;
  z-index: 2500;
  pointer-events: none;
  transform-origin: center;
  filter: drop-shadow(0 16px 12px rgba(17,17,17,.22));
}

.selection-section__outro {
  width: min(82vw, 1160px);
  font-size: clamp(32px, min(4.5vw, 8vh), 70px);
  line-height: 1.08;
  text-wrap: balance;
}

/* Reduce the distance needed to advance the other pinned story as well. */
.workflow-story {
  min-height: 395vh;
}

.workflow-step-marker {
  height: 79svh;
}

/* Short desktop screens: preserve drama without collisions. */
@media (min-width: 901px) and (max-height: 820px) {
  .hero {
    min-height: 980px;
  }

  .hero__title {
    top: 86px;
    font-size: clamp(68px, 8.65vw, 132px);
    line-height: .88;
  }

  .hero__photo {
    top: 248px;
    right: 3vw;
    width: min(36vw, 560px);
    height: 430px;
  }

  .hero__lamp {
    top: 340px;
    left: 43vw;
    width: min(18vw, 270px);
  }

  .hero__note {
    top: 625px;
  }

  .hero__arrow {
    top: 560px;
  }

  .hero__offer {
    bottom: 58px;
  }

  .lighting-story__sticky {
    min-height: 620px;
  }

  .lighting-atelier {
    padding-top: 49px;
    padding-bottom: 32px;
  }

  .lighting-story__panel {
    gap: 10px;
    padding-top: 31px;
    padding-bottom: 27px;
  }

  .lighting-story .selection-step h3 {
    font-size: clamp(32px, 3.35vw, 52px);
  }

  .lighting-story .selection-step p {
    margin-top: 13px;
    font-size: 14px;
  }

  .lighting-console {
    gap: 10px;
    padding-top: 12px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .lighting-story__sticky {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .lighting-atelier {
    grid-template-columns: minmax(0, 1fr) 220px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .fixture-swatch {
    grid-template-columns: 78px 1fr;
  }

  .fixture-swatch > span {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  body::before {
    opacity: .035;
  }

  .display-title {
    font-size: clamp(50px, 14.5vw, 108px);
    line-height: .87;
  }

  .hero {
    min-height: max(1000px, 124svh);
  }

  .hero__title {
    top: 88px;
    font-size: clamp(64px, 14.6vw, 118px);
    line-height: .87;
  }

  .hero__word--for {
    margin-left: 31vw;
  }

  .hero__word--your {
    margin-left: 1vw;
  }

  .hero__word--idea {
    margin-left: 10vw;
    font-size: .82em;
  }

  .hero__photo {
    top: 390px;
    right: 6vw;
    width: 69vw;
    height: 340px;
  }

  .hero__lamp {
    top: 372px;
    left: -2vw;
    width: 40vw;
  }

  .hero__note {
    top: 650px;
    left: 4vw;
    width: min(38vw, 300px);
  }

  .hero__arrow {
    top: 602px;
    left: 32vw;
    width: 25vw;
  }

  .hero__offer {
    bottom: 70px;
  }

  .selection-section__header {
    width: calc(100vw - 40px);
    grid-template-columns: 1fr;
  }

  .selection-section__header .display-title {
    font-size: clamp(52px, 14.2vw, 104px);
  }

  .selection-section__header p {
    width: min(100%, 620px);
    margin-left: 0;
  }

  .selection-story,
  .lighting-story {
    min-height: auto;
  }

  .selection-story__sticky,
  .lighting-story__sticky {
    position: relative;
    display: grid;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .lighting-atelier {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 64px 18px 28px;
    overflow: hidden;
  }

  .lighting-atelier__room-sheet {
    min-height: 0;
    padding: 12px 12px 38px;
  }

  .lighting-room {
    max-height: none;
  }

  .fixture-rack {
    display: flex;
    min-width: 0;
    margin: 0 -18px;
    padding: 0 18px 12px;
    border-left: 0;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .fixture-rack__heading {
    min-width: 150px;
    align-content: center;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
  }

  .fixture-swatch {
    min-width: min(68vw, 285px);
    min-height: 230px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(17,17,17,.25);
    scroll-snap-align: center;
  }

  .fixture-swatch svg {
    max-height: 150px;
    grid-row: 1;
  }

  .fixture-swatch > span {
    font-size: 30px;
  }

  .fixture-rack__note {
    min-width: min(72vw, 300px);
    align-self: center;
    padding: 25px 20px;
    font-size: 20px;
    scroll-snap-align: center;
  }

  .lighting-story__panel {
    min-height: 650px;
    grid-template-rows: auto minmax(220px, 1fr) auto auto;
    padding: 42px 22px 38px;
    border-top: 1px solid rgba(255,255,255,.2);
    border-left: 0;
  }

  .lighting-story .selection-step h3 {
    font-size: clamp(42px, 11vw, 76px);
  }

  .lighting-story .selection-step p {
    font-size: 16px;
  }

  .lighting-story__instruction {
    max-width: 54ch;
  }

  .lighting-story__progress {
    display: block;
  }

  .workflow-story {
    min-height: auto;
  }

  .workflow-step-marker {
    height: auto;
  }
}

@media (max-width: 640px) {
  .display-title,
  .display-title--medium,
  .partner-section__title,
  .final-cta__title,
  .showroom__address,
  .condition-row h3,
  .workflow-step-marker::after {
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .hero {
    min-height: 1080px;
  }

  .hero__title {
    top: 82px;
    right: -1vw;
    left: 0;
    font-size: clamp(57px, 16vw, 72px);
    line-height: .9;
  }

  .hero__word--for {
    margin-left: 29vw;
  }

  .hero__word--your {
    margin-left: 0;
  }

  .hero__word--idea {
    margin-left: 8vw;
    font-size: .82em;
  }

  .hero__photo {
    top: 365px;
    right: 5vw;
    width: 76vw;
    height: 300px;
    min-height: 0;
  }

  .hero__lamp {
    top: 350px;
    left: -7vw;
    width: 45vw;
  }

  .hero__note {
    top: 625px;
    left: 4vw;
    width: 54vw;
  }

  .hero__arrow {
    top: 575px;
    left: 39vw;
    width: 34vw;
  }

  .hero__offer {
    right: 18px;
    bottom: 92px;
    left: 18px;
  }

  .selection-section {
    padding-top: 112px;
  }

  .selection-section__header {
    width: calc(100vw - 32px);
    margin-bottom: 55px;
  }

  .selection-section__header .display-title {
    font-size: clamp(48px, 13.6vw, 76px);
    line-height: .9;
  }

  .lighting-atelier__meta {
    right: 16px;
    left: 16px;
  }

  .lighting-atelier__meta span:last-child {
    display: none;
  }

  .lighting-atelier {
    padding-right: 10px;
    padding-left: 10px;
  }

  .lighting-atelier__room-sheet {
    padding: 8px 8px 34px;
  }

  .lighting-room__caption {
    right: 8px;
    bottom: 9px;
    left: 8px;
    font-size: 6px;
  }

  .room-hotspot {
    width: 18px;
    height: 18px;
  }

  .room-hotspot::before {
    inset: 4px;
  }

  .room-hotspot span {
    display: none;
  }

  .fixture-rack {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .fixture-swatch {
    min-width: 76vw;
  }

  .lighting-story__panel {
    min-height: 690px;
    padding: 34px 18px 34px;
  }

  .lighting-story__stage-meta strong {
    font-size: 64px;
  }

  .lighting-story .selection-step h3 {
    max-width: 11ch;
    font-size: clamp(37px, 11.8vw, 60px);
    line-height: .94;
  }

  .lighting-console__presets button,
  .lighting-console__actions button {
    flex: 1 1 auto;
    min-height: 40px;
  }

  .selection-section__outro {
    width: calc(100vw - 32px);
    font-size: clamp(30px, 9.2vw, 48px);
  }
}


#pendantGlow stop,
#ledGlow stop {
  stop-color: rgb(var(--light-rgb));
}

.lighting-atelier.is-complete .lighting-atelier__room-sheet {
  transform: rotate(.2deg) scale(1.008);
}

html.low-power .room-architecture {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .lighting-atelier__room-sheet,
  .lighting-room,
  .room-light-layer,
  .room-fixture,
  .fixture-swatch,
  .fixture-swatch svg {
    transition: none !important;
  }
}

/* ---------- Readability pass for remaining oversized compositions ---------- */

.partner-section__title {
  font-size: clamp(66px, min(9.8vw, 15.5vh), 170px);
  line-height: .87;
  letter-spacing: -.072em;
}

.final-cta__title {
  font-size: clamp(68px, min(10vw, 15.5vh), 178px);
  line-height: .86;
  letter-spacing: -.078em;
}

.final-cta__script {
  max-width: 68vw;
  margin-top: 2.5vh;
  font-size: clamp(28px, 3.8vw, 66px);
  line-height: 1.06;
}

.condition-row {
  grid-template-columns: 70px minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 2.5vw;
}

.condition-row h3 {
  min-width: 0;
  max-width: 100%;
  font-size: clamp(38px, min(4.35vw, 8vh), 72px);
  line-height: .91;
  letter-spacing: -.055em;
}

.condition-row p {
  position: relative;
  z-index: 3;
  min-width: 0;
  background: inherit;
}

@media (max-width: 1100px) {
  .condition-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .condition-row p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .partner-section__title {
    font-size: clamp(54px, 15.6vw, 68px);
    line-height: .91;
  }

  .partner-section__title span:nth-child(2) {
    margin-left: 4vw;
  }

  .partner-section__title span:nth-child(4) {
    margin-left: 5vw;
  }

  .final-cta__title {
    font-size: clamp(54px, 15.4vw, 70px);
    line-height: .91;
  }

  .final-cta__title span:nth-child(2) {
    margin-left: 0;
    font-size: .76em;
  }

  .final-cta__title span:nth-child(3) {
    margin-left: 10vw;
  }

  .final-cta__script {
    max-width: 92vw;
    margin: 22px 0 0 1vw;
    font-size: clamp(32px, 9.5vw, 46px);
  }

  .condition-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .condition-row h3 {
    font-size: clamp(34px, 10.5vw, 52px);
    overflow-wrap: anywhere;
  }
}

/* ---------- V4 / continuous horizontal lighting fitting ---------- */

.lighting-atelier__direction {
  position: absolute;
  z-index: 12;
  top: 38px;
  left: clamp(18px, 2.3vw, 42px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(17, 17, 17, .66);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  pointer-events: none;
}

.lighting-atelier__direction i {
  width: clamp(36px, 4vw, 72px);
  height: 1px;
  background: currentColor;
  transform-origin: right center;
}

.lighting-atelier__direction strong {
  color: var(--red);
  font-family: var(--display);
  font-size: 24px;
  line-height: .5;
}

@media (min-width: 901px) {
  .selection-story,
  .lighting-story {
    min-height: 285vh;
  }

  .selection-story__sticky,
  .lighting-story__sticky {
    grid-template-columns: minmax(0, 1fr) clamp(315px, 25vw, 410px);
  }

  .lighting-atelier {
    --room-travel-x: 0px;
    display: block;
    padding: 0;
  }

  .lighting-atelier__meta {
    top: 17px;
  }

  .lighting-atelier__direction {
    top: 43px;
    left: 24px;
  }

  .lighting-atelier__room-sheet {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: clamp(20px, 2.6vw, 48px);
    width: min(61%, 870px);
    max-height: calc(100% - 118px);
    padding: clamp(10px, 1.25vw, 20px);
    transform: translate3d(var(--room-travel-x), -50%, 0) rotate(-.35deg);
    will-change: transform;
  }

  .lighting-atelier__room-sheet:hover {
    transform: translate3d(var(--room-travel-x), -50%, 0) rotate(.1deg) scale(1.006);
  }

  .lighting-room {
    max-height: calc(100svh - 152px);
  }

  .fixture-rack {
    --fixture-card-width: clamp(248px, 21vw, 350px);
    position: absolute;
    z-index: 8;
    top: clamp(94px, 13.5vh, 138px);
    bottom: clamp(48px, 6vh, 68px);
    left: calc(100% - clamp(108px, 8vw, 152px));
    display: flex;
    width: max-content;
    min-width: 0;
    height: auto;
    min-height: 0;
    align-items: stretch;
    gap: clamp(40px, 4.8vw, 82px);
    padding: 0 clamp(250px, 22vw, 390px) 0 0;
    border-left: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  .fixture-rack__heading {
    flex: 0 0 clamp(150px, 12vw, 205px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    padding: 24px 20px;
    border: 1px solid rgba(17, 17, 17, .34);
    background:
      repeating-linear-gradient(0deg, transparent 0 6px, rgba(17,17,17,.024) 6px 7px),
      rgba(255, 255, 255, .94);
    box-shadow: 0 18px 44px rgba(17, 17, 17, .12);
    font-size: 12px;
    line-height: 1.2;
    transform: rotate(-2.5deg);
  }

  .fixture-rack__heading small {
    max-width: 13ch;
    color: var(--red);
    font-size: 8px;
    line-height: 1.45;
  }

  .fixture-swatch {
    position: relative;
    flex: 0 0 var(--fixture-card-width);
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: clamp(18px, 2vw, 32px) clamp(16px, 1.7vw, 28px) clamp(16px, 2vh, 25px);
    overflow: hidden;
    border: 1px solid rgba(17, 17, 17, .3);
    background:
      linear-gradient(128deg, rgba(255,255,255,.92), rgba(236,244,239,.76)),
      url("../images/noise-256.webp");
    background-size: auto, 220px 220px;
    background-blend-mode: normal, soft-light;
    box-shadow: 0 22px 52px rgba(17, 17, 17, .15);
    transform-origin: center;
    transition: box-shadow .36s ease, color .3s ease, transform .42s var(--ease-out), opacity .14s linear;
    isolation: isolate;
  }

  .fixture-swatch::before {
    position: absolute;
    z-index: -1;
    inset: 12px;
    border: 1px solid rgba(17, 17, 17, .09);
    content: "";
    pointer-events: none;
  }

  .fixture-swatch--pendant { transform: rotate(1.7deg); }
  .fixture-swatch--led { transform: rotate(-2.1deg); }
  .fixture-swatch--sconce { transform: rotate(2.4deg); }
  .fixture-swatch--track { transform: rotate(-1.4deg); }

  .fixture-swatch:hover,
  .fixture-swatch:focus-visible {
    color: var(--red);
    box-shadow: 0 30px 72px rgba(17, 17, 17, .22);
    transform: translateY(-9px) rotate(0deg) scale(1.012);
  }

  .fixture-swatch svg {
    width: 100%;
    height: 100%;
    max-height: min(52vh, 430px);
    grid-row: 1;
    filter: drop-shadow(0 18px 12px rgba(17,17,17,.12));
  }

  .fixture-swatch > span {
    grid-row: 2;
    font-size: clamp(30px, 2.75vw, 48px);
    line-height: .82;
  }

  .fixture-swatch > small {
    grid-row: 3;
    margin-top: 3px;
    font-size: 8px;
    line-height: 1.35;
  }

  .fixture-swatch.is-active::after {
    top: 18px;
    right: 14px;
    font-size: clamp(14px, 1.15vw, 19px);
    content: "в комнате ←";
  }

  .fixture-rack__note {
    flex: 0 0 clamp(260px, 22vw, 360px);
    align-self: center;
    margin: 0;
    padding: clamp(28px, 3vw, 48px);
    border: 1px solid rgba(17,17,17,.25);
    background:
      repeating-linear-gradient(0deg, transparent 0 7px, rgba(17,17,17,.025) 7px 8px),
      #edf3ef;
    box-shadow: 0 20px 48px rgba(17,17,17,.14);
    font-size: clamp(24px, 2vw, 36px);
    line-height: 1.05;
    transform: rotate(2.4deg);
  }

  .lighting-story .selection-step {
    transform: translateX(44px);
    transition: opacity .34s ease, transform .52s var(--ease-out);
  }

  .lighting-story .selection-step.is-before {
    transform: translateX(-44px);
  }

  .lighting-story .selection-step.is-after {
    transform: translateX(44px);
  }

  .lighting-story .selection-step.is-active {
    transform: translateX(0);
  }

  .lighting-story__instruction span {
    font-size: 22px;
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  .lighting-atelier__room-sheet {
    width: min(58%, 760px);
    max-height: calc(100% - 100px);
  }

  .fixture-rack {
    top: 76px;
    bottom: 30px;
  }

  .fixture-swatch svg {
    max-height: min(45vh, 330px);
  }
}

@media (max-width: 900px) {
  .lighting-atelier__direction {
    top: 36px;
    right: 18px;
    left: auto;
  }

  .fixture-rack {
    scroll-behavior: smooth;
  }

  .lighting-story__instruction span {
    transform: rotate(180deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fixture-rack,
  .lighting-atelier__room-sheet,
  .lighting-story .selection-step {
    transition-duration: .01ms !important;
  }
}

/* The moving objects remain cut-outs, not opaque cards: the room must stay
   visible while the rail passes across it. */
@media (min-width: 901px) {
  .fixture-swatch {
    padding: 8px 4px 12px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .fixture-swatch::before {
    display: none;
  }

  .fixture-swatch:hover,
  .fixture-swatch:focus-visible {
    box-shadow: none;
  }

  .fixture-swatch svg {
    max-height: min(54vh, 450px);
    filter: drop-shadow(0 24px 14px rgba(17,17,17,.19));
  }

  .fixture-swatch > span,
  .fixture-swatch > small {
    position: relative;
    z-index: 2;
    width: max-content;
    max-width: 100%;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(17,17,17,.09);
  }

  .fixture-swatch > span {
    padding: 7px 10px 4px;
  }

  .fixture-swatch > small {
    padding: 5px 8px;
  }

  .fixture-swatch.is-passed {
    pointer-events: none;
  }

  .fixture-swatch.is-approaching svg,
  .fixture-swatch.is-handoff svg {
    filter: drop-shadow(0 30px 18px rgba(17,17,17,.25));
    transform: translate3d(0, calc(var(--fixture-align-y) - 5px), 0) rotate(0deg) scale(1.035);
  }
}

/* V5 cascade lock: the photorealistic scene must win over legacy sketch rules. */
.lighting-room {
  aspect-ratio: 3 / 2;
  max-width: none;
  overflow: hidden;
  background: #0b0d10;
  transform: none;
}

.lighting-room__drawing {
  display: none;
}

.lighting-room__ambient {
  z-index: 5;
  inset: 0;
}

.lighting-room__installed--pendant,
.lighting-room.has-pendant .lighting-room__installed--pendant {
  opacity: var(--install-pendant, 0);
  transform: translateX(-50%);
}

.lighting-room.has-pendant .lighting-room__installed--pendant {
  opacity: var(--install-pendant, 1);
}

.lighting-room__installed--led,
.lighting-room.has-led .lighting-room__installed--led {
  opacity: var(--install-led, 0);
  transform: none;
}

.lighting-room.has-led .lighting-room__installed--led {
  opacity: var(--install-led, 1);
}

.lighting-room__installed--sconce,
.lighting-room.has-sconce .lighting-room__installed--sconce {
  opacity: var(--install-sconce, 0);
  transform: none;
}

.lighting-room.has-sconce .lighting-room__installed--sconce {
  opacity: var(--install-sconce, 1);
}

.lighting-room__installed--track,
.lighting-room.has-track .lighting-room__installed--track {
  opacity: var(--install-track, 0);
  transform: none;
}

.lighting-room.has-track .lighting-room__installed--track {
  opacity: var(--install-track, 1);
}

.lighting-room__photo-wash--pendant,
.lighting-room.has-pendant .lighting-room__photo-wash--pendant {
  opacity: var(--install-pendant, 0);
  transform: none;
}

.lighting-room.has-pendant .lighting-room__photo-wash--pendant {
  opacity: var(--install-pendant, 1);
}

.lighting-room__photo-wash--led,
.lighting-room.has-led .lighting-room__photo-wash--led {
  opacity: var(--install-led, 0);
  transform: none;
}

.lighting-room.has-led .lighting-room__photo-wash--led {
  opacity: var(--install-led, 1);
}

.lighting-room__photo-wash--sconce,
.lighting-room.has-sconce .lighting-room__photo-wash--sconce {
  opacity: var(--install-sconce, 0);
  transform: none;
}

.lighting-room.has-sconce .lighting-room__photo-wash--sconce {
  opacity: var(--install-sconce, 1);
}

.lighting-room__photo-wash--track,
.lighting-room.has-track .lighting-room__photo-wash--track {
  opacity: var(--install-track, 0);
  transform: none;
}

.lighting-room.has-track .lighting-room__photo-wash--track {
  opacity: var(--install-track, 1);
}

@media (min-width: 901px) {
  .selection-story,
  .lighting-story {
    min-height: 420vh;
  }

  .lighting-atelier__room-sheet {
    width: min(76%, 1040px);
  }

  .lighting-atelier__room-sheet:hover {
    transform: translate3d(var(--room-travel-x), -50%, 0) rotate(-.35deg);
  }

  .fixture-rack__heading,
  .fixture-rack__note {
    display: none !important;
  }

  .fixture-rack {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    pointer-events: none;
    transform: none;
  }

  .fixture-swatch,
  .fixture-swatch--pendant,
  .fixture-swatch--led,
  .fixture-swatch--sconce,
  .fixture-swatch--track {
    position: absolute;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    transform: none;
    transition: opacity .12s linear, filter .2s ease;
    will-change: transform, opacity;
  }

  .fixture-swatch::before,
  .fixture-swatch.is-active::after,
  .fixture-swatch > span,
  .fixture-swatch > small {
    display: none;
  }

  .fixture-swatch > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 12px rgba(17,17,17,.22));
    transform: none;
  }

  .fixture-swatch:hover,
  .fixture-swatch:focus-visible {
    box-shadow: none;
    transform: none;
  }

  .fixture-swatch:hover > img,
  .fixture-swatch:focus-visible > img,
  .fixture-swatch.is-approaching > img,
  .fixture-swatch.is-handoff > img {
    filter: drop-shadow(0 16px 15px rgba(17,17,17,.3));
    transform: none;
  }

  .room-hotspot--pendant { top: 17%; left: 49.3%; }
  .room-hotspot--led { top: 31.2%; left: 26.6%; }
  .room-hotspot--sconce { top: 48.4%; left: 30.2%; }
  .room-hotspot--track { top: 8%; left: 20%; }
}
