/* ============================================================
   ReelSync — landing page
   ============================================================ */

#landing {
  position: relative;
  overflow-x: clip;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(109, 40, 217, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(155, 89, 182, 0.10), transparent 55%),
    var(--bg-deep);
}

/* view transition (landing ⇄ builder) */
#landing.leave { animation: landingOut 0.32s var(--ease) forwards; }
@keyframes landingOut {
  to { opacity: 0; transform: scale(0.985); filter: blur(3px); }
}

/* ---------- mini top bar ---------- */
.top-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.4rem 2rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand img { width: 38px; height: 38px; }
.brand .sync { color: var(--violet-hi); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  padding: 4rem 2rem 5rem;
  overflow: hidden;
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
/* film grain */
.hero-grain {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.06) 35px, rgba(255,255,255,0.06) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,0.04) 35px, rgba(255,255,255,0.04) 70px);
  animation: grainShift 1.2s steps(6) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}
/* studio scanline sweep */
.hero-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -8%;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.05) 45%, rgba(167, 139, 250, 0.12) 50%, rgba(167, 139, 250, 0.05) 55%, transparent);
  filter: blur(1px);
  animation: scanDown 9s linear infinite;
}
@keyframes scanDown {
  0% { top: -12%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 104%; opacity: 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.6rem; }

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.3rem;
  animation: fadeUp 0.8s var(--ease) both;
}
.hero-sub {
  color: var(--ink-2);
  font-size: 1.12rem;
  max-width: 54ch;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s 0.12s var(--ease) both;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  animation: fadeUp 0.8s 0.22s var(--ease) both;
}
.hero-points {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0.5rem 1.6rem;
  margin-top: 2.2rem;
  color: var(--ink-2);
  font-size: 0.88rem;
  animation: fadeUp 0.8s 0.32s var(--ease) both;
}
.hero-points li { display: flex; align-items: center; gap: 0.5rem; }
.hero-points i { color: var(--good); }

/* ---------- device mock ---------- */
.hero-device {
  display: grid;
  place-items: center;
  perspective: 1200px;
  animation: fadeUp 0.9s 0.3s var(--ease) both;
}
.device-frame {
  position: relative;
  width: min(290px, 60vw);
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, #1d1d3d, #101024);
  border: 1px solid var(--line-2);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(139, 92, 246, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease);
}
.hero-device:hover .device-frame { transform: rotate(0deg) translateY(-4px); }
.device-frame::after { /* notch */
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 8px;
  border-radius: 99px;
  background: #05050f;
  border: 1px solid rgba(148, 124, 246, 0.2);
  z-index: 2;
}
#deviceCanvas {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 31px;
  background: #05050f;
}

/* ---------- features ---------- */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5.5rem 2rem 2.5rem;
}
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; margin: 0.5rem 0 0.8rem; }
.section-head p { color: var(--ink-2); max-width: 58ch; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.feature-card {
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), var(--glow);
}
.feature-card .chip {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 1.25rem;
  color: var(--violet-hi);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--line);
  margin-bottom: 1.1rem;
}
.feature-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--ink-2); font-size: 0.88rem; line-height: 1.55; }

/* ---------- how it works ---------- */
.how {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 2rem;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}
.how-grid::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}
.how-step { text-align: center; position: relative; }
.how-step .dot {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--violet-hi);
  background: var(--bg-deep);
  border: 1.5px solid var(--line-2);
  box-shadow: 0 0 0 6px var(--bg-deep);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.how-step:hover .dot {
  border-color: var(--violet);
  box-shadow: 0 0 0 6px var(--bg-deep), 0 0 26px rgba(139, 92, 246, 0.45);
}
.how-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.how-step p { color: var(--ink-3); font-size: 0.85rem; line-height: 1.5; padding: 0 0.4rem; }

/* ---------- privacy strip ---------- */
.privacy {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(109, 40, 217, 0.14), transparent 70%),
    var(--bg-navy);
}
.privacy-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3.6rem 2rem;
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.privacy .lock {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: var(--gold);
  border-radius: 22px;
  border: 1px solid rgba(232, 182, 76, 0.3);
  background: rgba(232, 182, 76, 0.07);
}
.privacy h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.privacy p { color: var(--ink-2); font-size: 0.95rem; }
.privacy .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.privacy .checks span { display: inline-flex; align-items: center; gap: 0.4rem; }
.privacy .checks i { color: var(--good); }

/* ---------- footer ---------- */
.landing-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.2rem 2rem 3.6rem;
  text-align: center;
}
.landing-footer .brand { justify-content: center; margin-bottom: 0.9rem; }
.landing-footer .brand img { width: 30px; height: 30px; }
.landing-footer p { color: var(--ink-3); font-size: 0.88rem; }
.landing-footer .version { font-family: var(--font-mono); font-size: 0.75rem; margin-top: 1.1rem; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero-badges, .hero-ctas { justify-content: center; }
  .hero-points { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1.5rem; }
  .how-grid::before { display: none; }
}
@media (max-width: 580px) {
  .features-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .privacy-inner { flex-direction: column; text-align: center; }
  .privacy .checks { justify-content: center; }
  .hero-points { grid-template-columns: 1fr; text-align: left; }
}
