/* Fatcha! — reprise de la carte de visite */
:root {
  --bg: #f4f1e8;
  --ink: #171613;
  --ink-soft: rgba(23, 22, 19, .68);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: clamp(14px, 2.4vw, 30px) clamp(14px, 3vw, 44px) clamp(16px, 2.6vw, 32px);
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* --- ligne de tête ------------------------------------------------------ */

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px clamp(12px, 3vw, 40px);
  align-items: baseline;
  font-size: clamp(8.5px, 1.05vw, 11px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- le logotype -------------------------------------------------------- */

.hero { display: contents; }

.hero-mark {
  display: flex;
  align-items: flex-end;
  min-height: 0;
  min-width: 0;   /* item de grille : ne pas s'élargir sur le contenu */
  padding-bottom: clamp(6px, 1.4vw, 18px);
}

.shock {
  /* --fs pilote le mot ET le « ! » : tout reste proportionnel.
     script.js remplace cette valeur par la taille qui tient à l'écran. */
  --fs: min(21.5vw, 26vh);
  font-size: var(--fs);
  display: flex;
  flex: 0 0 auto;
  width: max-content;   /* largeur réelle : sinon la mesure JS est écrasée */
  align-items: flex-end;
  gap: .075em;
  animation: fx-shock 1.05s cubic-bezier(.3, .9, .2, 1) both;
  will-change: transform;
}

.wordmask {
  overflow: hidden;      /* le mot monte depuis le bas de ce masque */
  flex: 0 0 auto;        /* ne pas rétrécir : sinon le mot est rogné en silence */
  line-height: .92;
  padding: 0 .02em;
}

.word {
  display: block;
  font-family: Archivo, 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 900;
  font-stretch: 112%;
  font-size: 1em;
  line-height: .92;
  white-space: nowrap;
  animation: fx-cast .62s cubic-bezier(.18, .85, .16, 1) both;
  will-change: transform;
}

/* Le « ! » : une barre et un point, construits à la main.
   --bang = hauteur totale = hauteur de capitale d'Archivo Black (.69em),
   pour que le sommet du « ! » s'aligne sur celui du F.
   margin-bottom = descente de la boîte de ligne sous la ligne de base
   (.92 d'interligne, ascendante .88, descendante .21) : sans ça le point
   pend sous les lettres, car flex-end aligne les boîtes et non les lignes
   de base. */
.bang {
  --bang: .69em;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: calc(var(--bang) * .094);
  height: var(--bang);
  margin-bottom: .125em;
  flex: 0 0 auto;
}

.bang i {
  display: block;
  width: calc(var(--bang) * .219);   /* point carré : largeur = sa hauteur */
  background: var(--ink);
  will-change: transform;
}

.bang-bar {
  height: calc(var(--bang) * .687);
  animation: fx-drop .58s cubic-bezier(.4, 1.4, .5, 1) .06s both;
}

.bang-dot {
  height: calc(var(--bang) * .219);
  animation: fx-drop .58s cubic-bezier(.4, 1.4, .5, 1) .12s both;
}

/* --- le sol ------------------------------------------------------------- */

.floor {
  height: clamp(6px, .85vw, 11px);
  background: var(--ink);
  transform-origin: left center;
  animation: fx-floor .42s cubic-bezier(.22, .9, .2, 1) .78s both;
  will-change: transform;
}

/* --- mentions ----------------------------------------------------------- */

.hero-foot {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.2vw, 40px);
  margin-top: clamp(14px, 2.2vw, 28px);
}

.hero-foot p { margin: 0; }

.kicker {
  font-size: clamp(10px, 1.15vw, 13px);
  letter-spacing: .34em;
  text-transform: uppercase;
}

.micro {
  font-size: clamp(8.5px, 1vw, 11px);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}



/* Les nuages : le même vocabulaire que le sol — des barres horizontales —
   mais fines, pâles et empilées. Les largeurs (courte / longue / moyenne /
   courte) dessinent une silhouette lenticulaire. Les extrémités sont
   estompées au masque, sinon on lirait des filets et non de la brume. */
.cloud {
  position: absolute;
  top: var(--y);
  left: 0;
  width: var(--w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3px, .35vw, 6px);
  opacity: var(--o, .1);
  animation: fx-drift var(--dur, 200s) linear var(--d, 0s) infinite;
  will-change: transform;
}

.cloud i {
  display: block;
  height: clamp(2px, .2vw, 3px);
  background: var(--ink);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
}

.cloud i:nth-child(1) { width: 64%; }
.cloud i:nth-child(2) { width: 100%; }
.cloud i:nth-child(3) { width: 81%; }
.cloud i:nth-child(4) { width: 43%; }

@keyframes fx-drift {
  from { transform: translateX(-130%); }
  to   { transform: translateX(calc(100vw + 30%)); }
}

/* --- le ciel ------------------------------------------------------------ */

/* Un avion de papier traverse le vide au-dessus du logotype. Il passe une
   fois par cycle puis attend hors champ : sur 58 s de cycle, la traversée
   n'en occupe que 42 %. script.js retire une altitude et une durée au sort
   à chaque passage. */
.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.flight {
  position: absolute;
  top: var(--alt, 16vh);
  left: 0;
  animation: fx-fly var(--dur, 58s) linear infinite;
  will-change: transform;
}

/* la traînée, qui se dissipe derrière l'appareil */
.flight::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  width: clamp(40px, 7vw, 96px);
  height: 1px;
  background: var(--ink);
  opacity: .22;
  -webkit-mask-image: linear-gradient(to right, transparent, #000);
  mask-image: linear-gradient(to right, transparent, #000);
}

.plane {
  display: block;
  fill: var(--ink);
  opacity: .45;
}

/* La soucoupe. Au repos elle est rangée au-dessus du champ : l'animation ne
   laisse pas de trace en finissant (fill: none), donc elle y revient seule
   entre deux visites. */
.ufo {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-40vh);
  fill: var(--ink);
  opacity: .5;
  will-change: transform;
}

@keyframes fx-fly {
  0%   { transform: translateX(-180px); }
  42%  { transform: translateX(calc(100vw + 80px)); }
  100% { transform: translateX(calc(100vw + 80px)); }
}

/* --- animations --------------------------------------------------------- */

@keyframes fx-cast {
  from { transform: translateY(104%); }
  to { transform: translateY(0); }
}

@keyframes fx-drop {
  0% { transform: translateY(-160%); }
  68% { transform: translateY(7%); }
  100% { transform: translateY(0); }
}

@keyframes fx-shock {
  0%, 62% { transform: translateY(0); }
  70% { transform: translateY(3px); }
  78% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

@keyframes fx-floor {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .shock, .word, .bang i, .floor { animation: none !important; transform: none !important; }
  .sky { display: none; }
}
