/* ============================================================
   CAPE — Base styles
   Reset, typography defaults, layout helpers
   ============================================================ */

/* ---------- GLOBAL BOX SIZING & OVERFLOW GUARD ---------- */
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--color-off-white);
  color: var(--color-slate-black);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

/* ---------- DISPLAY FONT HELPER ----------
   Display headings are now Coolvetica bold, lowercase, tight tracking.
   Aeternus Heavy is no longer loaded. */
.display {
  font-family: coolvetica, sans-serif;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

/* ---------- TOP NAV ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-off-white);
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 30px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--type-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-slate-black);
  transition: color 240ms var(--ease-out-quint);
}

.site-nav a:hover {
  color: var(--color-yves-klein);
}

/* push page content below the fixed nav */
main {
  padding-top: var(--nav-height);
}

/* ============================================================
   ANIMATION PRIMITIVES
   Reused across sections
   ============================================================ */

/* MASK-WRAP: a strip with overflow:hidden so its content can rise from below.
   Used for line-rise and word-rise effects. */
.mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
}

/* LINE-RISE: the inner span starts pushed down 110% and rises */
.line-rise {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 900ms var(--ease-out-quint),
    opacity 500ms ease;
}

.play .line-rise,
.play.line-rise {
  transform: translateY(0);
  opacity: 1;
}

/* WORD WRAP: container produced by JS split.
   Each .w-wrap is a mask, .w is the rising word inside. */
.w-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
}

.w-wrap .w {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 600ms var(--ease-out-quint),
    opacity 400ms ease;
}

.play .w-wrap .w {
  transform: translateY(0);
  opacity: 1;
}

/* LETTER WRAP: used in hero "CAPE" */
.l-wrap {
  display: inline-block;
}

.l {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 520ms var(--ease-out-quint),
    opacity 280ms ease;
}

/* Accent color helper */
.accent {
  color: var(--color-yves-klein);
}

/* Disable transitions globally — used in headless preview / hidden tab
   environments where browsers throttle/pause transitions. */
.no-anim,
.no-anim *,
.no-anim *::before,
.no-anim *::after {
  transition: none !important;
  animation: none !important;
}

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