/* ============================================================
   Hero — mask reveal ("the frame" underneath)
   Drop-in for 02-hero.html. Uses your tokens where present,
   with literal fallbacks so it works standalone too.
   ============================================================ */

.hero-reveal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-background, #F4F0EB);
  color: var(--color-foreground, #262018);
  font-family: var(--font-family-primary, 'General Sans', system-ui, sans-serif);
  z-index: 0;
}

.hero-spacer {
  height: 100vh;
  pointer-events: none;
}

/* --- the layer revealed under the cursor ------------------- */
.hero-under {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  will-change: mask-image, opacity;
  transform: translateZ(0);
}
.hero-under__field { position: absolute; inset: 0; background: #E4E7F9; }
.hero-under__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(33,87,200,0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(33,87,200,0.13) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero-under__cols {
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(33,87,200,0.22) 1px, transparent 1px);
  background-size: 128px 100%;
}

/* measured bounding boxes, injected by hero-reveal.js */
.frame-box { position: absolute; border: 1.5px solid rgba(33,87,200,0.85); }
.frame-box__label {
  position: absolute; left: -1px; top: -17px;
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.11em;
  text-transform: uppercase; white-space: nowrap;
  color: var(--color-primary, #2157C8);
}
.frame-box__label--below { top: auto; bottom: -17px; }
.frame-box__handle {
  position: absolute; width: 5px; height: 5px;
  background: var(--color-background, #F4F0EB);
  border: 1px solid var(--color-primary, #2157C8);
}
.frame-box__handle--tl { left: -3px; top: -3px; }
.frame-box__handle--tr { right: -3px; top: -3px; }
.frame-box__handle--bl { left: -3px; bottom: -3px; }
.frame-box__handle--br { right: -3px; bottom: -3px; }

/* --- content ---------------------------------------------- */
.hero-main {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 330px);
  align-items: end;
  gap: clamp(32px, 5vw, 80px);
  width: 100%;
  max-width: 96rem;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(132px, 18vh, 200px) var(--page-margin-desktop, 52px) clamp(28px, 5vh, 56px);
}
.hero-lead { display: flex; flex-direction: column; gap: clamp(18px, 2.6vh, 30px); }
.hero-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--color-primary, #2157C8);
}
.hero-title {
  margin: 0; max-width: 15ch;
  font-weight: 200;
  font-size: clamp(44px, 8.4vw, 132px);
  line-height: 0.9; letter-spacing: -0.036em;
  text-wrap: balance;
}
.hero-title em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic; font-weight: 400; letter-spacing: -0.02em;
}
.hero-aside {
  display: flex; flex-direction: column;
  gap: clamp(20px, 3vh, 32px);
  padding-bottom: clamp(6px, 1.4vh, 14px);
}
.hero-body {
  margin: 0; max-width: 30ch;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  color: color-mix(in srgb, var(--color-foreground, #262018) 72%, transparent);
}
.cta-down {
  display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; text-decoration: none;
  color: color-mix(in srgb, var(--color-foreground, #262018) 68%, transparent);
  transition: color 300ms cubic-bezier(.22,.9,.24,1);
}
.cta-down:hover { color: var(--color-foreground, #262018); }
.cta-down .cta-arrow {
  font-size: 18px; font-weight: 300; line-height: 1;
  color: var(--color-primary, #2157C8);
  transition: transform 400ms cubic-bezier(.22,.9,.24,1);
}
.cta-down:hover .cta-arrow { transform: translateY(5px); }

.hero-footer {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  justify-content: space-between; align-items: baseline;
  width: 100%;
  max-width: 96rem;
  margin: 0 auto clamp(22px, 3.4vh, 34px);
  padding: 16px var(--page-margin-desktop, 52px) 0;
  border-top: 1px solid rgba(33,87,200,0.35);
  font-size: 12.5px;
  color: color-mix(in srgb, var(--color-foreground, #262018) 50%, transparent);
}
.hero-footer__hint { display: inline-flex; align-items: center; gap: 9px; color: var(--color-primary, #2157C8); }
.hero-footer__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--color-primary, #2157C8); }

/* cursor chip */
.hero-chip {
  position: absolute; left: 0; top: 0; z-index: 4;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%);
  padding: 6px 12px; border-radius: 999px;
  background: var(--color-primary, #2157C8); color: #fff;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; white-space: nowrap;
}

@media (max-width: 860px) {
  .hero-main { grid-template-columns: 1fr; align-items: start; gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-under, .hero-chip { display: none; }
}
