/* ==========================================================================
   Cover page — animated mesh-gradient background + crayon scribble canvas.
   Scoped entirely to index.html. Deliberately has no nav/footer chrome
   and no title: it's a blank drawing surface, not another site page.
   ========================================================================== */

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--cream);
}

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

.sr-only:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--cream);
  border: 1px solid var(--olive-text);
  color: var(--olive-text);
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  font-size: var(--size-small);
  z-index: 20;
}

.cover {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--cream);
}

html, body {
  cursor: none;
}

/* -------------------------------------------------------------------------
   Crayon drawing canvas — sits above the mesh background.
   ------------------------------------------------------------------------- */
.cover__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* -------------------------------------------------------------------------
   Eyebrow — small centered label sitting just above the title.
   ------------------------------------------------------------------------- */
.cover__eyebrow {
  position: fixed;
  top: 38vh;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  pointer-events: none;
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------------
   Studio title — "ADJECTIF CREATION" as individually-animated letters.
   The container is centered via fixed positioning so its layout (and the
   real, correctly-spaced gap between the two words) is computed once by
   the browser; js/cover.js measures each letter's resting position from
   that layout, then flies it in from a random scattered start. Letters
   stay in --ink, no color change, matching the rest of the site.
   ------------------------------------------------------------------------- */
/* No transform here on purpose: a CSS transform on this element would make
   it the containing block for its position:fixed letter children below,
   so their fixed coordinates would resolve against this (small, collapsed
   once letters detach from flow) box instead of the real viewport.
   Full-width + text-align:center is used instead of transform:translateX
   so the letters' viewport-relative fixed coordinates stay correct. */
.cover__title {
  position: fixed;
  left: 0;
  right: 0;
  top: 43vh;
  z-index: 3;
  margin: 0;
  text-align: center;
  pointer-events: none;
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  font-size: clamp(2.4rem, 8.2vw, 6.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.03em;
  word-spacing: -0.15em;
  color: var(--ink);
}

.cover__word {
  display: inline-block;
  white-space: nowrap;
}

.cover__letter {
  display: inline-block;
  opacity: 0;
}

.cover__title.is-reduced .cover__letter {
  transition: opacity 0.6s ease;
}

.cover__title.is-reduced.is-settled .cover__letter {
  opacity: 1;
}

/* -------------------------------------------------------------------------
   First-visit prompt — bottom-center, clear of the centered title above.
   ------------------------------------------------------------------------- */
.cover__prompt {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8vh;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.5s ease;
}

.cover__prompt.is-hidden {
  opacity: 0;
}

.cover__prompt-label {
  display: block;
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cover__prompt-label--touch {
  display: none;
}

@media (pointer: coarse) {
  .cover__prompt-label--mouse { display: none; }
  .cover__prompt-label--touch { display: block; }
}

/* -------------------------------------------------------------------------
   Crayon cursor — replaces the hidden system cursor. Tip color follows the
   current stroke color (set via --crayon-color inline style from JS).
   ------------------------------------------------------------------------- */
.cover__crayon {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.cover__crayon.is-active {
  opacity: 1;
}

.cover__clear {
  position: fixed;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  font-size: var(--size-small);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.cover__clear:hover,
.cover__clear:focus-visible {
  opacity: 1;
}

.cover__fade {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.cover__fade.is-active {
  opacity: 1;
}

