/* Lévrier: landing gate + dashboard. Same tokens as styles.css. */
:root {
  --nuit: #0B0D12;
  --bleu: #16233F;
  --champagne: #C8B07A;
  --champagne-hi: #E6D4A4;
  --ivoire: #F2ECE1;
  --brume: #9AA1AA;
  --glass: rgb(11 13 18 / .55);
  --glass-line: rgb(242 236 225 / .10);

  --f-display: "Italiana", "Didot", "Bodoni 72", serif;
  --f-body: "Inter Tight", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;

  --gutter: clamp(12px, 1.6vw, 24px);
  --gap: 6px;
  --radius: 6px;
  --bar: 56px;
  --frame: 1320px;                       /* the dashboard and every room share one width */
  --frame-y: clamp(14px, 3.2vh, 40px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--nuit); color: var(--ivoire); }
body { font: 300 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--champagne); outline-offset: 3px; }
.label { font: 400 11px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brume); margin: 0; }
.label b { color: var(--champagne); font-weight: 400; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Background film: stacked clips that crossfade ─────────────────── */
.film { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--nuit); }
.film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film.blur img { filter: blur(18px) saturate(.8); transform: scale(1.08); }
.film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--ease-in-out); }
.film video.on { opacity: 1; }
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgb(11 13 18 / .35), rgb(11 13 18 / .82)); transition: opacity 1s var(--ease-out); }
.film.blur video { filter: blur(18px) saturate(.8); transform: scale(1.08); }
.film.blur::after { background: rgb(11 13 18 / .72); }

/* ── Glass tile (the 363 building block) ───────────────────────────── */
.tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--glass-line); }
.logo-tile { width: 80px; height: 80px; display: grid; place-items: center; }
.logo-tile img { width: 46px; height: auto; }

/* Weather */
.wx { display: flex; align-items: center; gap: 14px; padding: 0 18px; height: 80px; min-width: 0; }
.wx .where { display: grid; gap: 4px; min-width: 0; }
.wx .where .label { white-space: nowrap; }
.wx .cond { font: 400 15px/1.2 var(--f-body); color: var(--ivoire); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx .temp { font: 400 34px/1 var(--f-display); margin-left: auto; font-variant-numeric: tabular-nums; }
.wx svg { width: 26px; height: 26px; flex: none; stroke: var(--champagne); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.wx-mini { display: grid; align-content: center; justify-items: start; gap: 6px; padding: 0 16px; height: 80px; }
.wx-mini .v { font: 400 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }

/* ══ LANDING ═════════════════════════════════════════════════════════ */
.gate { position: relative; z-index: 1; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: var(--gutter); }
.gate-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gap); }
.gate-top .wx { width: min(340px, calc(100vw - 80px - var(--gutter) * 2 - var(--gap))); }
.gate-mid { display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px 0; }
.gate-mid h1 { font: 400 clamp(2.75rem, 1.4rem + 5.4vw, 6.5rem)/.95 var(--f-display); margin: 18px 0 0; letter-spacing: -.01em; text-wrap: balance; }
.gate-mid p.lede { max-width: 44ch; margin: 22px auto 0; color: rgb(242 236 225 / .78); font-size: 15px; }
.gate-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; }
.gate-bottom .right { justify-self: end; }
.gate-bottom .left { justify-self: start; }
.text-link { position: relative; font: 400 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 14px 0; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--champagne); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .text-link:hover::after { transform: scaleX(1); } }
.text-link:focus-visible::after { transform: scaleX(1); }

/* ── The ignition: START / STOP with the Lévrier monogram ─────────── */
.ignition-wrap { display: grid; justify-items: center; gap: 18px; }
.ignition {
  --size: clamp(128px, 11vw, 168px);
  position: relative; width: var(--size); height: var(--size); padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 50%; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ignition:focus-visible { outline: none; }
.ignition:focus-visible .bezel { box-shadow: 0 0 0 2px var(--nuit), 0 0 0 3px var(--champagne), 0 18px 40px rgb(0 0 0 / .6); }

/* Tick ring: 36 ticks that light up in the ignition sweep */
.ignition .ticks { position: absolute; inset: -18%; width: 136%; height: 136%; overflow: visible; pointer-events: none; }
.ignition .ticks line { stroke: rgb(242 236 225 / .22); stroke-width: 1.4; stroke-linecap: round; transition: stroke .18s ease; }
.ignition .ticks line.lit { stroke: var(--champagne-hi); }
.ignition .ticks line.major { stroke-width: 2.2; }

/* Machined bezel */
.ignition .bezel { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, #2a2d33, #6b6f76 12%, #2a2d33 24%, #15171b 40%, #7d8189 55%, #23262b 68%, #3a3d43 84%, #2a2d33);
  box-shadow: 0 18px 40px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .18); }
.ignition .bezel::before { content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #191b20, #0c0d10 70%); box-shadow: inset 0 2px 6px rgb(0 0 0 / .8); }
/* Halo: the ignition glow, opacity only */
.ignition .halo { position: absolute; inset: -6%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgb(200 176 122 / .55) 0%, rgb(200 176 122 / .18) 45%, transparent 70%); }

/* The cap you press */
.ignition .cap { position: absolute; inset: 13%; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 4%;
  background: radial-gradient(circle at 50% 30%, #2b2e35, #121318 72%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 -6px 12px rgb(0 0 0 / .6), 0 3px 6px rgb(0 0 0 / .6);
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out); }
.ignition .cap img { width: 30%; height: auto; opacity: .95; }
.ignition .cap .words { display: grid; justify-items: center; line-height: 1; }
.ignition .cap .w1, .ignition .cap .w3 { font: 500 calc(var(--size) * .085)/1 var(--f-body); letter-spacing: .08em; color: var(--ivoire); }
.ignition .cap .w2 { font: 400 calc(var(--size) * .05)/1.3 var(--f-mono); letter-spacing: .2em; color: var(--brume); }
.ignition .cap .led { position: absolute; bottom: 14%; width: 14%; height: 2px; border-radius: 2px; background: #3a2a1a; transition: background .2s ease, box-shadow .2s ease; }
.ignition:active .cap, .ignition.pressed .cap { transform: scale(.95); box-shadow: inset 0 2px 8px rgb(0 0 0 / .8), 0 1px 2px rgb(0 0 0 / .6); }
.ignition.lit .cap .led { background: var(--champagne-hi); box-shadow: 0 0 10px var(--champagne); }


.press-start { font: 400 11px/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ivoire); }
.press-start i { font-style: normal; color: var(--champagne); }
.blink { animation: blink 1.6s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: .45; } }

/* Ignition sequence overlays */
.streak { position: fixed; left: 0; right: 0; top: 50%; height: 1px; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--champagne) 35%, var(--ivoire) 65%, transparent); }
.wipe { position: fixed; inset: 0; z-index: 4; background: var(--nuit); pointer-events: none; clip-path: circle(0% at 50% 80%); }

@media (max-width: 599px) {
  .gate-bottom { grid-template-columns: 1fr; justify-items: center; }
  .gate-bottom .left, .gate-bottom .right { justify-self: center; }
  .gate-bottom .left { order: 3; }
  .gate-top .wx { flex: 1; width: auto; padding: 0 12px; gap: 10px; }
  .gate-top .wx .temp { font-size: 28px; }
}

/* ══ DASHBOARD ═══════════════════════════════════════════════════════ */
.dash { position: relative; z-index: 1; min-height: 100svh; padding: var(--frame-y) var(--gutter) var(--bar); }
.grid { display: grid; gap: var(--gap); width: 100%; max-width: var(--frame); margin: 0 auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 80px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .62fr);
  height: calc(100svh - var(--bar) - var(--frame-y) * 1.6); min-height: 620px; }
/* placements */
.a-hero    { grid-column: 1 / 9;  grid-row: 1 / 3; }
.a-logo    { grid-column: 1 / 2;  grid-row: 1; position: relative; z-index: 2; width: 80px; }
.a-wx1     { grid-column: 9 / 10; grid-row: 1; }
.a-wx2     { grid-column: 10 / 11; grid-row: 1; }
.a-wx3     { grid-column: 11 / 13; grid-row: 1; }
.a-gallery { grid-column: 9 / 13; grid-row: 2 / 4; }
.a-view    { grid-column: 1 / 5;  grid-row: 3 / 5; }
.a-who     { grid-column: 5 / 9;  grid-row: 3 / 5; }
.a-car1    { grid-column: 9 / 10; grid-row: 4; }
.a-car2    { grid-column: 10 / 11; grid-row: 4; }
.a-car3    { grid-column: 11 / 13; grid-row: 4; }
.card-body { display: block; }
.a-hero .card-body { padding-top: 104px; }

.card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 0; padding: clamp(16px, 1.6vw, 24px); isolation: isolate; }
.card .bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.card .bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.1s var(--ease-out); }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(11 13 18 / .05) 30%, rgb(11 13 18 / .78)); }
.card h2 { font: 400 clamp(1.6rem, .9rem + 1.6vw, 2.75rem)/1 var(--f-display); margin: 0; letter-spacing: -.005em; }
.card.big h2 { font-size: clamp(2.2rem, 1rem + 2.8vw, 4.4rem); }
.card p { margin: 12px 0 0; max-width: 46ch; color: rgb(242 236 225 / .8); font-size: 14px; }
.card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.card .arrow { width: 28px; height: 28px; display: grid; place-items: center; transition: transform .25s var(--ease-out); }
.card .arrow svg { width: 16px; height: 16px; stroke: var(--ivoire); fill: none; stroke-width: 1.4; }
.badge { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 4px; background: var(--champagne); display: grid; place-items: center; }
.badge svg { width: 16px; height: 16px; stroke: var(--nuit); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card.thumb { padding: 12px; }
.card.thumb .label { color: var(--ivoire); }
@media (hover: hover) and (pointer: fine) {
  a.card:hover .bg img { transform: scale(1.05); }
  a.card:hover .arrow { transform: translate(3px, -3px); }
}
a.card:focus-visible { outline-offset: -3px; }

/* Bottom bar: close + private viewing */
.dash-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; height: var(--bar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gutter); }
.dash-bar .right { justify-self: end; }
.close-pill { display: inline-flex; align-items: center; gap: 40px; height: 40px; padding: 0 16px; border-radius: var(--radius);
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--glass-line);
  font: 400 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
@media (hover: hover) and (pointer: fine) { .close-pill:hover { background: var(--champagne); color: var(--nuit); } }
.credits { font: 400 10px/1.4 var(--f-mono); letter-spacing: .08em; color: rgb(154 161 170 / .7); }

/* Tile entrance: armed only when JS + motion are available */
.js-motion [data-tile] { clip-path: inset(0 0 100% 0); }

/* Tablet: 6 columns, natural height */
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; height: auto; min-height: 0; }
  .a-logo { grid-column: 1 / 2; grid-row: 1; }
  .a-wx1 { grid-column: 2 / 3; grid-row: 1; } .a-wx2 { grid-column: 3 / 4; grid-row: 1; } .a-wx3 { grid-column: 4 / 7; grid-row: 1; }
  .a-hero { grid-column: 1 / -1; grid-row: auto; min-height: 420px; }
  .a-hero .card-body { padding-top: 0; }
  .a-gallery { grid-column: 1 / -1; grid-row: auto; min-height: 340px; }
  .a-view, .a-who { grid-column: span 3; grid-row: auto; min-height: 260px; }
  .a-car1, .a-car2, .a-car3 { grid-column: span 2; grid-row: auto; min-height: 150px; }
  .a-logo, .a-wx1, .a-wx2, .a-wx3 { min-height: 80px; }
}
/* Phone */
@media (max-width: 599px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .a-logo { grid-column: 1 / 2; } .a-wx3 { grid-column: 2 / 5; grid-row: 1; }
  .a-wx1 { grid-column: 1 / 3; grid-row: 2; } .a-wx2 { grid-column: 3 / 5; grid-row: 2; }
  .a-hero, .a-gallery, .a-view, .a-who { grid-column: 1 / -1; }
  .a-hero { min-height: 380px; } .a-view, .a-who { min-height: 220px; }
  .a-car1, .a-car2 { grid-column: span 2; } .a-car3 { grid-column: 1 / -1; }
  .a-logo { width: auto; }
  .dash-bar { background: linear-gradient(180deg, transparent, rgb(11 13 18 / .9) 40%); }
  .dash-bar { grid-template-columns: 1fr auto; }
  .dash-bar .credits { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .film video { transition: none; }
  .blink { animation: none; }
  .card .bg img, .card .arrow { transition: none; }
}

/* Page to page: the same quiet crossfade the rooms use (room.css). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .32s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
