/* Baaelith Studio : direction « Éclipse » (noir profond, lune rouge) avec les métadonnées en mono.
   Chargé après le kit (system.css, motion.css, layout.css, icon.css) : les jetons ci-dessous gagnent. */

@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/cormorant-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* the palette from the logo (start.mjs brand, then the inverse made a step darker for a dark page) */
:root {
  --p-bg: #070b0a; --p-surface: #111615; --p-ink: #e9e3da; --p-muted: #9a958e;
  --p-accent: #b3182a; --p-accent-ink: #ffffff; --p-action: #c41e30; --p-action-ink: #ffffff;
  --p-inv-bg: #030505; --p-inv-surface: #0d1110; --p-inv-ink: #e9e3da; --p-inv-muted: #9a958e;
  --p-inv-accent: #c41e30; --p-inv-accent-ink: #ffffff; --p-inv-action: #c41e30; --p-inv-action-ink: #ffffff;
  --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.012em;
  --display-tracking-xl: -0.018em;
  --ly-scale: 1.12;
  --p-band-muted: #b9b3ab;
  /* the text sizes in rem, so a reader's own browser font size is honoured (same values at 16px) */
  --t-label: .8125rem; --t-small: .875rem; --t-body: 1rem; --t-lead: 1.125rem; --t-card: 1.125rem; --t-h3: 1.5rem;
  color-scheme: dark;
}
@media (min-width: 1024px) { :root { --t-lead: 1.25rem; --t-card: 1.25rem; --t-h3: 1.75rem; } }
html, body { background: var(--p-bg); }

/* the focus ring in bone: the red alone is under 3:1 on the black */
:focus-visible { outline-color: var(--p-ink); }

/* the B metadata: mono, small capitals by letter-spacing, used for labels, numbers and status lines */
.t-mono { font-family: var(--font-mono); font-size: var(--t-label); line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero__kicker.t-mono { font-size: var(--t-label); color: inherit; }
.hero__kicker .ic { width: 16px; height: 16px; }

/* the logo in the bar: the crescent in its ring, the name in the display face, spaced like the logo */
.nav__logo { gap: 10px; font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; font-size: 17px; }
.nav__logo .moon { width: 28px; height: 28px; flex: none; }
.footer .nav__logo { font-size: 22px; }
.footer .nav__logo .moon { width: 36px; height: 36px; }

/* the language switch: a plain word in the bar, the other language */
.nav__lang { font-family: var(--font-mono); letter-spacing: .08em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* frames that hold the client's logo on the black, not a photograph */
.frame--logo { background: var(--p-bg); }
.frame--logo > .frame__img { object-fit: contain; padding: clamp(24px, 6vw, 72px); }

/* a fact list under a split's text */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.facts li { display: flex; align-items: center; gap: var(--s-3); }
.facts .ic { width: 20px; height: 20px; flex: none; }
.split-copy > * + * { margin-top: var(--s-5); }

/* the media band (rhythm media-band): the words on the dark top-left of the photograph, no box */
.media-band { --ink: var(--p-ink); --muted: var(--p-band-muted); }
.media-band > .wrap { height: 100%; display: flex; flex-direction: column; row-gap: var(--s-7); }
.media-band .split-copy { max-width: 34rem; }
.media-band__facts { margin-top: auto; }
.media-band__facts dt { color: var(--muted); }
@media (max-width: 639px) {
  .hero[data-box="none"] .hero__kicker { display: none; }
  /* a phone: the words on the black ground, the photograph under them in the lower half */
  .media-band > .layer { top: auto; height: 52%; }
  .media-band__facts { display: none; }
}

/* a split whose picture runs the section's height (desktop): the frame fills what the words leave */
@media (min-width: 1024px) {
  .split-fill { height: 100%; grid-template-rows: minmax(0, 1fr); }
  .split-fill > .frame { height: 100%; }
  .split-fill > .frame::before { padding-top: 0; }
}

/* legal pages */
.legal { max-width: 68ch; }
.legal > * + * { margin-top: var(--s-5); }
.legal h2 { font-size: var(--t-h3); }

/* the close starts at the same air as every other section */
footer.closing.footer--dark { padding-top: var(--s-7); }

/* the band's facts: four on span-3 at its foot, no rule */
.media-band__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); margin: auto 0 0; }
.media-band__facts > div { display: grid; gap: var(--s-1); }
.media-band__facts dt { font-size: var(--t-small); }
.media-band__facts dd { margin: 0; font-weight: 500; }
@media (max-width: 1023px) { .media-band__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-5); } }

/* the studio mark file sits on its own near-black (#0e0c0c): the frame takes it, so no box shows */
.frame--mark { background: #0e0c0c; }
.legal-start { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }

/* a phone: the hero photograph a little taller, the band's photograph under its words, the legal row stacked */
@media (max-width: 639px) {
  .hero--photo { --photo: 35svh; }
  /* a game hero shows its status line on a phone too: its photograph gives the room */
  .hero--photo:not([data-box="none"]) { --photo: 34svh; }
  .media-band { display: flex; flex-direction: column; }
  .media-band > .wrap { height: auto; }
  .media-band > .layer { position: relative; inset: auto; order: 1; height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-6); }
  .media-band__facts { display: none; }
  .legal-start { flex-direction: column; }
}

/* She Breathes Below: the Uncut changes as a two-column list, each line closed by the list rule */
.changes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.changes > li { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); max-width: 56ch; }
@media (max-width: 1023px) { .changes { grid-template-columns: minmax(0, 1fr); } }
.team > li { grid-template-columns: 8rem minmax(0, 1fr); }
.team > li > p { grid-column: 2; grid-row: 1; }
@media (max-width: 639px) { .changes > li { padding: var(--s-3) 0; } }
@media (max-width: 639px) { #versions .tile--wide { --tile-ratio: 2 / 1; } }

/* the bar holds four game names: from 1024 to 1279 the logo keeps its crescent and the name is read, not shown */
.nav__logo { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  header.nav .nav__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* the hero facts: every value starts on the same line */
.hero__facts > div { align-content: start; }

/* 200% zoom and short screens (from 640 wide, under 700 tall): the hero is at least the first screen and grows with its words,
   so its buttons never lie over the next section (the kit does the same under 640) */
@media (min-width: 640px) and (max-height: 700px) {
  main > .hero { height: auto; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
  main > .hero > .wrap { height: auto; }
}

/* Bloody Moon, the two eras on a tablet: portrait pictures, so the pair fills its screen */
@media (min-width: 640px) and (max-width: 1023px) { #epoques .tile { --tile-ratio: 4 / 5; } }

/* animated pictures (site.js) ------------------------------------------------------------ */
/* the home band's layer is a picture now, so it can hold the corrupted twin */
picture.layer { display: block; overflow: hidden; }
picture.layer > img { width: 100%; height: 100%; object-fit: cover; }
/* the corrupted twin: on top of the clean picture, shown only during a flash. During the flash it
   stays fully visible (one flash, no flicker inside it); only a small shift and grain move. */
.glitch__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; pointer-events: none; }
.glitch.is-glitching > .glitch__img { opacity: 1; animation: glitch-shift var(--glitch-ms, 300ms) steps(5, end) both; }
.glitch.is-glitching::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes glitch-shift {
  0%   { transform: translate3d(-6px, 0, 0) scale(1.012); }
  20%  { transform: translate3d(5px, 1px, 0) scale(1.012); }
  40%  { transform: translate3d(-3px, -1px, 0) scale(1.012); }
  60%  { transform: translate3d(4px, 0, 0) scale(1.012); }
  80%  { transform: translate3d(-2px, 1px, 0) scale(1.012); }
  100% { transform: translate3d(0, 0, 0) scale(1.012); }
}
/* the looping film over the still: its poster is the same still, so nothing jumps when it starts
   (it stays visible from the start: Chrome pauses a muted video it thinks is hidden) */
.hero__video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@media (max-width: 639px) { .hero__video { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .glitch__img, .glitch::after { display: none; }
}
/* the pause control: 44 px, bottom right of the hero, top right of the band */
.wrap:has(> .motion-toggle) { position: relative; }
.motion-toggle { position: absolute; right: 0; bottom: 0; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 1px solid rgb(233 227 218 / .45); border-radius: var(--r-sm); background: rgb(7 11 10 / .72); color: var(--p-ink); cursor: pointer; }
.motion-toggle:hover { border-color: var(--p-ink); }
.motion-toggle svg { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle__play, .motion-toggle.is-paused .motion-toggle__pause { display: none; }
.motion-toggle.is-paused .motion-toggle__play { display: block; }
.motion-toggle__pause { fill: none; }
.media-band .motion-toggle { top: 0; bottom: auto; }
/* a phone: the hero's picture is above its words, so the control sits on the picture's lower right */
@media (max-width: 639px) { .hero .motion-toggle { top: calc(-1 * var(--hgap) - 52px); bottom: auto; right: 0; } }

/* a phone: a long button label (« Ajouter à la liste de souhaits sur Steam ») wraps inside the button
   instead of pushing the page wider; the button keeps its 44 px minimum height */
@media (max-width: 639px) {
  .btn { white-space: normal; height: auto; min-height: var(--btn-h); padding-block: 10px; text-align: center; line-height: 1.3; }
}
