/* Homepage sections (base.css holds tokens, menu and footer). */

/* ---------- section headings ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: clamp(18px, 2vw, 34px); border-bottom: 2px solid currentColor; }
.section-head h2 { font: 700 clamp(34px, 5vw, 88px) / 1 var(--sans); letter-spacing: -.025em; }
.section-head .mono { font-size: clamp(12px, 1.05vw, 17px); color: var(--accent-ink); text-transform: uppercase; }
.dark .section-head .mono { padding: .75em 1.1em; background: var(--accent); color: #fff; }
@media (max-width: 760px) { .section-head { flex-direction: column; gap: 10px; } }

/* ---------- hero (drawn by assets/js/hero.js) ---------- */
.hero { position: relative; height: 760vh; background: var(--black); }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-text { position: absolute; left: 0; top: 0; margin: 0; opacity: 0; will-change: transform, opacity; pointer-events: none; }
.hero-title { font: 400 calc(51 * var(--u)) / 1.32 var(--sans); letter-spacing: .01em; color: var(--white); white-space: nowrap; }
.hero-words { display: inline-grid; vertical-align: top; }
.hero-words > span { grid-area: 1 / 1; will-change: transform, opacity, filter; }
.hero-words > span { justify-self: start; padding: .04em .3em .08em; margin-left: -.1em; background: var(--accent); color: #fff; }   /* the changing word sits on a block of red */
.hero-intro, .hero-claim, .hero-tools { color: #000; text-align: center; }
.hero-intro { font: 600 calc(24 * var(--u)) / 1.15 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.hero-claim { font: 500 calc(19 * var(--u)) / 1.3 var(--sans); width: calc(360 * var(--u)); text-align: left; text-wrap: balance; }
.hero-tools { font: 600 calc(19 * var(--u)) / 1.4 var(--sans); width: calc(250 * var(--u)); white-space: pre-line; }
.hero-label { display: block; margin-bottom: .9em; font: 600 calc(11.5 * var(--u)) / 1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.hero-statement { font: 500 calc(26 * var(--u)) / 1.25 var(--sans); letter-spacing: -.01em; color: #000; width: calc(350 * var(--u)); text-wrap: balance; }
@media (max-width: 600px) {
  .hero-title { font-size: calc(21 * var(--u)); white-space: normal; width: calc(250 * var(--u)); }
  .hero-intro { font-size: calc(12.5 * var(--u)); width: calc(84 * var(--u)); white-space: normal; }
  .hero-claim { font-size: calc(11 * var(--u)); width: calc(88 * var(--u)); text-align: center; }
  .hero-tools { font-size: calc(11.5 * var(--u)); width: calc(150 * var(--u)); }
  .hero-label { font-size: calc(8.5 * var(--u)); }
  .hero-statement { font-size: calc(15.5 * var(--u)); width: calc(230 * var(--u)); text-align: center; }
}

/* ---------- projects: cue list ---------- */
/* pulled up one screen so it is already in place, on top of the hero, when the door finishes opening:
   hero.js keeps it invisible until the screen turns white, then fades it in (see HERO.projectsFade) */
.projects { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; background: var(--white); padding: clamp(84px, 11vw, 190px) 0 0; }
/* black under the last rows of the wave video, so no white hairline shows where it meets the dark section */
.projects::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: #000; }
.wave { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 1190 / 415; object-fit: cover; margin-top: clamp(40px, 6vw, 110px); background: #000; }
.cue {
  position: relative; display: grid; grid-template-columns: clamp(64px, 6vw, 110px) minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 2vw, 36px);
  padding: clamp(16px, 1.9vw, 34px) clamp(10px, 1vw, 18px); border-bottom: 2px solid var(--line); text-decoration: none; color: var(--ink);
  transition: background-color .25s ease, color .25s ease, padding .35s var(--ease-out);
}
.cue-n { font: 500 clamp(12px, 1.05vw, 17px) / 1 var(--mono); color: var(--grey); transition: color .25s ease; }
.cue-n::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .7em; border-radius: 50%; background: #9a9a9a; vertical-align: .05em; transition: background-color .2s ease; }
.cue-name { font: 700 clamp(22px, 3.1vw, 54px) / 1.05 var(--sans); letter-spacing: -.015em; }
.cue-tags { font: 400 clamp(12px, 1.05vw, 17px) / 1.35 var(--mono); color: var(--grey); transition: color .25s ease; }
.cue-go { font: 700 clamp(12px, 1vw, 16px) / 1 var(--mono); padding: .7em 1.1em; border: 2px solid currentColor; border-radius: 999px; opacity: .6; transition: opacity .2s ease, background-color .2s ease, color .2s ease; }
@media (hover: hover) {
  .cue:hover, .cue:focus-visible { background: var(--black); color: var(--white); padding-left: clamp(18px, 2.4vw, 44px); }
  .cue:hover .cue-n, .cue:hover .cue-tags, .cue:focus-visible .cue-n, .cue:focus-visible .cue-tags { color: #c4c4c4; }
  .cue:hover .cue-n::before, .cue:focus-visible .cue-n::before { background: #b00000; }
  .cue:hover .cue-go, .cue:focus-visible .cue-go { opacity: 1; background: var(--accent); color: var(--white); border-color: var(--accent); }
}
/* the "follow spot": a circle of light carrying the project photo */
.cue-spot {
  position: fixed; z-index: 30; left: 0; top: 0; width: clamp(240px, 27vw, 460px); aspect-ratio: 1; margin: calc(clamp(240px, 27vw, 460px) / -2) 0 0 calc(clamp(240px, 27vw, 460px) / -2);
  border-radius: 50%; background: #000 center / cover no-repeat; pointer-events: none; opacity: 0; transform: translate3d(-999px, -999px, 0) scale(.6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 60px rgba(255, 255, 255, .55), 0 0 140px rgba(255, 255, 255, .35);
  transition: opacity .25s ease;
}
.cue-spot.on { opacity: 1; }
@media (hover: none), (max-width: 760px) {
  .cue { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n n go" "name name go" "tags tags tags" "img img img"; row-gap: 8px; }
  .cue-n { grid-area: n; } .cue-name { grid-area: name; } .cue-tags { grid-area: tags; } .cue-go { grid-area: go; opacity: 1; }
  .cue::after { content: ""; grid-area: img; aspect-ratio: 16 / 9; margin-top: 8px; border-radius: 12px; background: #000 var(--img) center / cover no-repeat; }
  .cue-spot { display: none; }
}

/* ---------- about: three services, three beams ---------- */
.about { position: relative; background: var(--black); color: var(--white); padding: clamp(84px, 10vw, 180px) 0 clamp(70px, 9vw, 160px); overflow: hidden; }
.beams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 44px); margin-top: clamp(10px, 1vw, 20px); }
.beam-card { --fx: clamp(70px, 7vw, 120px); --fx-top: clamp(12px, 1.4vw, 24px); position: relative; padding: clamp(120px, 12vw, 210px) clamp(14px, 1.8vw, 34px) clamp(30px, 3vw, 56px); outline-offset: -4px; cursor: default; }
.beam-light {                                   /* the cone of light: soft-edged, with smoke drifting through it */
  position: absolute; z-index: 0; top: calc(var(--fx-top) + var(--fx) * .13); left: 50%; width: 150%; height: calc(100% - var(--fx-top) - var(--fx) * .13); transform: translateX(-50%);   /* starts at the lens */
  filter: blur(6px); opacity: .13; transition: opacity .6s ease; pointer-events: none;
}
.beam-light::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0, rgba(255, 255, 255, .62) 14%, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, .08) 100%);
  clip-path: polygon(calc(50% - var(--fx) * .4) 0, calc(50% + var(--fx) * .4) 0, 100% 100%, 0 100%);   /* as wide as the lens at the top */
  -webkit-mask: var(--smoke) 0 0 / 700px 700px; mask: var(--smoke) 0 0 / 700px 700px; animation: smoke-drift 46s linear infinite;
}
@keyframes smoke-drift { to { -webkit-mask-position: 700px 350px; mask-position: 700px 350px; } }
/* the source: only the lens is visible — an ellipse of light the beam falls from */
.beam-fixture { position: absolute; z-index: 2; top: var(--fx-top); left: 50%; width: var(--fx); height: auto; transform: translateX(-50%); overflow: visible; }
.beam-fixture .fx-lens { fill: #3d3d3d; stroke: none; transition: fill .5s ease, filter .5s ease; }   /* off: a plain grey ellipse, no outline */
.beam-card.on .fx-lens { fill: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .8)); }
.beam-card > :not(.beam-light):not(.beam-fixture) { position: relative; z-index: 1; }
.beam-n { font-size: clamp(12px, 1vw, 15px); color: #8f8f8f; text-transform: uppercase; transition: color .5s ease; }
.beam-card h3 { margin-top: 14px; font: 700 clamp(24px, 2.7vw, 46px) / 1.05 var(--sans); letter-spacing: -.02em; color: #8f8f8f; transition: color .5s ease; }
.beam-sub { margin-top: clamp(14px, 1.4vw, 24px); font: 500 clamp(16px, 1.45vw, 23px) / 1.3 var(--sans); color: #8f8f8f; transition: color .5s ease; }
.beam-card ul { margin-top: clamp(16px, 1.6vw, 28px); border-top: 1px solid #333; transition: border-color .5s ease; }
.beam-card li { padding: clamp(10px, .9vw, 15px) 0; border-bottom: 1px solid #2a2a2a; font: 400 clamp(14px, 1.15vw, 18px) / 1.4 var(--sans); color: #808080; transition: color .5s ease, border-color .5s ease; }
.beam-card.on .beam-light { opacity: 1; }
.beam-card.on .beam-n { color: #fff; }
.beam-n { width: fit-content; padding: .75em 1.1em; margin-left: -1.1em; transition: color .5s ease, background-color .5s ease; }
.beam-card.on .beam-n { background: var(--accent); }
.beam-card.on h3, .beam-card.on .beam-sub { color: #fff; }
.beam-card.on li { color: #ededed; border-color: #6a6a6a; }
.beam-card.on ul { border-color: #8a8a8a; }
@media (max-width: 760px) {
  .beams { grid-template-columns: 1fr; gap: 0; }
  .beam-card { padding-top: 110px; padding-bottom: 46px; }
  .beam-light { width: 130%; }
}

/* ---------- gallery: a dark room and a torch ---------- */
.room-section { position: relative; background: var(--black); color: var(--white); padding: clamp(40px, 5vw, 90px) 0 clamp(70px, 9vw, 160px); }
.room { position: relative; margin-top: clamp(10px, 1vw, 20px); touch-action: pan-y; --x: 30%; --y: 30%; --r: clamp(150px, 20vw, 330px); }
.room-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(120px, 21vw, 360px); gap: clamp(6px, .7vw, 12px); }
.room-grid figure { grid-column: span 4; overflow: hidden; }
.room-grid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.room-grid figure.zoom img { transform: scale(1.07); }
.room-grid figure:nth-child(4), .room-grid figure:nth-child(6) { grid-column: span 3; }
.room-grid figure:nth-child(5), .room-grid figure:nth-child(10), .room-grid figure:nth-child(11) { grid-column: span 6; }
/* with JS: the photos sit in the dark and a second, lit copy shows only inside the torch */
.room.torch > .room-grid:first-child { filter: brightness(.17) grayscale(1); }
.room-lit { position: absolute; inset: 0; pointer-events: none; -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, #000 28%, transparent 100%); mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, #000 28%, transparent 100%); }
@media (max-width: 760px) {
  .room-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 38vw; }
  .room-grid figure, .room-grid figure:nth-child(n) { grid-column: span 1; }
  .room-grid figure:nth-child(5), .room-grid figure:nth-child(11) { grid-column: span 2; }
}

/* ---------- contact: playable stage ---------- */
.contact { position: relative; background: var(--black); color: var(--white); overflow: hidden; }
.rig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.contact-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(36px, 5vw, 90px); padding: clamp(250px, 31vw, 560px) 20px clamp(40px, 5vw, 90px); }
.talk { width: min(100%, clamp(280px, 28vw, 460px)); display: grid; gap: clamp(14px, 1.6vw, 22px); }
.talk label { display: block; }
.talk input, .talk textarea {
  display: block; width: 100%; height: clamp(40px, 2.9vw, 46px); padding: 0 clamp(14px, 1.6vw, 22px); margin: 0;
  background: rgba(0, 0, 0, .35); border: 1px solid #e5e5e5; border-radius: 0; outline: 0; resize: none; appearance: none;
  font: 500 clamp(16px, 1.5vw, 22px) / 1.2 var(--sans); color: var(--white); backdrop-filter: blur(3px);
}
.talk textarea { padding-top: .45em; overflow: hidden; }
.talk input::placeholder, .talk textarea::placeholder { color: #cfcfcf; opacity: 1; }
.talk input:focus-visible, .talk textarea:focus-visible { outline: 0; border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 24px rgba(255, 255, 255, .35); }
.talk .invalid { border-color: #ff7a6c; }
.talk button { height: clamp(40px, 2.9vw, 46px); border: 0; cursor: pointer; background: var(--accent-ink); color: #fff; font: 500 clamp(16px, 1.5vw, 22px) / 1 var(--sans); transition: background-color .2s ease; }
.talk button:hover { background: #8a0000; }
.talk-note { min-height: 1.2em; font-size: 14px; }

/* the lighting desk */
.desk {
  width: min(100%, 860px); padding: clamp(16px, 1.6vw, 24px) clamp(16px, 1.8vw, 28px) clamp(16px, 1.8vw, 26px);
  background: linear-gradient(180deg, rgba(26, 26, 26, .94), rgba(10, 10, 10, .94)); border: 1px solid #3a3a3a; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.desk-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: #d6d6d6; }
.desk-led { width: 8px; height: 8px; border-radius: 50%; background: #b00000; }
.desk-row { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #262626; }
.desk-label { font-size: 11px; text-transform: uppercase; color: #a8a8a8; }
.desk-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-key {
  min-width: 44px; height: 40px; padding: 0 12px; border: 1px solid #4a4a4a; border-radius: 7px; cursor: pointer;
  background: linear-gradient(180deg, #2c2c2c, #191919); color: #d6d6d6; font: 600 12px / 1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 0 #000; transition: transform .08s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.desk-key:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.desk-key[aria-pressed="true"] { background: #f2f2f2; color: #000; border-color: #fff; box-shadow: 0 0 18px rgba(255, 255, 255, .55), inset 0 1px 0 #fff; }
.desk-key.swatch { position: relative; min-width: 40px; padding: 0; }
.desk-key.swatch::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--c); }
.desk-key.swatch[aria-pressed="true"] { background: #101010; border-color: var(--c); box-shadow: 0 0 18px var(--c); }   /* the lamp is on */
.desk-row-master { grid-template-columns: 84px 1fr auto auto; }
.desk-fader { width: 100%; height: 40px; margin: 0; background: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.desk-fader::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #000; box-shadow: inset 0 0 0 1px #4a4a4a; }
.desk-fader::-moz-range-track { height: 6px; border-radius: 3px; background: #000; box-shadow: inset 0 0 0 1px #4a4a4a; }
.desk-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 34px; margin-top: -14px; border-radius: 5px; border: 1px solid #fff; background: linear-gradient(180deg, #fafafa 0 46%, #000 46% 54%, #d8d8d8 54%); }
.desk-fader::-moz-range-thumb { width: 22px; height: 34px; border-radius: 5px; border: 1px solid #fff; background: linear-gradient(180deg, #fafafa 0 46%, #000 46% 54%, #d8d8d8 54%); }
@media (max-width: 600px) {
  .contact-inner { padding-top: 78vw; }
  .desk-row { grid-template-columns: 1fr; gap: 6px; }
  .desk-row-master { grid-template-columns: 1fr 1fr; }
  .desk-row-master .desk-label { grid-column: 1 / -1; } .desk-row-master .desk-fader { grid-column: 1 / -1; }
  .desk-key { flex: 1 0 auto; }
  [data-desk="fixtures"] { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
  [data-desk="fixtures"] .desk-key { min-width: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cue, .beam-light, .beam-card *, .beam-fixture *, .room-grid img { transition: none; }
  .beam-light::before { animation: none; }
}
