/* ==========================================================================
   PURPLE AVE — DESIGN TOKENS
   Dark canvas. Royal purple anchor. Editorial serif + grotesque + mono.
   ========================================================================== */

:root {
  /* ── Color ─────────────────────────────────────────────────────────────── */
  --canvas:        oklch(0.10 0.020 290);
  --canvas-deep:   oklch(0.06 0.012 290);
  --surface:       oklch(0.22 0.080 290);
  --surface-2:     oklch(0.28 0.095 290);

  --purple:        oklch(0.50 0.23 290);
  --purple-bright: oklch(0.68 0.25 290);
  --purple-deep:   oklch(0.32 0.19 295);
  --purple-glow:   oklch(0.50 0.23 290 / 0.55);

  --fg:            oklch(0.97 0.005 290);
  --fg-muted:      oklch(0.72 0.010 290);
  --fg-dim:        oklch(0.50 0.012 290);
  --fg-faint:      oklch(0.32 0.015 290);

  --hairline:      oklch(0.38 0.04 290 / 0.35);
  --hairline-soft: oklch(0.38 0.04 290 / 0.18);
  --hairline-bright: oklch(0.55 0.15 290 / 0.55);

  /* ── Type ──────────────────────────────────────────────────────────────── */
  --serif:  "Fraunces", "Times New Roman", serif;
  --grotesque: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand:   "Caveat", "Bradley Hand", cursive;

  /* ── Type scale (desktop) ──────────────────────────────────────────────── */
  --t-mega:    clamp(72px, 14vw, 240px);
  --t-display: clamp(56px, 10vw, 168px);
  --t-opener:  clamp(40px, 6.5vw, 112px);
  --t-h2:      clamp(32px, 4.5vw, 72px);
  --t-h3:      clamp(22px, 2.4vw, 36px);
  --t-body-lg: clamp(18px, 1.4vw, 22px);
  --t-body:    clamp(16px, 1.05vw, 18px);
  --t-mono:    12px;
  --t-mono-sm: 11px;

  /* ── Space ─────────────────────────────────────────────────────────────── */
  --space-section: clamp(120px, 18vh, 240px);
  --space-block:   clamp(48px, 8vh, 120px);
  --gutter:        clamp(20px, 3vw, 56px);

  /* ── Radii / motion ────────────────────────────────────────────────────── */
  --radius: 2px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ==========================================================================
   RESET + BASE
   ========================================================================== */

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

html { background: var(--canvas); }
html, body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  font-family: var(--grotesque);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-feature-settings: "ss01", "ss02", "cv11";
}

::selection { background: var(--purple); color: var(--fg); }

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

h1, h2, h3, h4, h5, h6, p, figure, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

input { font: inherit; color: inherit; background: transparent; border: none; outline: none; }

/* ==========================================================================
   TYPE PRIMITIVES
   ========================================================================== */

.serif      { font-family: var(--serif); font-weight: 350; letter-spacing: -0.018em; line-height: 0.95; font-variation-settings: "opsz" 144; }
.serif-it   { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; line-height: 0.95; }
.hand       { font-family: var(--hand); font-weight: 500; font-style: normal; letter-spacing: 0; }
.mono       { font-family: var(--mono); font-size: var(--t-mono); letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.4; }
.mono-sm    { font-family: var(--mono); font-size: var(--t-mono-sm); letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.4; }
.grotesque  { font-family: var(--grotesque); }

.t-mega     { font-size: var(--t-mega); line-height: 0.88; letter-spacing: -0.035em; }
.t-display  { font-size: var(--t-display); line-height: 0.92; letter-spacing: -0.03em; }
.t-opener   { font-size: var(--t-opener); line-height: 0.95; letter-spacing: -0.025em; }
.t-h2       { font-size: var(--t-h2); line-height: 1.0; letter-spacing: -0.02em; }
.t-h3       { font-size: var(--t-h3); line-height: 1.15; letter-spacing: -0.01em; }
.t-body-lg  { font-size: var(--t-body-lg); line-height: 1.5; }

.muted      { color: var(--fg-muted); }
.dim        { color: var(--fg-dim); }
.faint      { color: var(--fg-faint); }
.purple     { color: var(--purple-bright); }

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */

.shell {
  width: 100%;
  max-width: 1680px;
  margin: 0 inline;
  padding: 0 var(--gutter);
  margin-left: auto;
  margin-right: auto;
}

.section {
  position: relative;
  padding: var(--space-section) 0;
}

.section--tight { padding: var(--space-block) 0; }

.section-index {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: baseline;
  color: var(--fg-dim);
  margin-bottom: clamp(48px, 8vh, 96px);
  padding-top: 8px;
}

.section-index .num { color: var(--purple-bright); }

.hairline {
  background: var(--hairline);
  height: 1px;
  width: 100%;
  border: 0;
}

.hairline-v {
  background: var(--hairline);
  width: 1px;
  border: 0;
  align-self: stretch;
}

/* ==========================================================================
   PLACEHOLDER IMAGE PANELS — intentional, not a gap
   ========================================================================== */

.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.18 0.018 290) 0 1px,
      transparent 1px 8px
    ),
    linear-gradient(
      180deg,
      oklch(0.20 0.025 290) 0%,
      oklch(0.14 0.020 295) 100%
    );
  border: 1px solid var(--hairline-soft);
  overflow: hidden;
}

.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 30% 30%,
    var(--purple-glow) 0%,
    transparent 55%
  );
  opacity: 0.4;
  mix-blend-mode: screen;
  pointer-events: none;
}

.ph__label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  z-index: 2;
}

.ph__corner {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--hairline-bright);
  border-left: 1px solid var(--hairline-bright);
}

.ph__corner--tr { top: 16px; right: 16px; left: auto; border-top: 1px solid var(--hairline-bright); border-left: 0; border-right: 1px solid var(--hairline-bright); }
.ph__corner--bl { bottom: 16px; top: auto; border-top: 0; border-left: 1px solid var(--hairline-bright); border-bottom: 1px solid var(--hairline-bright); }
.ph__corner--br { bottom: 16px; right: 16px; top: auto; left: auto; border: 0; border-right: 1px solid var(--hairline-bright); border-bottom: 1px solid var(--hairline-bright); }

/* ==========================================================================
   GLOBAL CHROME — page frame, scroll progress, etc.
   ========================================================================== */

.frame-edge {
  position: fixed;
  z-index: 50;
  pointer-events: none;
}

.frame-edge--tl { top: 24px; left: 24px; }
.frame-edge--tr { top: 24px; right: 24px; text-align: right; }
.frame-edge--bl { bottom: 24px; left: 24px; }
.frame-edge--br { bottom: 24px; right: 24px; text-align: right; }

.frame-edge .mono { color: var(--fg-muted); display: block; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--purple-bright));
  z-index: 60;
  transition: width 80ms linear;
}

/* ==========================================================================
   ANIMATION BASES — initial states for GSAP-driven reveals
   ========================================================================== */

/* Reveal/mask elements are VISIBLE BY DEFAULT.
   Only when JS adds .js-anim to <html> do we hide them and let GSAP reveal. */
.js-anim [data-reveal] { opacity: 0; }
.js-anim [data-reveal="up"]    { transform: translate3d(0, 32px, 0); }
.js-anim [data-reveal="down"]  { transform: translate3d(0, -32px, 0); }
.js-anim [data-reveal="left"]  { transform: translate3d(32px, 0, 0); }
.js-anim [data-reveal="right"] { transform: translate3d(-32px, 0, 0); }

[data-mask] { display: inline-block; line-height: 1; }
[data-mask] > .mask-inner { display: inline-block; }

.js-anim [data-mask] {
  overflow: hidden;
  padding-bottom: 0.18em;
  padding-top: 0.04em;
}
.js-anim [data-mask] > .mask-inner {
  transform: translate3d(0, 110%, 0);
  will-change: transform;
}



/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-mask] > .mask-inner { transform: none !important; animation: none !important; }
}
