/* ============================================================
   BLARE — Base: reset, typography, utilities
   ============================================================ */

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--slate);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

button, input, textarea { font: inherit; color: inherit; }

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

ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }

/* ---- Headings ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: var(--text-hero); font-weight: 800; }
h2 { font-size: var(--text-h2); font-weight: 700; }
h3 { font-size: var(--text-h3); font-weight: 700; letter-spacing: -0.015em; }

p { max-width: 60ch; }

::selection { background: var(--coral); color: var(--cream); }

/* ---- Focus ---- */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: var(--z-toast);
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---- Visually hidden (screen-reader only) ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Layout utilities ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--space-section); }
.section + .section { border-top: 1px solid var(--mist); }  /* hairline rhythm */

/* ---- Eyebrow: mono number badge + label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1.25rem;
}
.eyebrow__num {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 1.5rem;
  padding-inline: 0.375rem;
  background: var(--coral-tint);
  border-radius: var(--radius-pill);
  color: var(--coral-deep);
  letter-spacing: 0.05em;
}
.eyebrow--on-dark { color: var(--gold); }
.eyebrow--on-dark .eyebrow__num { background: rgba(233, 161, 59, 0.16); color: var(--gold); }

/* ---- Signature accent word in headlines ---- */
.accent {
  position: relative;
  display: inline-block;
  color: var(--coral);
  white-space: nowrap;
}
.accent svg {
  position: absolute;
  left: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.32em;
  overflow: visible;
}
.accent svg path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  /* animated scribble draw-in */
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
}
.accent.is-drawn svg path,
.no-js .accent svg path {
  animation: scribble 0.6s var(--ease-out) 0.35s forwards;
}
@keyframes scribble { to { stroke-dashoffset: 0; } }

/* ---- Ghost background word ---- */
.ghost-word {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.ghost-word span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24vw;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--mist);
  opacity: 0.9;
  transform: translateY(8%);
}
.ghost-word--dark span { -webkit-text-stroke-color: var(--ink-soft); }

/* ---- Reveal (JS adds .is-visible) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px) rotate(0.6deg);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-spring);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Reduced motion: honor user preference globally ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .accent svg path { stroke-dashoffset: 0; animation: none; }
  .final-cta__loud svg path { stroke-dashoffset: 0; animation: none; }
}
