/* ═══════════════════════════════════════════
   BREATHESAFE — home.css
   Landing page only.
   Resets & tokens live in variables.css.
═══════════════════════════════════════════ */

/* ── NAVBAR (shared across all pages via navbar.css) ── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--bd);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 500;
  color: var(--or); letter-spacing: 0.04em;
}

.nav-links {
  display: flex; align-items: center; gap: 28px;
}

.nav-links a {
  font-size: 13px; font-weight: 400;
  color: var(--sa); letter-spacing: 0.02em;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--wm); }

/* hide dashboard link on landing page */
.nav-link-dash { display: none; }

.nav-cta {
  padding: 8px 20px; border-radius: 100px;
  background: var(--or);
  color: #fff !important; font-size: 13px; font-weight: 500;
  letter-spacing: 0.03em; transition: all 0.3s;
  box-shadow: 0 2px 16px rgba(198,93,7,0.22);
}
.nav-cta:hover {
  background: #A84D00;
  box-shadow: 0 4px 24px rgba(198,93,7,0.38);
  transform: translateY(-1px);
}

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--su); border: 1px solid var(--bd);
  color: var(--sa); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--or); color: var(--or);
  transform: rotate(20deg);
}

/* ═══════════════════════════════════════════
   AMBIENT
═══════════════════════════════════════════ */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 70% 15%, var(--amb-1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 15% 75%, var(--amb-2) 0%, transparent 55%);
  transition: background 0.4s ease;
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  height: 100vh; min-height: 640px;
  display: flex; align-items: center;
  padding: 0 6%; overflow: hidden;
}

#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ── inner split ── */
.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 55fr 45fr;
  align-items: center;
  gap: 40px;
}

/* ── LEFT ── */
.hero-left { display: flex; flex-direction: column; }

.hero-eyebrow {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--or); font-weight: 500; opacity: 0.8;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 300; line-height: 1.08;
  color: var(--wm); margin-bottom: 24px;
}
.hero-title em { font-style: italic; color: var(--or); }

.hero-desc {
  font-size: 15px; color: var(--sa);
  font-weight: 300; line-height: 1.85;
  max-width: 480px; margin-bottom: 36px;
}

.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.btn-primary {
  padding: 13px 32px; border-radius: 100px;
  background: var(--or); color: #fff;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(198,93,7,0.28);
}
.btn-primary:hover {
  background: #A84D00;
  box-shadow: 0 6px 32px rgba(198,93,7,0.44);
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 13px 28px; border-radius: 100px;
  background: transparent; border: 1px solid var(--bd);
  color: var(--sa); font-size: 13px; font-weight: 400;
  transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--or); color: var(--or); }

.hero-stats {
  display: flex; gap: 32px; margin-top: 44px;
  padding-top: 28px; border-top: 1px solid var(--bd);
}
.hs-val {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 300;
  color: var(--or); line-height: 1;
}
.hs-lbl {
  font-size: 11px; color: var(--sa);
  margin-top: 5px; font-weight: 300; letter-spacing: 0.03em;
}

/* ── RIGHT — floating data cards ── */
.hero-right {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hcard {
  position: absolute;
  background: var(--glass-bg);
  border: var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-xl);
  padding: 18px 22px;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hcard:hover {
  animation-play-state: paused;
  box-shadow: 0 16px 48px rgba(198,93,7,0.16);
}

/* float keyframes — each card gets its own timing so they feel independent */
@keyframes float1 {
  0%,100% { transform: rotate(2.5deg)  translateY(0px);   }
  50%      { transform: rotate(2.5deg)  translateY(-10px); }
}
@keyframes float2 {
  0%,100% { transform: rotate(-4deg)   translateY(0px);   }
  50%      { transform: rotate(-4deg)   translateY(-8px);  }
}
@keyframes float3 {
  0%,100% { transform: rotate(1.5deg)  translateY(0px);   }
  50%      { transform: rotate(1.5deg)  translateY(-12px); }
}
@keyframes float4 {
  0%,100% { transform: rotate(-2.5deg) translateY(0px);   }
  50%      { transform: rotate(-2.5deg) translateY(-7px);  }
}
@keyframes float5 {
  0%,100% { transform: rotate(4deg)    translateY(0px);   }
  50%      { transform: rotate(4deg)    translateY(-9px);  }
}

/* scattered — no two cards share the same column or row */
.hcard--aqi {
  top: 40px; right: 40px;
  width: 168px;
  z-index: 5;
  animation: float1 5s ease-in-out infinite;
}
.hcard--temp {
  top: 60px; left: 30px;
  width: 160px;
  z-index: 4;
  animation: float2 6.5s ease-in-out infinite;
}
.hcard--hum {
  top: 200px; left: 100px;
  width: 152px;
  z-index: 3;
  animation: float3 4.8s ease-in-out infinite;
}
.hcard--wind {
  bottom: 100px; right: 50px;
  width: 156px;
  z-index: 4;
  animation: float4 7s ease-in-out infinite;
}
.hcard--pollen {
  bottom: 30px; left: 20px;
  width: 162px;
  z-index: 3;
  animation: float5 5.5s ease-in-out infinite;
}

.hcard-label {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mu); font-weight: 500; margin-bottom: 8px;
}
.hcard-val {
  font-family: var(--font-serif);
  font-size: 34px; font-weight: 300;
  color: var(--or); line-height: 1;
  margin-bottom: 5px;
}
.hcard-sub {
  font-size: 11px; color: var(--sa); font-weight: 300; line-height: 1.4;
}

/* AQI status dot */
.hcard-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4caf7d;
  position: absolute; top: 20px; right: 18px;
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 2; opacity: 0.55;
  cursor: pointer; transition: opacity 0.3s;
}
.scroll-hint:hover { opacity: 1; }
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--or));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.3; } 50% { opacity: 1; }
}
.scroll-hint span {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--sa); font-weight: 500;
}

/* ═══════════════════════════════════════════
   WAVE DIVIDER
   — sits inside .hero on desktop (absolute, bottom)
   — sits outside as block element on mobile
═══════════════════════════════════════════ */
.wave-divider {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 80px;
  z-index: 2; pointer-events: none;
}
#waveCanvas { width: 100%; height: 80px; display: block; }

/* on mobile, wave is hidden — it's inside the hero which goes auto height */
@media (max-width: 700px) {
  .wave-divider { display: none; }
}

/* ═══════════════════════════════════════════
   SHARED SECTION
═══════════════════════════════════════════ */
.section { position: relative; z-index: 1; padding: 88px 8%; }

.section-ey {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--or); opacity: 0.75; margin-bottom: 12px; font-weight: 500;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 300; color: var(--wm);
  line-height: 1.22; margin-bottom: 12px;
}
.section-title em { font-style: italic; color: var(--or); }

.section-sub {
  font-size: 14px; color: var(--sa);
  font-weight: 300; line-height: 1.85; max-width: 520px;
}

/* ═══════════════════════════════════════════
   FEATURES
═══════════════════════════════════════════ */
.features-section {
  background: var(--sect-alt);
  border-top: 1px solid var(--sect-alt-border);
  border-bottom: 1px solid var(--sect-alt-border);
}
.features-header { margin-bottom: 48px; }
.features-grid   { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }

.feature-card {
  padding: 28px 26px; border-radius: var(--r-xl);
  background: var(--bg); border: 1px solid var(--bd);
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
  display: flex; flex-direction: column; gap: 10px;
}
.feature-card:hover {
  border-color: rgba(198,93,7,0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(198,93,7,0.10);
}

.fc-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(198,93,7,0.08); border: 1px solid rgba(198,93,7,0.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 4px;
}
.fc-name { font-size: 15px; font-weight: 500; color: var(--wm); }
.fc-desc { font-size: 13px; color: var(--sa); font-weight: 300; line-height: 1.65; }
.fc-tag  {
  display: inline-block; margin-top: 4px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px;
  background: rgba(198,93,7,0.07); border: 1px solid rgba(198,93,7,0.14);
  color: var(--or);
}

/* ═══════════════════════════════════════════
   LIVE SNAPSHOT
═══════════════════════════════════════════ */
.snapshot-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 40px; }
.snap-card {
  padding: 26px 24px; border-radius: var(--r-xl);
  background: var(--su); border: 1px solid var(--bd);
}
.snap-label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mu); margin-bottom: 10px; font-weight: 500;
}
.snap-val  { font-family: var(--font-serif); font-size: 42px; font-weight: 300; color: var(--or); line-height: 1; margin-bottom: 6px; }
.snap-desc { font-size: 12px; color: var(--sa); font-weight: 300; }

/* ═══════════════════════════════════════════
   HACKATHON
═══════════════════════════════════════════ */
.hack-section { background: var(--sect-alt); border-top: 1px solid var(--sect-alt-border); }
.hack-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; margin-top: 48px; }

.sdg-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.sdg-pill  {
  padding: 5px 14px; border-radius: 100px;
  background: rgba(198,93,7,0.07); border: 1px solid rgba(198,93,7,0.18);
  font-size: 11px; color: var(--or); font-weight: 500;
}

.hack-desc   { font-size: 14px; color: var(--sa); line-height: 1.9; font-weight: 300; margin-bottom: 28px; }
.stack-label { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mu); margin-bottom: 12px; font-weight: 500; }
.stack-grid  { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-chip  { padding: 6px 14px; border-radius: 100px; background: var(--su); border: 1px solid var(--bd); font-size: 12px; color: var(--sa); font-weight: 400; }

.impact-cards { display: flex; flex-direction: column; gap: 12px; }
.impact-card  {
  padding: 18px 20px; border-radius: var(--r-lg);
  background: var(--bg); border: 1px solid var(--bd);
  box-shadow: var(--card-shadow);
  display: flex; align-items: flex-start; gap: 14px;
  transition: border-color 0.3s;
}
.impact-card:hover { border-color: rgba(198,93,7,0.25); }
.ic-ico   { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: rgba(198,93,7,0.08); border: 1px solid rgba(198,93,7,0.15); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ic-title { font-size: 13px; font-weight: 500; color: var(--wm); margin-bottom: 3px; }
.ic-desc  { font-size: 12px; color: var(--sa); font-weight: 300; line-height: 1.55; }

/* ═══════════════════════════════════════════
   VISION
═══════════════════════════════════════════ */
.vision-section { text-align: center; }
.vision-body {
  max-width: 680px; margin: 24px auto 0;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300; line-height: 1.75; color: var(--sa);
}
.vision-body em { font-style: italic; color: var(--or); }
.vision-cta { margin-top: 40px; display: flex; justify-content: center; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  position: relative; z-index: 1;
  padding: 36px 8%; border-top: 1px solid var(--bd);
  background: var(--sect-alt);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo  { font-family: var(--font-serif); font-size: 18px; font-weight: 500; color: var(--or); letter-spacing: 0.04em; }
.footer-meta  { font-size: 12px; color: var(--mu); font-weight: 300; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--sa); transition: color 0.3s; }
.footer-links a:hover { color: var(--or); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .navbar { padding: 16px 24px; }
  .nav-links a:not(.nav-cta):not(.theme-toggle) { display: none; }
  .nav-hamburger { display: flex; }
  .features-grid  { grid-template-columns: 1fr; }
  .snapshot-grid  { grid-template-columns: 1fr; }
  .hack-grid      { grid-template-columns: 1fr; gap: 32px; }
  .hero           { height: auto; padding: 120px 6% 80px; }
  .hero-inner     { grid-template-columns: 1fr; }
  .hero-right     { display: none; }
}

@media (max-width: 600px) {
  .section       { padding: 60px 5%; }
  .footer        { flex-direction: column; align-items: flex-start; }
  .hero-stats    { flex-wrap: wrap; gap: 20px; }
  .snapshot-grid { grid-template-columns: 1fr 1fr; }
}
/* ── MOBILE HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--sa);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 58px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--bd);
  padding: 12px 0;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  flex-direction: column;
  animation: menuSlide 0.2s ease;
}
@keyframes menuSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 400;
  color: var(--sa); text-decoration: none;
  border-bottom: 1px solid var(--bd);
  transition: background 0.2s, color 0.2s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { background: var(--su); color: var(--or); }

@media (max-width: 700px) {
  .navbar { padding: 14px 20px; }
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex; }

  .hero {
    height: auto;
    padding: 90px 5% 50px;
  }
  .hero-inner     { grid-template-columns: 1fr; }
  .hero-right     { display: none; }
  .hero-title     { font-size: clamp(32px, 9vw, 48px); margin-bottom: 16px; }
  .hero-desc      { font-size: 14px; line-height: 1.7; margin-bottom: 28px; }
  .hero-btns      { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn-primary, .btn-secondary {
    width: 100%; text-align: center;
    padding: 14px 20px; font-size: 14px;
    white-space: nowrap;
  }
  .hero-stats {
    display: flex; flex-direction: row;
    flex-wrap: nowrap; gap: 0;
    padding-top: 20px; margin-top: 24px;
    justify-content: space-between;
  }
  .hs-item   { flex: 1; }
  .hs-val    { font-size: 22px; }
  .hs-lbl    { font-size: 10px; }

  /* hide wave on mobile — it shows outside hero as block */
  .hero .wave-divider { display: none; }

  .section        { padding: 60px 5%; }
  .features-grid  { grid-template-columns: 1fr; }
  .snapshot-grid  { grid-template-columns: 1fr; }
  .hack-grid      { grid-template-columns: 1fr; gap: 28px; }
  .footer         { flex-direction: column; gap: 12px; padding: 24px 5%; }
  .footer-links   { flex-wrap: wrap; gap: 12px; }

  /* prevent horizontal scroll from slide-in animations */
  .anim-fade-left,
  .anim-fade-right {
    transform: translateY(20px);
  }
  .anim-fade-left.in,
  .anim-fade-right.in {
    transform: none;
  }
}

/* ═══════════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════════ */

/* base hidden state */
.anim-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.anim-pop {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* visible state — added by JS */
.anim-fade-up.in,
.anim-fade-left.in,
.anim-fade-right.in,
.anim-fade.in,
.anim-pop.in {
  opacity: 1;
  transform: none;
}

/* stagger delays */
.anim-d1 { transition-delay: 0.05s; }
.anim-d2 { transition-delay: 0.15s; }
.anim-d3 { transition-delay: 0.25s; }
.anim-d4 { transition-delay: 0.35s; }
.anim-d5 { transition-delay: 0.45s; }
.anim-d6 { transition-delay: 0.55s; }
.demo-section { text-align: center; }

.demo-video-wrap {
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--orange-glow);
  border: 1px solid var(--bd);
  aspect-ratio: 16/9;
  position: relative;
}

.demo-video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.demo-video-placeholder {
  width: 100%;
  height: 100%;
  background: var(--su);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.3s;
  min-height: 300px;
}

.demo-video-placeholder:hover { background: var(--pa); }

.demo-play-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--or);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(198,93,7,0.4);
  padding-left: 4px;
}

.demo-video-label {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 300;
  color: var(--wm);
}

.demo-video-sub {
  font-size: 13px;
  color: var(--mu);
}

@media (max-width: 700px) {
  .demo-video-wrap { border-radius: var(--r-lg); }
  .demo-video-placeholder { min-height: 200px; }
  .demo-play-icon { width: 52px; height: 52px; font-size: 18px; }
  .demo-video-label { font-size: 16px; }
}