/* Haute Culture Club
   Composition de référence : Figma « MacBook Pro 16" - 1 » (1728 × 1117), node 49:63.
   Mobile d’abord ; la composition Figma s’applique dès 64rem de large en format paysage. */

@font-face {
  font-family: "Graebenbach";
  src: url("../assets/fonts/Graebenbach-Regular.woff2?v=20261103b") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #000;
  --wall: #e8e7e3;            /* teinte de repli du plâtre */

  --m: 24px;                  /* marges ; 48px en desktop (Figma) */
  --col: 24rem;               /* 384px, largeur des colonnes Figma */
  --fs: 1rem;
  --lh: 1.15;

  /* Scène de la calligraphie */
  --hero: max(100svh, 34rem);
  --stage-h: var(--hero);
  --cw: 170%;                 /* largeur max de la calligraphie, en % de la scène */
  --chm: 1.25;                /* plafond : largeur ≤ hauteur de scène × chm */
  --ay: 54%;                  /* hauteur du centre du visage dans la scène */
}

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

html {
  background: var(--wall);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Graebenbach", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs);
  line-height: var(--lh);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mur de plâtre : couche fixe à hauteur stable (lvh) pour éviter les sauts de la barre d’outils mobile */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background: var(--wall) url("../assets/plaster-1920.jpg?v=20261103b") center / cover no-repeat;
  background-image: image-set(
    url("../assets/plaster-1920.webp?v=20261103b") type("image/webp") 1x,
    url("../assets/plaster-3456.webp?v=20261103b") type("image/webp") 2x,
    url("../assets/plaster-1920.jpg?v=20261103b") type("image/jpeg") 1x
  );
}

img,
video,
canvas { display: block; }

img { max-width: 100%; height: auto; }

/* Aucun z-index ni transform sur .page, .stage et .calli :
   l’animation centrale doit se fondre (multiply) avec le plâtre et le chrome. */
.page {
  position: relative;
  min-height: 100svh;
  overflow-x: clip;
}

.stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--stage-h);
  overflow: hidden;
  pointer-events: none;
}

/* Bloc calligraphie (1600 × 1191), ancré sur le centre du visage.
   Les marges en % se rapportent à la largeur de la scène, d’où leur usage pour le décalage vertical. */
.calli {
  --w: min(var(--cw), var(--stage-h) * var(--chm));
  position: absolute;
  left: 50%;
  top: var(--ay);
  width: var(--w);
  aspect-ratio: 1600 / 1191;
  margin-left: calc(var(--w) * -0.536875);
  margin-top: calc(var(--w) * -0.36);
}

.calli__chrome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Visage animé : position Figma relative à la calligraphie (655, 349, 418 × 418) */
.calli__face {
  position: absolute;
  left: 40.625%;
  top: 30.814%;
  width: 26.125%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Contenu */
.brand,
.manifesto,
.photo,
.signature {
  position: relative;
  z-index: 1;
}

.brand {
  min-height: var(--hero);
  margin: 0;
  padding: var(--m);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.brand__logo {
  margin: 0;
  font-size: inherit;
  line-height: 0;
}

.brand__logo img { width: clamp(7.5rem, 32vw, 10rem); }

.manifesto {
  display: grid;
  gap: 2.4em;
  max-width: calc(var(--col) + 2 * var(--m));
  padding: 0 var(--m);
}

.manifesto p { margin: 0; }

.photo {
  width: min(calc(100% - 2 * var(--m)), var(--col));
  margin: 3.5rem var(--m) 0 auto;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.signature { padding: 3.5rem var(--m) var(--m); }

.signature img { width: 6.25rem; }

/* Les retours à la ligne du Figma ne valent que pour la colonne de 384px */
@media not all and (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  .br { display: none; }
}

/* Composition Figma */
@media (min-width: 64rem) and (min-aspect-ratio: 1/1) {
  :root {
    --m: 48px;
    --fs: 16px;
    --lh: 1.1;
    --sh: max(100svh, 50rem);
    --stage-h: var(--sh);
    --cw: 92.59%;             /* 1600 / 1728 */
    --chm: 1.4324;            /* hauteur Figma 106,6 % de la scène × ratio 1600/1191 */
    --ay: 49.955%;            /* 558 / 1117 */
  }

  .page {
    height: var(--sh);
    display: grid;
    grid-template-columns: var(--m) var(--col) minmax(0, 1fr) var(--col) var(--m);
    grid-template-rows: var(--m) auto minmax(0, 1fr) auto var(--m);
  }

  .stage {
    bottom: 0;
    height: auto;
  }

  .brand {
    grid-column: 4;
    grid-row: 2;
    min-height: 0;
    padding: 0;
  }

  .brand__logo img { width: 160px; }

  .manifesto {
    grid-column: 2;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3em;
    max-width: none;
    padding: 0;
  }

  .photo {
    grid-column: 4;
    grid-row: 3 / 5;
    align-self: end;
    justify-self: end;
    width: auto;
    height: min(570px, calc(var(--sh) * 0.5103));
    aspect-ratio: 384 / 570;
    margin: 0;
  }

  .signature {
    grid-column: 2;
    grid-row: 4;
    padding: 81px 0 0;
  }

  .signature img { width: 120px; }
}
