/*
 * deltaloop-marketing/hero - block stylesheet.
 *
 * Auto-extracted from the monolithic style.css. References
 * design tokens from assets/css/tokens.css. Loaded by
 * WordPress when the block renders (via block.json `style`).
 */

/* ─────────────────────────────────────────────────────────
   Hero - editorial split.
   Left: eyebrow + oversized sans headline with signal-green
   hand-drawn underline + subhead + gradient CTA.
   Right: a live "signal card" - orbit pulse + agent feed -
   that introduces the Loop metaphor in the first screen.
   See Hero.jsx + HeroSignal.jsx
   ───────────────────────────────────────────────────────── */

.hero-v3 {
  position: relative;
  min-height: 100vh;
  width: 100%;
  /* Pull the hero up under the translucent fixed nav so the hero
     covers the full viewport; the 140px top padding below then puts
     the first content line clear of the nav. */
  margin-top: calc(var(--nav-height) * -1);
  padding: 140px 56px 80px;
  overflow: hidden;
  isolation: isolate;
  color: var(--on-surface);
  background: var(--surface-canvas);
}

/* ── Ambient background ── */

.hero-v3-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-v3-ambient-grid {
  position: absolute;
  inset: -80px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, black 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, black 30%, transparent 85%);
}

.hero-v3-ambient-glow {
  position: absolute;
  top: -30%;
  right: -15%;
  width: 80vw;
  height: 80vw;
  max-width: 1100px;
  max-height: 1100px;
  background: radial-gradient(circle at center,
    rgba(20,227,156,0.22) 0%,
    rgba(20,227,156,0.08) 30%,
    transparent 60%);
  filter: blur(20px);
  animation: hero-v3-breathe 14s ease-in-out infinite;
}

.hero-v3-ambient-noise {
  position: absolute;
  inset: 0;
  background-image: var(--noise-url);
  background-size: 180px 180px;
  opacity: 0.18;
}

/* ── Top marquee ── */

.hero-v3-marquee {
  position: absolute;
  top: 80px;
  left: 0; right: 0;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: rgba(10,12,16,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: 34px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.hero-v3-marquee-track {
  display: flex;
  animation: hero-v3-marquee 40s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.hero-v3-marquee-group {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-right: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--on-surface-variant);
}

.hero-v3-marquee-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--primary-container);
  box-shadow: 0 0 8px var(--primary-container);
  animation: signal-pulse 2s ease-in-out infinite;
}

.hero-v3-marquee-sep { color: var(--primary-container); opacity: 0.55; }

/* ── Main split layout ── */

.hero-v3-inner {
  position: relative;
  z-index: 3;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  min-height: calc(100vh - 140px);
}

/* ── LEFT: copy ── */

.hero-v3-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 640px;
}

.hero-v3-headline {
  margin: 0;
  font-size: clamp(56px, 7.6vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-v3-headline-accent {
  position: relative;
  display: inline-block;
  color: var(--primary-container);
}

.hero-v3-underline {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.28em;
  color: var(--primary-container);
  opacity: 0;
  filter: drop-shadow(0 0 12px rgba(20,227,156,0.5));
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation:
    hero-v3-underline-draw 1.1s var(--ease-expo, cubic-bezier(0.16,1,0.3,1)) 0.6s forwards,
    hero-v3-underline-show 0.4s linear 0.6s forwards;
}

.hero-v3-subhead {
  margin: 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-surface-variant);
}

/* CTAs */

.hero-v3-ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.hero-v3-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 28px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.hero-v3-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-surface);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 4px;
  border-bottom: 1px solid var(--hairline-strong);
  transition: color var(--duration-fast) var(--ease-expo),
              border-color var(--duration-fast) var(--ease-expo);
}

.hero-v3-cta-link:hover {
  color: var(--primary-container);
  border-color: var(--hairline-accent);
}

.hero-v3-cta-link-arrow {
  transition: transform var(--duration-fast) var(--ease-expo);
  display: inline-block;
}

.hero-v3-cta-link:hover .hero-v3-cta-link-arrow { transform: translateX(4px); }

/* ── Scroll indicator ── */

.hero-v3-scroll {
  position: absolute;
  right: 56px; bottom: 32px;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--outline);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-expo);
}

.hero-v3-scroll:hover { color: var(--on-surface); }

.hero-v3-scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--hairline-strong), transparent);
  position: relative;
  overflow: hidden;
}

.hero-v3-scroll-line::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -20px;
  width: 3px; height: 20px;
  background: var(--primary-container);
  filter: blur(1px);
  animation: hero-v3-scroll-drop 2.2s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────
   HeroSignal - right-side visualization
   ───────────────────────────────────────────────────────── */

.hero-v3-vis {
  position: relative;
  height: 100%;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 1100px) {
  .hero-v3 { padding: 120px 36px 60px; }
  .hero-v3-inner { gap: 48px; }
}

@media (max-width: 900px) {
  .hero-v3-inner {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 48px;
  }
  .hero-v3-scroll { display: none; }
  .hero-v3 { padding: 120px 24px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v3-ambient-glow,
.hero-v3-marquee-track,
.hero-v3-scroll-line::after { animation: none !important; }
}

/* Hero transitions respected by parallax block below */

.hero-v3-ambient,
.hero-v3-vis,
.hero-v3-copy {
  transition: opacity 400ms linear;
}

/* HERO - scroll-driven parallax (uses --hero-progress 0..1) */

.hero-v3-ambient-glow {
  transform: translate3d(0, calc(var(--hero-progress, 0) * -140px), 0) scale(calc(1 + var(--hero-progress, 0) * 0.12));
}

.hero-v3-ambient-grid {
  transform: translate3d(0, calc(var(--hero-progress, 0) * 80px), 0);
}

.hero-v3-vis {
  transform: translate3d(0, calc(var(--hero-progress, 0) * -60px), 0);
  opacity: calc(1 - var(--hero-progress, 0) * 0.7);
}

.hero-v3-copy {
  transform: translate3d(0, calc(var(--hero-progress, 0) * -30px), 0);
  opacity: calc(1 - var(--hero-progress, 0) * 0.7);
}

.hero-v3-marquee {
  opacity: calc(1 - var(--hero-progress, 0) * 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .hero-v3-ambient-glow,
.hero-v3-ambient-grid,
.hero-v3-vis,
.hero-v3-copy,
.hero-v3-marquee { transform: none !important; opacity: 1 !important; }
}

/* Hero top padding was 140px - too tall on most laptop viewports.
   Tighten so the headline + CTA row stay above the fold. */

.hero-v3 {
  padding-top: 96px;
  padding-bottom: 0;
}

@media (max-width: 1024px) {
  .hero-v3 { padding-top: 84px; }
}

@media (max-width: 640px) {
  .hero-v3 { padding-top: 72px; }
}

/* ────────────────── TABLET (< 1024px) ────────────────── */

@media (max-width: 1024px) {
  /* Hero stacks vertically */
  .hero-v3 { padding: 84px 32px 0; }
  .hero-v3-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero-v3-vis { max-width: 640px; margin: 0 auto; width: 100%; }
  .hero-v3-headline { font-size: clamp(48px, 8vw, 80px); }
  .hero-v3-scroll { display: none; }
}

/* ────────────────── PHONE (< 640px) ────────────────── */

@media (max-width: 640px) {
  /* Hero */
  .hero-v3 { padding: 72px 20px 0; }
  .hero-v3-inner { gap: 40px; }
  .hero-v3-headline { font-size: clamp(36px, 11vw, 56px); }
  .hero-v3-subhead { font-size: 16px; }
  .hero-v3-ctas { flex-direction: column; align-items: stretch; gap: 16px; }
  .hero-v3-cta-primary { width: 100%; justify-content: center; }
  .hero-v3-cta-link { justify-content: center; }
  .hero-v3-marquee { font-size: 10px; }
}

/* Very small phones - tiny extra tighten */

@media (max-width: 380px) {
  .hero-v3 { padding: 64px 16px 0; }
}

/* iOS 100vh bug - use dynamic viewport height where supported. */

.hero-v3 {
  min-height: 100vh;      /* legacy fallback */
  min-height: 100dvh;     /* correct on iOS 16+/Android */
}

/* Marquee edge fade so text doesn't hard-cut on narrow screens. */

.hero-v3-marquee-track {
  mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

/* Respect user's motion preference - pause the expensive stuff. */

@media (prefers-reduced-motion: reduce) {
  .hero-v3-marquee-track {
    animation: none !important;
  }
}

/* ────────────────── PHONE overrides (refined) ────────────────── */

@media (max-width: 640px) {
  .hero-v3-cta-primary {
    min-height: 48px;
    height: auto;
    padding: 12px 22px;
  }
  .hero-v3-cta-link {
    min-height: 44px;
    padding: 12px 0;
  }
  /* Hero signal: full width of column on phone */
  .hero-v3-vis { max-width: 100%; }
  /* The hero "scroll" indicator is decorative - hide on phones */
  .hero-v3-scroll { display: none; }
}
