@font-face {
  font-family: 'IBM Plex Mono';
  src: url(fonts/IBMPlexMono-normal-400.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(fonts/IBMPlexMono-normal-500.woff2) format('woff2');
  font-weight: 500;
  font-display: swap;
}

/* Page-specific pieces, built on house-style.css (same tokens, square house style). */

/* ---------- The film, first thing on the page ---------- */
.hero-film { margin-top: 28px; }
.film-stage { aspect-ratio: 1344 / 768; background: var(--panel); }
.film-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-film + .opening { margin-top: 56px; }

/* ---------- The Orsane shop: the storefront from the film ---------- */
.shop {
  --s-bg: #ffffff; --s-ink: #1c1916; --s-grey: #706a63; --s-line: #e2ddd6;
  --didot: Didot, 'Didot LT STD', 'Bodoni 72', 'Bodoni Moda', 'Instrument Serif', serif;
  --avenir: 'Avenir Next', Avenir, 'Instrument Sans', system-ui, sans-serif;
  margin-top: 48px; background: var(--s-bg); color: var(--s-ink); font-family: var(--avenir);
  box-shadow: 0 40px 120px -40px #000c;
}
.shop button { color: inherit; font: inherit; }
.shop :focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; }
.shop .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.shop-head { display: flex; align-items: center; gap: 34px; height: 64px; padding: 0 48px; border-bottom: 1px solid var(--s-line); }
.shop-logo { font: 400 32px / 1 var(--didot); letter-spacing: 0.02em; margin-right: auto; }
.shop-nav { display: flex; gap: 34px; }
.shop-nav button {
  position: relative; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-grey);
}
.shop-nav button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: var(--s-ink); transform: scaleX(0); transition: transform 0.3s ease; }
.shop-nav button:hover, .shop-nav button[aria-pressed='true'] { color: var(--s-ink); }
.shop-nav button[aria-pressed='true']::after { transform: none; }

.shop-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 31vw, 440px); }

/* Stage: the film's 875 x 704 proportions as a minimum; it grows to the panel's height */
.shop-stage { position: relative; width: 100%; aspect-ratio: 875 / 704; overflow: hidden; align-self: stretch; }
/* Each piece is sized against whichever side of the stage runs out first (container units) */
.stage-box { position: absolute; inset: 0; container-type: size; }
.piece {
  position: absolute; left: 50%; top: 50%; width: auto; height: auto;
  transform: translate(-50%, -50%); transition: opacity 0.45s ease; pointer-events: none;
}
.piece.is-hidden { opacity: 0; }
.shop-stage[data-kind='bag'] .piece { height: min(70cqh, 74cqw * 1.253); }
.shop-stage[data-kind='ring'] .piece { height: min(66cqh, 66cqw * 1.392); }
.shop-stage[data-kind='facet'] .piece { width: min(80cqw, 70cqh * 2.294); }

/* Voir sur le modèle: FACET only. On a model the photo fills the stage */
.wear {
  position: absolute; left: 50%; bottom: 18px; z-index: 2; transform: translateX(-50%);
  display: none; align-items: center; gap: 8px; padding: 5px 5px 5px 16px; border: 1px solid var(--s-line); border-radius: 999px;
  background: #ffffffe0; backdrop-filter: blur(8px); white-space: nowrap;
}
.shop-stage[data-kind='facet'] .wear { display: flex; }
.wear-label { margin-right: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--s-grey); }
.wear button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: #f3f1ee; cursor: pointer; transition: transform 0.2s; }
.wear button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wear button:hover { transform: scale(1.06); }
.wear button[aria-pressed='true'] { outline: 1.4px solid var(--s-ink); outline-offset: 2px; }
.shop-stage .piece.photo { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-fit: cover; }

/* Panel */
.shop-panel { margin: 26px 0 30px; padding: 0 48px 0 30px; border-left: 1px solid var(--s-line); display: flex; flex-direction: column; }
.shop-title { margin: 6px 0 0; font: 400 54px / 1 var(--didot); letter-spacing: 0.01em; }
.shop-sub { margin: 10px 0 0; font-size: 15px; color: var(--s-grey); }
.shop-group { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--s-line); }
.shop-group:first-child { margin-top: 28px; }
.shop-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shop-label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-grey); }
.shop-value { margin: 0; font: 400 21px / 1.2 var(--didot); text-align: right; transition: opacity 0.2s; }
.shop-value.fade { opacity: 0; }
.swatches { position: relative; display: flex; gap: 20px; margin-top: 16px; padding: 7px; }
.swatches .sel {
  position: absolute; left: 0; top: 0; width: 62px; height: 62px; border: 1.4px solid var(--s-ink); border-radius: 50%; opacity: 0.8;
  transform: translateX(calc(var(--x, 7px) - 7px)); transition: transform 0.45s cubic-bezier(.6, 0, .25, 1); pointer-events: none;
}
.swatch-btn { display: block; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch-btn img { display: block; width: 100%; height: 100%; transition: transform 0.25s ease; }
.swatch-btn:hover img { transform: scale(1.06); }

/* Swatch styles: B material discs, C material tiles, D flat dots (A = the film's spheres, the base rules above) */
.swatch-btn img { object-fit: cover; }
.shop[data-sw='b'] .swatch-btn img { border-radius: 50%; box-shadow: inset 0 0 0 1px #0000001a; }
.shop[data-sw='b'] .swatch-btn { overflow: hidden; }

/* What made the photo, under the shop */
.shop-caption { margin: 14px 0 0; font: 12px / 1.5 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.shop-caption b { margin-right: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 1100px) {
  .shop-head { padding: 0 28px; }
  .shop-panel { padding: 0 28px 0 24px; }
  .shop-title { font-size: 44px; }
}
@media (max-width: 800px) {
  .hero-film { margin-top: 16px; }
  .hero-film + .opening { margin-top: 36px; }
  .shop-head { flex-wrap: wrap; height: auto; padding: 10px 16px 0; gap: 0 24px; }
  .shop-logo { font-size: 26px; }
  .shop-nav { order: 3; width: 100%; gap: 24px; border-top: 1px solid var(--s-line); }
  .shop-body { grid-template-columns: 1fr; }
  .shop-stage { aspect-ratio: 1 / 0.95; }
  .shop-panel { margin: 0; padding: 22px 16px 26px; border-left: 0; border-top: 1px solid var(--s-line); }
  .shop-title { font-size: 38px; }
  .swatches { gap: 14px; }
}
@media (max-width: 380px) {
  .wear-label { display: none; }
  .swatches { gap: 10px; }
  .shop-value { font-size: 18px; }
}

/* This title is longer than most: step it down on phones so it reads in full */
@media (max-width: 560px) { .bar-title { font-size: 19px; } }
@media (max-width: 380px) { .bar-home .bar-section { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .piece, .swatches .sel, .shop-value, .shop-nav button::after { transition: none; }
}

/* The glossary tip in the intro opens under the paragraph, inside its width, so it never widens the page */
.opening .intro { position: relative; }
.opening .intro .term { position: static; }
.opening .intro .term-tip { left: 0; max-width: min(320px, 100%); }

/* The statement is the intro's last paragraph now: keep it at statement size (house rule shrinks last paragraphs) */
.opening .intro > p.statement { margin-bottom: 0; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.12; }
@media (max-width: 800px) { .opening .intro > p.statement { font-size: 26px; } }
/* Mid widths: the long title needs room next to the actions */
@media (min-width: 821px) and (max-width: 1080px) { .bar-title { font-size: 22px; } }
@media (min-width: 821px) and (max-width: 1000px) { .bar-home .bar-section { display: none; } }

/* How dialog: placeholder until the narrated film is made (Phase B) */

/* site footer: the shared runtime mounts its tool links in [data-exploration-controls] */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 22px 4.2%; border-top: 1px solid var(--rule); background: var(--exploration-footer-bg);
  font: 400 12px / 1.4 'IBM Plex Mono', ui-monospace, monospace; color: var(--muted);
}
.foot-id { letter-spacing: 0.1em; text-transform: uppercase; }
.foot-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.foot-link:hover { color: var(--accent); }
.foot [data-exploration-controls] { flex: 1 1 320px; display: flex; justify-content: flex-end; border-top: 0; background: none; } /* the footer draws the rule and background */
