/* =========================================
   REFRAME — Landing Page Styles
   ========================================= */

:root {
  --bg-primary: #0A0A0F;
  --bg-surface: #12121A;
  --bg-surface-hover: #1a1a28;
  --accent-green: #00FF88;
  --accent-cyan: #00D4FF;
  --text-primary: #FFFFFF;
  --text-muted: rgba(255,255,255,0.6);
  --font-display: 'Clash Display', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --glow-green: 0 0 20px rgba(0,255,136,0.3), 0 0 60px rgba(0,255,136,0.1);
  --glow-cyan: 0 0 20px rgba(0,212,255,0.3), 0 0 60px rgba(0,212,255,0.1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Utility */
.accent-green { color: var(--accent-green); }
.accent-cyan { color: var(--accent-cyan); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.section-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  text-align: center;
  margin-bottom: 4rem;
  opacity: 0;
}
.section-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  text-align: center;
  opacity: 0;
}

/* =========================================
   NAV
   ========================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(0);
  transition: transform 0.35s ease;
}
.nav--hidden { transform: translateY(-100%); }
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-green);
  letter-spacing: 0.05em;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__globe {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero__globe canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  pointer-events: none;
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  opacity: 0;
}
.hero__subtitle {
  margin-top: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--accent-cyan);
  min-height: 2em;
}
.typewriter-cursor {
  animation: blink 0.8s step-end infinite;
  color: var(--accent-cyan);
}
@keyframes blink { 50% { opacity: 0; } }

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: var(--text-muted);
  animation: bounce 2s ease infinite;
  opacity: 0;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.hero__particles, .cta__particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* =========================================
   VERTICALS
   ========================================= */
.verticals {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.verticals__grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.vertical-block {
  flex: 0 0 auto;
  width: 260px;
  padding: 3rem 2rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  background: var(--bg-surface);
  cursor: default;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(40px);
}
.vertical-block:hover, .vertical-block:active {
  border-color: var(--accent-green);
  background: var(--bg-surface-hover);
  box-shadow: var(--glow-green);
}
.vertical-block__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.vertical-block:hover .vertical-block__icon,
.vertical-block:active .vertical-block__icon {
  color: var(--accent-green);
}
.vertical-block__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}

.icon-dice { animation: diceSpin 6s linear infinite; }
.icon-ball { animation: ballBounce 3s ease-in-out infinite; }
.icon-cards { animation: cardShuffle 4s ease-in-out infinite; }

@keyframes diceSpin {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}
@keyframes ballBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes cardShuffle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* =========================================
   REACH
   ========================================= */
.reach {
  padding: 6rem 2rem;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0d0d18 50%, var(--bg-primary) 100%);
}
.reach__map-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 3rem;
}
.reach__map {
  width: 100%;
  height: auto;
}
.reach__map path {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 0.8;
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  transition: stroke-dashoffset 3s ease;
}
.reach__map.drawn path {
  stroke-dashoffset: 0;
}
.reach__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.geo-marker {
  position: absolute;
  width: 12px; height: 12px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  opacity: 0;
}
.geo-marker__dot {
  width: 12px; height: 12px;
  background: var(--accent-green);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: var(--glow-green);
}
.geo-marker__ping {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent-green);
  border-radius: 50%;
  opacity: 0;
}
.geo-marker.active { opacity: 1; }
.geo-marker.active .geo-marker__ping {
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}
.geo-marker__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.geo-marker:hover .geo-marker__tooltip { opacity: 1; }

/* =========================================
   MODEL
   ========================================= */
.model {
  padding: 8rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.model__cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}
.model-card {
  flex: 0 0 280px;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: var(--bg-surface);
  opacity: 0;
  transform: translateY(30px);
}
.model-card--hybrid {
  border-color: var(--accent-green);
  box-shadow: var(--glow-green);
  opacity: 0;
  transform: scale(0.9);
}
.model-card__icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
}
.model-card--hybrid .model-card__icon { color: var(--accent-green); }
.model-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.model-card--hybrid .model-card__title { color: var(--accent-green); }
.model-card__text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================
   DIFFERENTIATORS
   ========================================= */
.diff {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0e0e1a 50%, var(--bg-primary) 100%);
}
.diff__wrapper {
  height: 100vh;
  overflow: hidden;
}
.diff__panel {
  display: flex;
  width: 300vw;
  height: 100vh;
}
.diff__slide {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 2rem 6rem;
}
.diff__slide-visual {
  flex: 0 0 400px;
}
.diff__slide-visual canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.diff__slide-content {
  max-width: 440px;
}
.diff__slide-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 1rem;
  color: var(--accent-green);
  opacity: 0;
  transform: translateY(20px);
}
.diff__slide-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}
.diff__progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 10;
}
.diff__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(0,255,136,0.5);
  transition: width 0.1s linear;
}

/* =========================================
   CTA
   ========================================= */
.cta {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cta__content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.cta__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
}
.cta__email {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 2.5rem);
  color: var(--accent-green);
  position: relative;
  padding: 0.25em 0;
  animation: emailPulse 3s ease-in-out infinite;
  opacity: 0;
  transform: translateY(20px);
}
.cta__email::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(0,255,136,0.5);
  transition: width 0.4s ease;
}
.cta__email:hover::after { width: 100%; }
@keyframes emailPulse {
  0%, 100% { text-shadow: 0 0 10px rgba(0,255,136,0.2); }
  50% { text-shadow: 0 0 20px rgba(0,255,136,0.4), 0 0 40px rgba(0,255,136,0.15); }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .diff__slide {
    flex-direction: column;
    padding: 2rem 3rem;
    gap: 2rem;
  }
  .diff__slide-visual { flex: 0 0 auto; max-width: 300px; }
}

@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .verticals__grid { flex-direction: column; align-items: center; }
  .vertical-block { width: 100%; max-width: 320px; }
  .model__cards { flex-direction: column; align-items: center; }
  .model-card { flex: 0 0 auto; width: 100%; max-width: 320px; }

  /* Disable horizontal scroll on mobile */
  .diff__wrapper { height: auto; overflow: visible; }
  .diff__panel {
    flex-direction: column;
    width: 100%;
    height: auto;
  }
  .diff__slide {
    flex: 0 0 auto;
    height: auto;
    min-height: 80vh;
    padding: 4rem 1.5rem;
    flex-direction: column;
  }
  .diff__slide-visual { max-width: 280px; }
  .diff__progress { display: none; }

  .hero__headline { font-size: clamp(2rem, 8vw, 3rem); }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__scroll-indicator { animation: none; opacity: 0.6; }
  .section-headline, .section-text,
  .vertical-block, .model-card, .model-card--hybrid,
  .diff__slide-headline, .diff__slide-text,
  .cta__headline, .cta__email, .hero__headline,
  .hero__scroll-indicator {
    opacity: 1 !important;
    transform: none !important;
  }
}
