.scroll-video-hero { height: calc(100vh - 68px); margin-top: 68px; position: relative; }
.scroll-video-sticky { position: relative; height: 100%; width: 100%; overflow: hidden; }
#heroCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.hero-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 1.5rem;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(90,184,245,0.08);
  border: 1px solid rgba(90,184,245,0.25);
  border-radius: 50px; padding: 0.35rem 1rem;
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1.8rem;
  backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s 0.3s forwards;
  pointer-events: auto;
}
.hero-badge-dot {
  width: 6px; height: 6px; background: var(--blue);
  border-radius: 50%; animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.4); } }

h1.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 800; line-height: 0.88;
  letter-spacing: -0.03em; color: #fff;
  text-shadow: 0 0 60px rgba(90,184,245,0.2), 0 4px 40px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.9s 0.5s forwards;
}
h1.hero-title span {
  background: linear-gradient(135deg, #a8d8ff 0%, var(--blue) 40%, var(--amber) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-family: 'Syne', sans-serif;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  font-weight: 600; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--amber);
  margin: 1.4rem 0 1rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s 0.75s forwards;
}
.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  color: rgba(216,232,245,0.75);
  max-width: 500px; margin: 0 auto 2.5rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s 0.92s forwards;
}
.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.7s 1.1s forwards;
  pointer-events: auto;
}
.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: rgba(255,255,255,0.35); font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0; animation: fadeUp 0.7s 1.5s forwards;
}
.scroll-arrow {
  width: 20px; height: 30px;
  border: 1.5px solid rgba(255,255,255,0.25); border-radius: 12px; position: relative;
}
.scroll-arrow::after {
  content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 6px; background: var(--blue); border-radius: 2px;
  animation: bob 1.6s infinite;
}
@keyframes bob { 0%,100% { top: 5px; opacity: 1; } 75% { top: 14px; opacity: 0; } }

.scroll-progress-bar {
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px; background: rgba(255,255,255,0.05); z-index: 3;
}
.scroll-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue-dim), var(--blue), var(--amber));
  transition: width 0.04s linear;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ── TABLET (iPad Air 820px, iPad Pro) ── */
@media (max-width: 1024px) and (min-width: 769px) {
  h1.hero-title { font-size: clamp(5rem, 12vw, 9rem); }
  .hero-badge { font-size: 0.72rem; letter-spacing: 0.1em; }
  .hero-sub { letter-spacing: 0.2em; }
}

/* ── MOBILE (all phones ≤768px) ──
   Cap hero height so tall phones (930px+) don't get huge dead space
   100vh fallback for Samsung Galaxy S8 / older Android Chrome (<108) */
@media (max-width: 768px) {
  .scroll-video-hero {
    height: calc(100vh - 60px);           /* fallback: Samsung S8, Chrome <108 */
    height: min(calc(100svh - 60px), 740px); /* modern: svh avoids address-bar jump */
    min-height: 380px;
    margin-top: 60px;
  }
  .hero-content { padding: 0 1.5rem; }
  h1.hero-title { font-size: clamp(3.6rem, 20vw, 5.5rem); line-height: 0.9; }
  .hero-badge { font-size: 0.62rem; padding: 0.3rem 0.8rem; margin-bottom: 1rem; letter-spacing: 0.06em; border-radius: 8px; white-space: normal; text-align: center; max-width: 270px; }
  .hero-sub { font-size: 0.72rem; letter-spacing: 0.13em; margin: 0.8rem 0 0.6rem; }
  .hero-desc { font-size: 0.9rem; margin-bottom: 1.4rem; max-width: 100%; padding: 0 0.3rem; }
  .btn-primary, .btn-ghost { font-size: 0.9rem; padding: 0.8rem 1.8rem; }
  .hero-scroll-hint { bottom: 1.2rem; }
}

/* ── PHONES ≤640px (Pro Max 440px, 430px, XR 414px, all mid phones) ── */
@media (max-width: 640px) {
  h1.hero-title { font-size: clamp(3.4rem, 22vw, 5rem); }
  .hero-actions { flex-direction: column; align-items: center; gap: 0.7rem; }
  .btn-primary, .btn-ghost { width: min(100%, 270px); text-align: center; padding: 0.82rem 1.2rem; }
}

/* ── Samsung Galaxy S20 Ultra (412px) — within ≤640px but needs fine-tuning ── */
@media (max-width: 412px) and (min-width: 391px) {
  h1.hero-title { font-size: clamp(3.2rem, 21vw, 4.6rem); }
  .hero-badge { max-width: 250px; }
}

/* ── SMALL PHONES ≤390px (Samsung S8 360px, iPhone SE 390px, 6/7/8 375px) ── */
@media (max-width: 390px) {
  .hero-content { padding: 0 1.1rem; }
  h1.hero-title { font-size: clamp(3rem, 21vw, 4.2rem); }
  .hero-badge { font-size: 0.58rem; padding: 0.25rem 0.65rem; max-width: 220px; letter-spacing: 0.04em; }
  .hero-sub { font-size: 0.65rem; letter-spacing: 0.1em; }
  .hero-desc { font-size: 0.84rem; }
  .btn-primary, .btn-ghost { font-size: 0.84rem; padding: 0.75rem 1rem; width: min(100%, 240px); }
}

/* ── VERY SHORT SCREENS (iPhone 4 320x420, landscape phones) ── */
@media (max-height: 500px) and (max-width: 768px) {
  .scroll-video-hero { height: calc(100svh - 60px); min-height: 320px; }
  h1.hero-title { font-size: clamp(2.2rem, 16vw, 3rem); }
  .hero-badge { display: none; }
  .hero-sub { font-size: 0.6rem; margin: 0.4rem 0; }
  .hero-desc { display: none; }
  .hero-actions { gap: 0.5rem; }
  .hero-scroll-hint { display: none; }
}

/* ── Samsung Galaxy S8 (360px) — within ≤390px but needs fine-tuning ── */
@media (max-width: 360px) {
  .hero-content { padding: 0 1rem; }
  h1.hero-title { font-size: clamp(2.8rem, 21vw, 4rem); }
  .hero-badge { font-size: 0.56rem; max-width: 210px; letter-spacing: 0.04em; }
  .hero-sub { font-size: 0.63rem; letter-spacing: 0.09em; }
  .hero-desc { font-size: 0.82rem; }
  .btn-primary, .btn-ghost { width: min(100%, 230px); font-size: 0.82rem; padding: 0.72rem 0.9rem; }
}

/* ── 320px WIDE (iPhone 4, old SE) ── */
@media (max-width: 320px) {
  .hero-content { padding: 0 0.9rem; }
  h1.hero-title { font-size: clamp(2.6rem, 20vw, 3.8rem); }
  .hero-badge { font-size: 0.55rem; max-width: 200px; }
  .hero-desc { font-size: 0.8rem; }
}
