/* ============================================================
   BASE  ·  reset, typography primitives, shared components
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset for the sticky contact rail when jumping to an anchor */
  scroll-padding-top: var(--space-24);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--color-surface-base);
  color: var(--color-ink-700);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  letter-spacing: var(--tracking-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

/* --- Focus. Never removed, only redesigned. ---------------- */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

::selection {
  background: var(--color-brand-pink);
  color: var(--color-ink-900);
}

/* --- Skip link -------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: var(--z-cursor);
  padding: var(--space-3) var(--space-6);
  background: var(--color-ink-900);
  color: var(--color-surface-base);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: top var(--duration-fast) var(--ease-out-expo);
}
.skip-link:focus { top: var(--space-4); }

/* ============================================================
   TYPOGRAPHY PRIMITIVES
   ============================================================ */

.display {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-ink-900);
  /* Instrument Serif is optically light at display sizes; a hair of
     synthetic weight would ruin it. We compensate with size instead. */
}

.display--hero  { font-size: var(--text-7xl); }
.display--xl    { font-size: var(--text-5xl); }
.display--lg    { font-size: var(--text-4xl); }
.display--md    { font-size: var(--text-3xl); }

.display em {
  font-style: italic;
  color: var(--color-brand-pink-glow);
}

/* The eyebrow carries every section's orientation. Wide tracking at
   small size is what separates "considered" from "default". */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-ink-300);
}
.eyebrow::before {
  content: '';
  width: var(--space-8);
  height: 1px;
  background: var(--color-brand-pink);
  flex: none;
}
.eyebrow--center { justify-content: center; }

.lede {
  font-size: var(--text-xl);
  line-height: var(--leading-normal);
  color: var(--color-ink-500);
  max-width: 34ch;
}

.body-text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-ink-500);
  max-width: 62ch;
}

.meta {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-ink-300);
}

.numeric { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

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

.container {
  width: 100%;
  max-width: var(--container-default);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: var(--section-gap-lg);
  z-index: var(--z-content);
}
.section--tight { padding-block: var(--section-gap-md); }

.section-head { margin-bottom: var(--section-gap-sm); }
.section-head > * + * { margin-top: var(--space-6); }

/* ============================================================
   BUTTONS  ·  all ≥44px touch target
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: var(--space-3) var(--space-8);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-base) var(--ease-out-expo),
    background-color var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo);
}

.btn:active { transform: translateY(1px) scale(0.99); }

/* ============================================================
   PRESS BLOOM  ·  pink light from the exact point of contact
   A material-style ripple is opaque ink spreading across a surface.
   That is the wrong physics for this page — here pink is LIGHT, so
   the press emits a soft radial glow that blooms and decays, the way
   a light source would. Injected by JS at the pointer coordinate and
   removed on completion, so nothing accumulates in the DOM.
   ============================================================ */

.press-host { position: relative; overflow: hidden; isolation: isolate; }

.press-bloom {
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  width: var(--bsize, 18rem);
  aspect-ratio: 1;
  margin-left: calc(var(--bsize, 18rem) / -2);
  margin-top: calc(var(--bsize, 18rem) / -2);
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    circle,
    rgba(255, 79, 168, 0.55) 0%,
    rgba(224, 19, 132, 0.28) 38%,
    transparent 70%
  );
  transform: scale(0.28);
  opacity: 0;
  animation: press-bloom 620ms var(--ease-out-expo) forwards;
}

/* Solid pink buttons need a lighter bloom or it disappears into itself. */
.btn--primary .press-bloom {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.14) 42%, transparent 70%);
}

@keyframes press-bloom {
  0%   { transform: scale(0.28); opacity: 0; }
  22%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .press-bloom { animation: none; display: none; }
}

/* Primary — white text on brand pink verifies at 4.6:1 */
.btn--primary {
  background: var(--color-brand-pink);
  color: var(--color-ink-900);
  box-shadow: var(--edge-light-pink);
}
.btn--primary:hover {
  background: var(--color-brand-pink-deep);
  box-shadow: var(--edge-light-pink), var(--shadow-glow);
}

.btn--ghost {
  background: var(--color-surface-glass);
  color: var(--color-ink-900);
  border-color: var(--color-line-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--ghost:hover {
  background: var(--color-surface-glass-strong);
  border-color: var(--color-brand-pink);
}

.btn--lg { min-height: 3.5rem; padding-inline: var(--space-12); font-size: var(--text-lg); }
.btn--block { width: 100%; }

.btn svg { width: 1.125em; height: 1.125em; flex: none; }

/* ============================================================
   GLASS SURFACE  ·  the core Night Glass component
   Depth on a dark ground comes from edge-light, not shadow.
   ============================================================ */

.glass {
  position: relative;
  background: var(--color-surface-glass);
  border: 1px solid var(--color-line-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--edge-light);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition:
    border-color var(--duration-base) var(--ease-out-expo),
    background-color var(--duration-base) var(--ease-out-expo),
    transform var(--duration-base) var(--ease-out-expo);
}

/* A pink light source that tracks the cursor across the card face.
   --mx/--my are set in JS; they default to the card centre so the
   card still looks correct with zero JS. */
.glass--lit::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    18rem 18rem at var(--mx, 50%) var(--my, 50%),
    var(--color-brand-pink-glow),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out-expo);
  pointer-events: none;
}
.glass--lit:hover::before,
.glass--lit:focus-within::before { opacity: 1; }

/* ============================================================
   GRAIN  ·  the anti-slop layer
   Flat CSS gradients are the tell of a generated page. Real film
   grain over the whole surface is what makes it read as designed.
   ============================================================ */

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ============================================================
   REVEAL  ·  02_MOTION.md §1
   Content is visible by default. The reveal class is only added by
   JS once it has confirmed it can also remove it. No-JS = no hiding.
   ============================================================ */

.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}
.js-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--duration-slow) var(--ease-out-expo),
    transform var(--duration-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js-on [data-reveal] { opacity: 1; transform: none; }
}

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