/* ── Landing Page — Azraq Brand Compliant ── */
/* DESIGN.md v2 Direction C: "Probability Wave" */
/* One accent only: #117ACA. No glow, no glass, no particles. */
/* Fonts: Space Grotesk + Inter (inherited from azraq-theme.css) */

/* ── 1. HERO ── */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  border-bottom: 1px solid var(--border);
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* ── 2. KINETIC ENTRANCE (simplified, no blur) ── */
.kinetic-headline .kinetic-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: kinetic-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--w) * 0.08s + 0.15s);
}

@keyframes kinetic-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .kinetic-headline .kinetic-word {
    opacity: 1; transform: none; animation: none;
  }
}

/* ── 3. BROWSER CHROME PREVIEW ── */
.hero-section .browser-chrome {
  box-shadow: 0 0 0 1px var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-section .browser-chrome:hover {
  transform: translateY(-2px);
}

/* Scanline overlay inside browser body */
.browser-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  border-radius: inherit;
}

/* Ticker bar inside browser */
.browser-ticker {
  display: flex;
  overflow: hidden;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  padding: 0.375rem 0;
  font-size: 0.6875rem;
  color: var(--text-muted-dark);
  white-space: nowrap;
}

.browser-ticker-track {
  display: flex;
  gap: 2.5rem;
  animation: ticker-scroll 20s linear infinite;
  padding-left: 2.5rem;
}

.browser-ticker:hover .browser-ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Sparkline */
.browser-sparkline circle {
  animation: spark-pulse 2.5s ease-in-out infinite;
}

.browser-sparkline path:last-of-type {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: spark-draw 3s ease-out forwards;
}

@keyframes spark-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes spark-pulse {
  0%, 100% { r: 2.5; opacity: 1; }
  50%      { r: 4;   opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .browser-ticker-track { animation: none; }
  .browser-sparkline circle,
  .browser-sparkline path:last-of-type { animation: none; }
  .browser-sparkline path:last-of-type { stroke-dashoffset: 0; }
}

/* ── 4. TICKER TAPE TRUST BAR ── */
.ticker-tape {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: ticker-marquee 18s linear infinite;
}

.ticker-tape:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted-dark);
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-tape:hover .ticker-item {
  opacity: 0.8;
  filter: grayscale(0%);
}

@keyframes ticker-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; justify-content: center; width: auto; flex-wrap: wrap; }
}

/* ── 5. ODOMETER STATS ── */
.stat-number.is-counting {
  transition: filter 0.3s ease;
}

/* ── 6. AMBIENT STAT PULSE ── */
.stat-block {
  position: relative;
}

.stat-block::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.12;
  animation: stat-pulse 4s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}

.stat-block .stat-number,
.stat-block .stat-unit {
  position: relative;
  z-index: 1;
}

.stats-grid .stat-block:nth-child(1)::before { animation-delay: 0s; }
.stats-grid .stat-block:nth-child(2)::before { animation-delay: 1s; }
.stats-grid .stat-block:nth-child(3)::before { animation-delay: 2s; }
.stats-grid .stat-block:nth-child(4)::before { animation-delay: 3s; }

@keyframes stat-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.12; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stat-block::before { animation: none; opacity: 0.04; transform: translate(-50%, -50%) scale(1.2); }
}

/* ── 7. SCROLL REVEALS ── */
[data-reveal] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}

html.js-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.06s; }
[data-reveal-delay="2"] { transition-delay: 0.12s; }
[data-reveal-delay="3"] { transition-delay: 0.18s; }
[data-reveal-delay="4"] { transition-delay: 0.24s; }
[data-reveal-delay="5"] { transition-delay: 0.30s; }

[data-reveal-stagger] > *:nth-child(1) { transition-delay: 0.06s; }
[data-reveal-stagger] > *:nth-child(2) { transition-delay: 0.12s; }
[data-reveal-stagger] > *:nth-child(3) { transition-delay: 0.18s; }
[data-reveal-stagger] > *:nth-child(4) { transition-delay: 0.24s; }
[data-reveal-stagger] > *:nth-child(5) { transition-delay: 0.30s; }
[data-reveal-stagger] > *:nth-child(6) { transition-delay: 0.36s; }

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

/* ── 8. CARD HOVER (calm, no lift/scale) ── */
.grid-4 .card-v2.is-interactive {
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.grid-4 .card-v2.is-interactive:hover {
  background: var(--surface-hover);
  border-color: rgba(17,122,202,0.4);
}

/* ── 9. METHOD PATH ── */
.method-grid {
  position: relative;
}

.method-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.method-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 0.1s linear;
  opacity: 0.6;
}

.method-dot {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.method-card {
  position: relative;
  z-index: 1;
  transition: border-color 0.2s ease;
}

.method-card.is-lit {
  border-color: rgba(17,122,202,0.4);
}

@media (max-width: 1024px) {
  .method-path-svg { display: none; }
}

/* ── 10. INSIGHT CARDS ── */
.insight-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.insight-card:hover {
  border-color: rgba(17,122,202,0.25);
}

.insight-viz {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 80px;
  height: auto;
  opacity: 0.4;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.insight-card:hover .insight-viz {
  opacity: 0.7;
}

/* Geo dots pulse */
.geo-dot {
  animation: geo-pulse 2.5s ease-in-out infinite;
}
.geo-dot:nth-child(3n+1) { animation-delay: 0s; }
.geo-dot:nth-child(3n+2) { animation-delay: 0.8s; }
.geo-dot:nth-child(3n+3) { animation-delay: 1.6s; }

@keyframes geo-pulse {
  0%, 100% { r: 1.5; opacity: 1; }
  50%      { r: 2.5; opacity: 0.5; }
}

/* Bars grow on hover */
.bar-viz rect {
  transition: y 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.insight-card:hover .bar-viz rect:nth-child(1) { y: 30; height: 20; }
.insight-card:hover .bar-viz rect:nth-child(2) { y: 18; height: 32; }
.insight-card:hover .bar-viz rect:nth-child(3) { y: 8;  height: 42; }

/* Ring draws on hover */
.ring-progress {
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .insight-card:hover { transform: none; }
  .bar-viz rect, .ring-progress { transition: none; }
  .insight-card:hover .bar-viz rect:nth-child(1) { y: 30; height: 20; }
  .insight-card:hover .bar-viz rect:nth-child(2) { y: 18; height: 32; }
  .insight-card:hover .bar-viz rect:nth-child(3) { y: 8;  height: 42; }
}

/* ── 11. DAMPED WAVE MOTIF (signature) ── */
.wave-motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.wave-motif svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* ── 13. MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-section { padding-top: 0; }
  .hero-content { padding-top: 1.5rem !important; }
  .hero-section .split-layout { gap: 1.5rem; }
  .hero-section .browser-chrome { display: none; }
  .wave-motif svg { opacity: 0.5; }
  .ticker-tape { margin-top: 1rem; }
  .section-v2 { padding-block: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .grid-4 .card-v2.is-interactive { padding: 1.25rem; }
  .method-card .display-2 { font-size: 2rem; }
  .insight-viz { width: 60px; bottom: 0.75rem; right: 0.75rem; }
  .hero-section .display-1 { font-size: clamp(1.75rem, 6vw, 2.5rem); word-break: break-word; }
  .hero-section .body-1 { font-size: 0.9375rem; margin-bottom: 1.5rem !important; max-width: 100% !important; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
  .stat-block .stat-number { font-size: clamp(1.5rem, 5vw, 2rem); }
  .hero-section div[style*="margin-top:3rem"] { margin-top: 1.5rem !important; }
  .hero-section div[style*="display:flex; gap:1rem"] { gap: 0.75rem !important; }
  .hero-section .split-layout > * { min-width: 0; }
  .hero-content { padding-inline: 1.25rem !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .section-v2 { padding-block: 32px; }
  .kinetic-headline .kinetic-word { font-size: 0.85em; }
  .eyebrow { font-size: 0.65rem; }
  .hero-section .display-1 { font-size: 1.75rem; word-break: break-word; }
  .hero-content { padding-top: 1rem !important; padding-inline: 1rem !important; }
  .stat-block .stat-number { font-size: 1.5rem; }
  .hero-section .body-1 { max-width: 100% !important; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
}

/* ── 14. REDUCED MOTION GLOBAL ── */
@media (prefers-reduced-motion: reduce) {
  .blob-1, .blob-2, .blob-3, .blob-4 { animation: none; }
}
