/* ==========================================================================
   sections — hero → atelier → loupe → calibres → bench → contact → footer
   ========================================================================== */

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  gap: clamp(1.1rem, 3vh, 2.2rem);
  padding: calc(var(--gut) * 2 + 3rem) var(--gut) clamp(1.4rem, 4vh, 2.6rem);
}

.hero__eyebrow { display: flex; align-items: center; flex-wrap: wrap; }

.hero__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-hero);
  line-height: 0.96;
  letter-spacing: -0.018em;
}

.hero__em { font-style: italic; color: var(--blued); }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  padding-top: clamp(0.7rem, 2vh, 1.2rem);
  border-top: 1px solid var(--line);
}

.hero__sub { max-width: 48ch; color: var(--light-2); }
.hero__cue { display: flex; align-items: center; gap: 0.8em; }

.hero__cue-rule {
  position: relative;
  display: block;
  width: clamp(40px, 8vw, 90px);
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}

.hero__cue-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blued);
  transform-origin: left;
  animation: sweep 2.8s var(--detent) infinite;
}

@keyframes sweep {
  0%   { transform: scaleX(0); transform-origin: left; }
  45%  { transform: scaleX(1); transform-origin: left; }
  55%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ── atelier ───────────────────────────────────────────────────────────── */

.atelier { padding: var(--sec) var(--gut); display: grid; gap: clamp(2.5rem, 7vh, 5rem); }

.atelier__body {
  max-width: 24ch;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -0.012em;
}

.atelier__grid { display: grid; gap: clamp(1.6rem, 4vw, 3.2rem); grid-template-columns: 1fr; max-width: 1100px; }
@media (min-width: 760px) { .atelier__grid { grid-template-columns: repeat(3, 1fr); } }

.atelier__grid p { color: var(--light-2); max-width: 36ch; }

.atelier__h {
  margin-bottom: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--blued);
  color: var(--blued);
}

/* ── the loupe ─────────────────────────────────────────────────────────────
   minmax(0, 1fr): a grid item's default min-width is min-CONTENT, and the
   spec table inside would otherwise force this column wider than a phone.
   ------------------------------------------------------------------------ */

.loupe {
  padding: var(--sec) var(--gut);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.8rem, 4.5vh, 3rem);
}

.loupe__head { display: grid; gap: clamp(0.9rem, 2.4vh, 1.6rem); max-width: 62ch; }

.loupe__h {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.012em;
}

.loupe__lead { max-width: 54ch; color: var(--light-2); font-size: var(--t-lead); line-height: 1.4; }

.loupe__stage {
  position: relative;
  margin: 0;
  min-width: 0;
  height: clamp(420px, 74svh, 860px);
  background: var(--graphite-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.loupe__stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* Vertical page scrolling stays available until the stage is armed —
     see the note on .loupe__stage.is-live below. */
  touch-action: pan-y;
}

/* ── the arming gate ───────────────────────────────────────────────────────
   A canvas that swallows the wheel is a scroll trap: this stage is 74svh
   tall, so a reader scrolling down the page would simply stop dead over it.

   So the stage is inert until it is armed by a click, a tap or keyboard
   focus. Before that, the wheel scrolls the page as usual. After it, the
   wheel zooms and touch-action is released for pinch. Escape, or a click
   anywhere else, disarms it. This is the same contract an embedded map uses,
   for the same reason.
   ------------------------------------------------------------------------ */

.loupe__gate {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.9rem;
  background: rgba(35, 39, 44, 0.55);
  backdrop-filter: blur(1px);
  cursor: pointer;
  transition: opacity 0.4s var(--sweep);
}

.loupe__stage.is-live .loupe__gate { opacity: 0; pointer-events: none; }
.loupe__stage.is-live canvas { touch-action: none; }

.gate__loupe {
  width: 54px; height: 54px;
  border: 1px solid var(--blued);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blued);
  transition: transform 0.5s var(--sweep);
}

.loupe__gate:hover .gate__loupe { transform: scale(1.09); }
.gate__label { color: var(--light-2); }

.loupe__hud {
  position: absolute;
  top: clamp(0.7rem, 2vh, 1.2rem);
  left: clamp(0.7rem, 2vw, 1.3rem);
  z-index: 3;
  display: grid;
  gap: 0.15rem;
  pointer-events: none;
}

.hud__power { color: var(--blued); font-size: 1rem; letter-spacing: 0.08em; }
.hud__where { color: var(--light); }
.hud__note { color: var(--light-4); }

.loupe__nav {
  position: absolute;
  right: clamp(0.7rem, 2vw, 1.3rem);
  bottom: clamp(0.7rem, 2vh, 1.2rem);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: min(60%, 460px);
}

.loupe__nav button {
  padding: 0.4em 0.8em;
  border: 1px solid var(--line-2);
  background: rgba(35, 39, 44, 0.72);
  font-family: var(--f-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-3);
  transition: color 0.35s var(--sweep), border-color 0.35s var(--sweep),
              background-color 0.35s var(--sweep);
}

.loupe__nav button:hover { color: var(--light); border-color: var(--light-3); }
.loupe__nav button.is-on { color: var(--blued); border-color: var(--blued); background: var(--blued-3); }

.loupe__hint {
  position: absolute;
  left: 50%;
  bottom: clamp(0.7rem, 2vh, 1.2rem);
  transform: translateX(-50%);
  z-index: 3;
  color: var(--light-4);
  pointer-events: none;
  transition: opacity 0.5s var(--sweep);
}

@media (max-width: 760px) { .loupe__hint { display: none; } }

/* ── the spec table ────────────────────────────────────────────────────── */

.loupe__spec { border-top: 1px solid var(--line); padding-top: 1rem; }
.loupe__spec summary { cursor: pointer; color: var(--light-3); transition: color 0.3s var(--sweep); }
.loupe__spec summary:hover { color: var(--blued); }
.loupe__spec > * + * { margin-top: 1rem; }

.loupe__spec table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 0.95rem; }
.loupe__spec th, .loupe__spec td { text-align: left; padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--line); }
.loupe__spec th { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: 0.12em; text-transform: uppercase; color: var(--light-3); font-weight: 400; }
.loupe__spec p { color: var(--light-3); font-size: 0.95rem; max-width: 60ch; }

/* ── calibres ──────────────────────────────────────────────────────────── */

.cal { padding: var(--sec) var(--gut); display: grid; gap: clamp(2rem, 5vh, 3.5rem); }
.cal__head { display: grid; gap: clamp(0.9rem, 2.4vh, 1.6rem); }

.cal__h {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.012em;
}

.cal__list { display: grid; gap: clamp(1rem, 2.4vw, 1.8rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .cal__list { grid-template-columns: repeat(3, 1fr); } }

.cal__list li {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  background: var(--graphite-2);
  border-top: 1px solid var(--blued);
  transition: background-color 0.45s var(--sweep);
}

.cal__list li:hover { background: var(--graphite-3); }
.cal__n { color: var(--light-4); }

.cal__t {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.1;
}

.cal__d { color: var(--light-2); max-width: 32ch; }

.cal__spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.cal__spec div { display: grid; gap: 0.1rem; }
.cal__spec dd { font-size: 1.05rem; }

/* ── the bench ─────────────────────────────────────────────────────────── */

.bench { padding: var(--sec) var(--gut); display: grid; gap: clamp(2rem, 5vh, 3.5rem); }
.bench__head { display: grid; gap: clamp(0.9rem, 2.4vh, 1.6rem); }

.bench__h {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-h2);
  line-height: 1;
  letter-spacing: -0.012em;
}

.band { display: grid; gap: clamp(1rem, 2.4vw, 1.8rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .band { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .band { grid-template-columns: repeat(4, 1fr); } }

.band__item { display: grid; gap: 0.45rem; align-content: start; }

.band__item video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--graphite-2);
  filter: grayscale(0.7) contrast(1.05);
  transition: filter 0.6s var(--sweep);
}

.band__item:hover video { filter: grayscale(0) contrast(1); }

.band__t {
  margin-top: 0.3rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.15;
}

/* ── contact ───────────────────────────────────────────────────────────── */

.contact { padding: var(--sec) var(--gut); display: grid; gap: clamp(1.6rem, 4.5vh, 3rem); }

.contact__h {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--t-hero);
  line-height: 0.96;
  letter-spacing: -0.018em;
}

.contact__em { font-style: italic; color: var(--blued); }

.rows { display: grid; max-width: 900px; }
.rows li { border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: 9rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(0.85rem, 2.4vh, 1.35rem) 0;
  transition: color 0.4s var(--sweep);
}

@media (max-width: 620px) { .row { grid-template-columns: 6rem 1fr auto; } }

.row__v { font-size: clamp(1.05rem, 2.2vw, 1.6rem); }

/* Label and value translate; the arrow holds. Shifting the whole row would
   carry the arrow past the section edge, and animating padding would lay the
   row out on every frame. */
.row__k, .row__v { transition: transform 0.5s var(--sweep); }
a.row:hover { color: var(--blued); }
a.row:hover .row__k, a.row:hover .row__v { transform: translateX(0.7rem); }

.row__a { color: var(--light-4); transition: color 0.4s var(--sweep), transform 0.5s var(--sweep); }
a.row:hover .row__a { color: var(--blued); transform: translate(0.2rem, -0.2rem); }

/* ── footer ────────────────────────────────────────────────────────────── */

.foot {
  padding: clamp(2rem, 6vh, 4rem) var(--gut) clamp(1.5rem, 4vh, 2.5rem);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.2rem;
}

.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; }
.foot__note { max-width: 72ch; color: var(--light-4); letter-spacing: 0.08em; }

[data-rise] { will-change: transform, opacity; }
