/* ===========================================================================
   guillaume.works — static rebuild
   Colors, type, layout per the master prompt §2.
   =========================================================================== */

/* ----- Fonts (self-hosted, no CDN) ----- */
@font-face {
  font-family: "Neue Montreal";
  src: url("assets/fonts/PPNeueMontreal-Medium.woff2") format("woff2"),
       url("assets/fonts/PPNeueMontreal-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NaN Jaune";
  src: url("assets/fonts/NaNJaune-MaxiBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ----- Tokens ----- */
:root {
  --blue: #0172E0;
  --text: #FCFEFD;
  --pill-bg: rgba(255, 255, 255, 0.14);
  --pill-border: rgba(255, 255, 255, 0.32);
  --pill-blur: 20px;
  --pill-invert: #000000;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100dvh;
  background: var(--blue);
  color: var(--text);
  font-family: "Neue Montreal", system-ui, sans-serif;
  font-weight: 500;
  overflow: hidden;                 /* no scroll on desktop */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hide OS cursor only when the custom dot is active */
body.has-custom-cursor,
body.has-custom-cursor a { cursor: none; }

/* ----- Background: Spline scene ----- */
.spline-scene-div {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;                        /* above the solid bg, below content */
  display: block;
}

/* ----- Custom cursor ----- */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;            /* center on pointer */
  border-radius: 50%;
  background: var(--text);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform;
}
#cursor.is-active { opacity: 1; }

/* ----- Layout ----- */
.screen {
  position: relative;
  z-index: 1;                        /* above the canvas */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(18px, 3vh, 34px) 24px clamp(24px, 4vh, 48px);
  text-align: center;
}

/* Hero paragraph — wide, wraps to ~3 lines near full width */
.hero {
  margin: 0 auto;
  max-width: min(1180px, 92vw);
  font-family: "Neue Montreal", sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Inline content link (MamboMambo) — underline on .letter so it reveals with fade-up */
.hero .content-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.35s var(--ease-out);
}
.hero .content-link .letter {
  text-decoration: underline;
  text-underline-offset: 0.06em;
  text-decoration-thickness: 0.06em;
}
.hero .content-link:hover,
.hero .content-link:focus-visible {
  opacity: 0.65;
}
.hero .content-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Bottom group: wordmark + links pinned to the bottom of the screen */
.bottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vh, 34px);
}

/* Wordmark — scaled by JS to fill the content width (aligns with the nav edges) */
.wordmark {
  margin: 0;
  font-family: "NaN Jaune", sans-serif;
  font-weight: 700;
  font-size: 120px;                  /* provisional; fitWordmark() overrides it */
  line-height: 0.9;
  letter-spacing: -0.02em;
  user-select: none;
}
.wordmark .tricksword {
  display: inline-block;
  padding-bottom: 0.15em;
}

.hero .tricksword {
  padding-bottom: 0.15em;
}

/* TRICKS letter-split (supplied custom code) */
.letter { display: inline-block; }
.tricksword {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
}

/* Link row — distributed edge-to-edge across the viewport */
.links { width: 100%; }
.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(10px, 1.6vw, 20px);
}
.links li { display: flex; }

/* Pills */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 1.4vw, 18px) clamp(22px, 2vw, 34px);
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(var(--pill-blur)) saturate(1.25);
  backdrop-filter: blur(var(--pill-blur)) saturate(1.25);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out);
}
.pill__label {
  position: relative;
  z-index: 1;
  font-family: "Neue Montreal", sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 3.2vw, 47px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
/* Invert-on-hover: black fill sweeps up from the bottom */
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--pill-invert);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-out);
}
.pill:hover::before,
.pill:focus-visible::before { transform: translateY(0); }
.pill:hover,
.pill:focus-visible { color: var(--text); }
.pill:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ----- Entrance reveal (anime.js) -----
   Start hidden ONLY when motion is allowed, so reduced-motion users always
   see the content even though the anime timelines never play for them. */
@media (prefers-reduced-motion: no-preference) {
  .fade-up .letter { opacity: 0; }
  /* Slide only — opacity on this ancestor breaks pill backdrop-filter until hover */
  .fade-up3 { transform: translateY(200px); }
}

/* ===========================================================================
   Mobile
   =========================================================================== */
@media (max-width: 480px) {
  body { overflow-y: auto; }         /* allow a little breathing room */

  .screen {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    width: 100%;
    max-width: 100%;
    font-size: clamp(22px, 6vw, 30px);
  }

  .links ul {
    justify-content: center;
    gap: 10px;
  }
  .pill {
    padding: 12px 18px;
  }
  .pill__label {
    font-size: 20px;
  }
  /* Longest label wraps to two lines inside its pill */
  .pill--wrap .pill__label { white-space: normal; }
}

/* ===========================================================================
   Reduced motion — kill the entrance + freeze background
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .fade-up .letter,
  .fade-up2 .letter,
  .fade-up3 {
    opacity: 1;
    transform: none;
  }
  .pill::before { transition: none; }
  #cursor { display: none; }
}
