/* ==========================================================================
   Y.O.Y — reset, primitives, shared components
   ========================================================================== */

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

/* `hidden` must beat any component `display` rule */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--yoy-amber); outline-offset: 4px; }
::selection { background: var(--yoy-red); color: var(--yoy-paper); }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 999;
  padding: 12px 20px; background: var(--yoy-amber); color: #14060A; font-weight: 600;
}
.skip-link:focus { top: 16px; }

.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;
}

/* ---- Layout primitives ------------------------------------------------- */

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

.section {
  position: relative;
  padding-block: var(--sp-section);
  background: var(--ground, var(--ink-900));
  color: var(--body-color, var(--cream));
}

/* ---- Grain overlay ------------------------------------------------------ */

.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  opacity: 0.14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ---- Eyebrow (mono label + red dash) ------------------------------------ */

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent, var(--yoy-amber));
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px;
  background: var(--yoy-red-hot); flex-shrink: 0;
}
.eyebrow--center { justify-content: center; }

/* ---- Display type -------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-display);
  font-size: var(--fs-h1);
  text-wrap: balance;
}
.display--h2 { font-size: var(--fs-h2); }
.display--h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }

/* The one-word emphasis device: an editorial serif italic dropped into a
   grotesque heading. Sized up a touch because Instrument Serif runs small
   against Bricolage's large x-height. */
.em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  color: var(--accent, var(--yoy-amber));
  padding-right: 0.04em;
}

.lede {
  font-size: clamp(1.0625rem, 0.45vw + 0.95rem, 1.3125rem);
  line-height: 1.6;
  color: var(--muted, var(--cream-70));
  max-width: var(--measure);
  text-wrap: pretty;
}

/* SplitText masks (classed via wordsClass 'sw' / linesClass 'sl') clip at
   the line box, which slices italic overhangs and descenders — Instrument
   Serif's italic g drops well below the baseline. Grow the clip box without
   moving the layout. */
.sw-mask, .sl-mask {
  padding: 0.12em 0.12em 0.3em;
  margin: -0.12em -0.12em -0.3em;
}

/* ==========================================================================
   BUTTONS — "the Strike"
   The logo is a word struck through by a red rule that ends in a ball.
   The primary button IS that rule: a square-cut bar terminating in a ball
   that's taller than the bar, exactly as in the mark.
   ========================================================================== */

.strike {
  --h: 56px;
  --ball: 66px;
  --bar: var(--yoy-amber);
  --bar-ink: #14060A;
  --wipe: #14060A;
  --wipe-ink: var(--yoy-amber);
  --ball-bg: var(--yoy-red);
  --tuck: calc(var(--ball) * 0.3);

  position: relative;
  display: inline-flex;
  align-items: center;
  isolation: isolate;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.strike__bar {
  position: relative;
  display: flex; align-items: center;
  height: var(--h);
  padding: 0 calc(24px + var(--tuck)) 0 26px;
  margin-right: calc(var(--tuck) * -1);
  background: var(--bar);
  color: var(--bar-ink);
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
/* the dark wipe that floods the bar from the left, like the rule drawing */
.strike__bar::before {
  content: ""; position: absolute; inset: 0;
  background: var(--wipe);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.75s var(--e-out);
}
/* a hairline "score" along the bottom edge — reads as the rule's edge */
.strike__bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--yoy-red); opacity: 0.55;
}
.strike__label {
  position: relative; z-index: 1; display: block;
  height: 1.2em; line-height: 1.2em; overflow: hidden;
}
.strike__label > span { display: block; position: relative; transition: transform 0.65s var(--e-out); }
.strike__label > span::after {
  content: attr(data-t);
  position: absolute; left: 0; top: 100%;
  color: var(--wipe-ink);
}
.strike__ball {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: var(--ball); height: var(--ball);
  border-radius: 50%;
  background: var(--ball-bg);
  color: var(--yoy-paper);
  overflow: hidden;
  box-shadow: inset 0 -6px 14px rgba(0,0,0,0.22), inset 0 4px 10px rgba(255,255,255,0.08);
  transition: transform 0.7s var(--e-out);
}
.strike__arrow {
  grid-area: 1 / 1;
  width: 20px; height: 20px;
  transition: transform 0.6s var(--e-out);
}
.strike__arrow--in { transform: translateX(-260%); }   /* fully outside the ball */

.strike:hover .strike__bar::before,
.strike:focus-visible .strike__bar::before { transform: scaleX(1); }
.strike:hover .strike__label > span,
.strike:focus-visible .strike__label > span { transform: translateY(-100%); }
.strike:hover .strike__ball,
.strike:focus-visible .strike__ball { transform: translateX(8px) scale(1.04); }
.strike:hover .strike__arrow--out,
.strike:focus-visible .strike__arrow--out { transform: translateX(260%); }
.strike:hover .strike__arrow--in,
.strike:focus-visible .strike__arrow--in { transform: translateX(0); }
.strike:active .strike__ball { transform: translateX(4px) scale(0.96); }

.strike--sm { --h: 42px; --ball: 48px; }
.strike--sm .strike__bar { font-size: 0.875rem; padding-left: 18px; }
.strike--sm .strike__arrow { width: 16px; height: 16px; }

/* on oxblood the amber bar sits better as gold */
[data-ground="oxblood"] .strike { --bar: var(--yoy-amber); }

/* ---- Secondary: text riding a rule that ends in a ball ------------------ */

.strike-link {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-sans);
  font-size: 1rem; font-weight: 600;
  color: var(--body-color, var(--cream));
  padding-block: 10px;
  transition: color var(--d-fast) var(--e-out);
}
.strike-link__rule {
  position: relative; display: block;
  width: 44px; height: 2px;
  background: var(--yoy-red-hot);
  transition: width 0.7s var(--e-out);
}
.strike-link__rule::after {
  content: ""; position: absolute; right: -5px; top: 50%;
  width: 11px; height: 11px; margin-top: -5.5px;
  border-radius: 50%; background: var(--yoy-red-hot);
  transition: transform 0.7s var(--e-out);
}
.strike-link:hover, .strike-link:focus-visible { color: var(--accent, var(--yoy-amber)); }
.strike-link:hover .strike-link__rule,
.strike-link:focus-visible .strike-link__rule { width: 86px; }
.strike-link:hover .strike-link__rule::after,
.strike-link:focus-visible .strike-link__rule::after { transform: scale(1.35); }

/* ---- The red rule divider ----------------------------------------------- */

.rule-divider { display: flex; align-items: center; width: 100%; }
.rule-divider__line { flex-grow: 1; height: 2px; background: var(--yoy-red-hot); transform-origin: left center; }
.rule-divider__ball { width: 12px; height: 12px; border-radius: 50%; background: var(--yoy-red-hot); flex-shrink: 0; margin-left: -1px; }

/* ---- Section head pattern ------------------------------------------------ */

.s-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: clamp(2rem, 6vw, 6rem); flex-wrap: wrap;
  margin-bottom: clamp(2.75rem, 5vw, 4.75rem);
}
.s-head__title { margin-top: 1.1rem; }
.s-head__aside { max-width: 36ch; }
.s-head__aside .strike-link { margin-top: 1rem; }

/* ---- Scroll progress: the rule, drawn by the page itself ---------------- */

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: var(--z-progress); pointer-events: none;
}
.progress__line {
  position: absolute; inset: 0;
  background: var(--yoy-red-hot);
  transform: scaleX(0); transform-origin: left center;
}
.progress__ball {
  position: absolute; top: 50%; left: 0;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--yoy-red-hot);
  box-shadow: 0 0 12px rgba(212, 35, 28, 0.8);
  opacity: 0; transition: opacity 0.3s linear;
}

/* ---- Cursor bubble: a red ball that names what a click will do ---------- */

.cursor {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  pointer-events: none;
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: var(--yoy-red);
  color: var(--yoy-paper);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  transform: scale(0);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  .progress { display: none; }
}

/* ---- Safety nets ----------------------------------------------------------
   No JS: the preloader must never trap the page. */
html:not(.js) .preloader,
html:not(.js) .cursor,
html:not(.js) .progress { display: none; }
html:not(.js) body.is-loading { overflow: auto; }

/* Injected logos reserve their box up front, so nothing shifts on load
   (1386 / 610 is the logo's viewBox). */
[data-logo] { display: block; aspect-ratio: 1386 / 610; }
.footer__giant[data-logo] { aspect-ratio: 1386 / 537; }   /* cropped at 88% */
.logo-fallback { display: block; font-family: var(--font-serif); font-size: 1em; line-height: 1; }

/* Where the red cursor ball names the action, it replaces the arrow. */
@media (hover: hover) and (pointer: fine) {
  html.motion [data-cursor] { cursor: none; }
}
