/* Studio 200 · le socle : remise à zéro, fond de secours, texte. [lot habillage]
   Polices chargées par la page (Archivo à largeur variable, Montserrat, Heebo). */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  color-scheme: dark;
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: var(--lh-body);
  font-synthesis: none;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Le fond de secours, sous le canvas : la nuit (sur html), son halo bleu roi et un reste d'horizon.
   Une couche fixe (pas de background-attachment) : elle ne se repeint pas quand la page défile.
   Le body n'a pas de fond à lui, sinon il la recouvrirait. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 34% at 50% 104%, rgb(var(--orange-rgb) / .1), transparent 70%),
    radial-gradient(110% 70% at 62% 26%, rgb(var(--royal-rgb) / .34), transparent 68%);
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { margin: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: inherit; -webkit-appearance: none; appearance: none; }
input, textarea { margin: 0; border: 0; border-radius: 0; background: none; -webkit-appearance: none; appearance: none; }
[hidden] { display: none !important; }

::selection { background: rgb(var(--orange-rgb) / .9); color: var(--ink); -webkit-text-fill-color: var(--ink); }

/* L'anneau de focus : toujours visible au clavier, jamais à la souris ni au doigt. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ les voix du texte */

/* Le grand titre : Archivo, largeur 125, graisse 900, capitales. La famille de son logotype large (planche 11). */
.t-wide {
  font-family: var(--font-wide);
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  font-weight: 900;
  font-size: calc(var(--fs-wide) * var(--fit, 1));     /* --fit : posé par ui.fit() quand un mot ne tient pas */
  line-height: var(--lh-wide);
  letter-spacing: -.012em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;   /* dernier recours : un mot trop long se coupe plutôt que de sortir de l'écran */
  color: var(--text);
}
.t-wide--xl { font-size: calc(var(--fs-wide-xl) * var(--fit, 1)); line-height: .88; letter-spacing: -.02em; }
.t-wide--sm { font-size: calc(var(--fs-wide-sm) * var(--fit, 1)); line-height: 1; letter-spacing: 0; }

/* Les capitales qui luisent, comme dans son manifeste (planche 02). À poser sur un titre, pas sur un paragraphe. */
.lit { text-shadow: var(--glow-text); }
.lit--orange { text-shadow: var(--glow-text-orange); }

/* La ligne de teaser : une phrase de son film, posée en grand. */
.t-line {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: calc(var(--fs-line) * var(--fit, 1));
  line-height: var(--lh-line);
  letter-spacing: -.012em;
  text-wrap: balance;
  color: var(--text);
}
.t-line--lg { font-size: calc(var(--fs-line-lg) * var(--fit, 1)); line-height: 1.04; letter-spacing: -.02em; }
.t-line--sm { font-size: calc(var(--fs-line-sm) * var(--fit, 1)); line-height: 1.2; letter-spacing: -.005em; }

/* Le texte courant. */
.t-body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-dim);
  text-wrap: pretty;
}

/* Les mentions (indépendance, crédits, dates) : petites, toujours lisibles. */
.t-note {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-faint);
  text-wrap: pretty;
}

/* Le mot fort : Montserrat 800 italique, en dégradé orange, avec la lueur de ses mots orange (planche 01). */
.em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 800;
  color: var(--amber);
  background-image: var(--grad-orange);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  text-shadow: var(--glow-text-orange);
  /* l'italique déborde de sa boîte : sans cette marge rendue, le dégradé coupe la dernière lettre. Elle est
     répétée à chaque ligne (clone, ci-dessus) : un mot fort qui passe à la ligne n'est rogné à aucun bout.
     Contrepartie : un navigateur n'équilibre pas les lignes d'un texte non découpé qui en contient un
     (voir ui.split dans js/ui.js). */
  padding-inline: .09em;
  margin-inline: -.09em;
}
.t-wide .em { font-family: inherit; font-weight: inherit; }   /* dans un grand titre, le mot fort reste en Archivo, en italique */

/* Le surtitre : petites capitales très espacées, comme « MOTION DESIGN STUDIO » sous son logo. */
.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-kicker);
  line-height: 1.35;
  letter-spacing: var(--track-kicker);
  margin-inline-end: calc(var(--track-kicker) * -1);   /* l'espacement de la dernière lettre ne décentre pas le mot */
  text-transform: uppercase;
  color: var(--text);
}
.kicker--orange { color: var(--amber); }
.kicker--dim { color: var(--text-dim); }

/* Un chiffre : Archivo large, chiffres à largeur fixe, toujours de gauche à droite. */
.num {
  font-family: var(--font-wide);
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125;
  font-weight: 900;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -.01em;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Tout ce qui se lit de gauche à droite dans les trois langues (chiffres, pourcentage, identifiants). */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ------------------------------------------------------------------ l'hébreu
   Heebo : 900 pour les titres, 500 pour le texte. Pas de capitales. */
.t-wide:lang(he) { letter-spacing: 0; line-height: 1.02; }
.t-wide--xl:lang(he) { line-height: .98; }
.t-line:lang(he) { font-weight: 900; letter-spacing: 0; line-height: 1.18; }
.t-body:lang(he), .t-note:lang(he) { font-weight: 500; }
.kicker:lang(he) { font-weight: 700; letter-spacing: .16em; margin-inline-end: -.16em; font-size: calc(var(--fs-kicker) * 1.12); }
/* Le mot fort : Heebo n'a pas d'italique, le navigateur penche lui-même ses lettres (la seule synthèse permise
   de la page). Le mot reste ainsi du texte en ligne : il passe à la ligne comme les autres, la lettre collée
   devant lui (« ל ») et sa ponctuation ne le quittent pas. Une pente par `transform` demandait une boîte, et
   cette boîte cassait les lignes. Les chiffres et les mots latins, eux, gardent leur vraie italique.
   Une lettre penchée ainsi sort davantage de sa boîte qu'une italique dessinée : la marge rendue est plus large.
   La pente pousse le haut des lettres vers le début de la ligne : un peu d'air est laissé de ce côté, sinon le
   mot fort touche la lettre collée devant lui (« ל ») et dépasse de la colonne en début de ligne. */
.em:lang(he) { font-weight: 900; font-synthesis: style; padding-inline: .16em; margin-inline: -.075em -.16em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
