/* Traffic Zen Flagship Stylesheet
 * Minimal, Steve Jobs-style presentation, 3D slanted phone transformation, Apple typography.
 */
:root {
  --bg: #000000;
  --text-main: #f5f5f7;
  --text-muted: #86868b;
  --text-dim: #424245;
  --green: #30d158;
  --green-glow: rgba(48, 209, 88, 0.4);
  --red: #ff453a;
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-stack);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Ambient Canvas Background */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#ambientCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(60px) brightness(0.22) saturate(1.4);
  transform: scale(1.2);
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.95) 85%);
}

/* Peripheral Halo */
.peripheral-halo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.peripheral-halo.active {
  animation: haloBloom 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes haloBloom {
  0% { opacity: 0; box-shadow: inset 0 0 60px rgba(48, 209, 88, 0.2); }
  25% { opacity: 1; box-shadow: inset 0 0 160px 50px rgba(48, 209, 88, 0.7); }
  60% { opacity: 0.8; box-shadow: inset 0 0 100px 30px rgba(48, 209, 88, 0.4); }
  100% { opacity: 0; box-shadow: inset 0 0 20px rgba(48, 209, 88, 0); }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand-text .green {
  color: var(--green);
}

.nav-cta {
  display: flex;
  align-items: center;
}

.nav-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-badge:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 40px;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
}

.app-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: #000000;
  padding: 12px 28px;
  border-radius: 36px;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
  cursor: default;
  user-select: none;
}

.pill-labels {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.pill-small {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #555555;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pill-bold {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 3 Pillars */
.pillar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 620px;
  margin: 0 auto;
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pillar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.pillar-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pillar-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   REEL SECTION (Fast 220vh track, 3D transform)
   ========================================================= */
.reel-section {
  position: relative;
  z-index: 10;
  height: 240vh; /* Fast, responsive scroll distance */
  margin-top: 40px;
}

.reel-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-light {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 69, 58, 0.2) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  transition: background 0.5s ease;
  z-index: 1;
}

.stage-light.green {
  background: radial-gradient(circle, rgba(48, 209, 88, 0.3) 0%, transparent 70%);
}

.reel-layout {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
}

/* Left Story Column */
.story-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.story-item {
  padding: 24px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0.3;
  transform: translateY(8px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-item.active {
  opacity: 1;
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.story-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #ffffff;
}

.story-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================================
   3D SLANTED IPHONE SHOWCASE
   ========================================================= */
.phone-viewport {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-3d-stage {
  perspective: 1400px;
}

.iphone-body {
  position: relative;
  width: 290px;
  height: 590px;
  border-radius: 48px;
  background: #15181e;
  padding: 8px;
  box-sizing: border-box;
  transform-style: preserve-3d;
  /* Hardware clipping fix for WebKit */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  overflow: hidden;
  /* Slanted 3D posture */
  transform: rotateY(-20deg) rotateX(8deg) rotateZ(1.5deg);
  box-shadow: 
    0 0 0 3px #323640,
    0 0 0 5px #171920,
    25px 30px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.4s ease;
  user-select: none;
  cursor: pointer;
}

.iphone-body.green-glow {
  box-shadow: 
    0 0 0 3px #323640,
    0 0 0 5px #171920,
    15px 25px 50px rgba(0, 0, 0, 0.8),
    0 0 70px rgba(48, 209, 88, 0.45);
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: #000000;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 24px;
  background: #000000;
  border-radius: 16px;
  z-index: 50;
}

#scrubCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Glass Sheen Specular */
.glass-sheen {
  position: absolute;
  inset: 8px;
  border-radius: 40px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  z-index: 40;
}

/* Authentic App HUD Overlay */
.app-hud {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 16px 20px;
  box-sizing: border-box;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hud-telemetry-badge {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(16, 20, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  letter-spacing: 0.04em;
}

/* Neural Vision Bounding Box Reticle */
.vision-reticle {
  position: absolute;
  left: 46.4%;
  top: 49.6%;
  width: 20px;
  height: 36px;
  border: 1.5px solid rgba(255, 69, 58, 0.9);
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(255, 69, 58, 0.45);
  pointer-events: none;
  transition: border-color 0.25s, box-shadow 0.25s, opacity 0.3s;
}

.vision-reticle.green {
  border-color: rgba(48, 209, 88, 0.95);
  box-shadow: 0 0 18px rgba(48, 209, 88, 0.65);
}

.reticle-label {
  position: absolute;
  top: -18px;
  left: -1px;
  background: #ff453a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: background 0.25s, color 0.25s;
}

.vision-reticle.green .reticle-label {
  background: #30d158;
  color: #000000;
}

.reticle-corner {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #ff453a;
  border-style: solid;
  transition: border-color 0.25s;
}

.vision-reticle.green .reticle-corner {
  border-color: #30d158;
}

.reticle-corner.tl {
  top: -2px; left: -2px;
  border-width: 2px 0 0 2px;
}
.reticle-corner.tr {
  top: -2px; right: -2px;
  border-width: 2px 2px 0 0;
}
.reticle-corner.bl {
  bottom: -2px; left: -2px;
  border-width: 0 0 2px 2px;
}
.reticle-corner.br {
  bottom: -2px; right: -2px;
  border-width: 0 2px 2px 0;
}

/* Top Status Pill */
.hud-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 20, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  transition: all 0.3s;
}

.hud-status-badge.green {
  background: rgba(10, 32, 18, 0.85);
  border-color: rgba(48, 209, 88, 0.4);
  color: #ffffff;
}

.hud-status-badge.green .hud-dot {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* Bottom Bar */
.hud-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-zoom-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 20, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
}

.hud-zoom-pill .pill-active {
  color: var(--green);
}

.hud-speed-pill {
  background: rgba(16, 20, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Edge Flash */
.edge-bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  box-shadow: inset 0 0 35px 8px rgba(48, 209, 88, 0.85);
}

.edge-bloom.flash {
  opacity: 1;
}

/* Fast Reel Controls */
.reel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 26, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  padding: 8px 16px;
  border-radius: 20px;
  margin-top: 18px;
  width: 290px;
  box-sizing: border-box;
}

.sound-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.sound-button.pulse-prompt {
  background: rgba(48, 209, 88, 0.15);
  animation: soundPulse 2s ease-in-out infinite;
}

@keyframes soundPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}

.reel-slider {
  flex: 1;
  accent-color: var(--green);
  cursor: pointer;
  height: 3px;
}

.frame-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* =========================================================
   TOP ROI FEATURES SECTION
   ========================================================= */
.roi-section {
  position: relative;
  z-index: 10;
  padding: 100px 24px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.roi-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 36px 30px;
  border-radius: 24px;
  transition: all 0.25s;
}

.roi-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.roi-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.roi-card-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Notify / Launch Section */
.notify-section {
  position: relative;
  z-index: 10;
  padding: 80px 24px 120px;
}

.notify-box {
  background: linear-gradient(135deg, rgba(20, 24, 32, 0.8) 0%, rgba(10, 12, 16, 0.9) 100%);
  border: 1px solid rgba(48, 209, 88, 0.25);
  border-radius: 32px;
  padding: 60px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  max-width: 680px;
  margin: 0 auto;
}

.app-icon-showcase {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.large-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 32px rgba(48, 209, 88, 0.3);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.large-app-icon:hover {
  transform: scale(1.05);
}

.notify-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.notify-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.coming-soon-badge-container {
  display: flex;
  justify-content: center;
}

/* Footer (100% Anonymous) */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 24px;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand .brand-text {
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Phone Tap Hint */
.phone-tap-hint {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 24, 30, 0.85);
  border: 1px solid rgba(48, 209, 88, 0.4);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 60;
  animation: pulseHint 2.2s infinite ease-in-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes pulseHint {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 10px rgba(48, 209, 88, 0.2); }
  50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 20px rgba(48, 209, 88, 0.5); }
}

.phone-tap-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  pointer-events: none;
}

/* Mobile Responsiveness (Apple iPhone Announcement Style) */
@media (max-width: 900px) {
  .reel-section {
    height: 280vh;
  }

  .reel-sticky {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 16px 16px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .reel-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    padding: 0;
  }

  .phone-viewport {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .iphone-body {
    width: min(240px, 64vw);
    height: min(480px, 48vh);
    border-radius: 40px;
    padding: 7px;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }

  .iphone-screen {
    border-radius: 33px;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }

  .dynamic-island {
    width: 70px;
    height: 20px;
    top: 10px;
    border-radius: 12px;
  }

  .app-hud {
    padding: 40px 12px 16px;
  }

  .hud-status-badge {
    padding: 4px 10px;
    font-size: 0.68rem;
  }

  .hud-telemetry-badge {
    font-size: 0.55rem;
    padding: 3px 6px;
  }

  .vision-reticle {
    width: 17px;
    height: 30px;
    left: 46.4%;
    top: 49.6%;
    border-radius: 3px;
  }

  .reticle-label {
    font-size: 0.50rem;
    top: -15px;
    padding: 1px 4px;
  }

  .reel-controls {
    width: min(240px, 64vw);
    margin-top: 8px;
    padding: 5px 12px;
    box-sizing: border-box;
    background: rgba(20, 22, 28, 0.85);
  }

  .sound-button {
    font-size: 0.68rem;
  }

  .story-column {
    order: 2;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
    max-width: 340px;
    min-height: 82px;
    margin-top: 6px;
    position: relative;
  }

  .story-item {
    grid-area: 1 / 1;
    background: rgba(20, 24, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 10px 16px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
  }

  .story-item.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    border-color: rgba(48, 209, 88, 0.4);
    background: rgba(16, 26, 20, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }

  .story-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: #ffffff;
  }

  .story-body {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-muted);
  }
}
