/* MD Group — Kharghar & Panvel. Palette from the firm's visiting card: deep navy + gold. */

:root {
  --navy-950: #070a1c;
  --navy-900: #0a0e24;
  --navy-800: #0d1230;
  --navy-700: #141b40;
  --navy-600: #1b2352;
  --gold: #d9b64e;
  --gold-bright: #edd28a;
  --gold-deep: #a97f1f;
  --ink: #f4efe4;
  --ink-dim: rgba(244, 239, 228, 0.72);
  --ink-faint: rgba(244, 239, 228, 0.45);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --scenes: 7;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--navy-900);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.8rem, 2vw, 1.2rem) var(--pad);
  background: linear-gradient(180deg, rgba(7, 10, 28, 0.75), rgba(7, 10, 28, 0));
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-shield { width: 34px; height: 38px; display: block; }

.shield-mono {
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
}

.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
}

.brand-name em {
  font-style: normal;
  color: var(--gold);
}

.header-cta {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--navy-950);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.header-cta.show { opacity: 1; transform: none; }

/* ---------- Scroll track & stage ---------- */

.scroll-track { height: calc(var(--scenes) * 120vh); position: relative; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* ---------- Media layers: backdrop → fallback image → video → contrast → grain ---------- */

.media { position: absolute; inset: 0; }

.backdrop { position: absolute; inset: -6%; will-change: transform; }

.bd-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #070a1c 0%, #0c1130 38%, #17204c 68%, #232b63 100%);
}

.bd-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 42% at 50% 82%, rgba(217, 182, 78, 0.32), rgba(217, 182, 78, 0.06) 55%, transparent 75%);
}

.bd-horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, transparent, rgba(7, 10, 28, 0.85));
}

.media-fallback,
#heroVideo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.media-fallback.show { opacity: 1; }
#heroVideo.ready { opacity: 1; }

/* Scrim. The film is a night city: its brightest region by far is the lit
   road running up the centre-bottom of frame, which is exactly where the
   scene copy sits on phones. A light wash is not enough against those yellow
   highlights — text was disappearing into them on mobile. Keep the bottom
   stop heavy. */
.contrast {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 28, 0.46) 0%, transparent 30%),
    linear-gradient(0deg,
      rgba(7, 10, 28, 0.82) 0%,
      rgba(7, 10, 28, 0.62) 22%,
      rgba(7, 10, 28, 0.30) 44%,
      transparent 62%);
}

/* The film-grain overlay that used to sit here was removed. The Veo source is
   an upscale of a 720p master and already carries softness; laying synthetic
   noise over it read as a low-quality video rather than as film texture.
   Don't reintroduce it — if the footage is ever replaced with something
   genuinely sharp, reconsider then, and at a much lower opacity. */

/* ---------- Scenes ---------- */

.scene {
  position: absolute; inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) clamp(4.5rem, 12vh, 7.5rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(26px);
  will-change: opacity, transform;
}

.scene.on { visibility: visible; }

.scene-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1.5rem, 5vw, 4rem);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.scene-copy { max-width: 620px; position: relative; }

/* soft local contrast behind text, not a full-film sheet */
.scene-copy::before {
  content: "";
  position: absolute;
  inset: -18% -14%;
  background: radial-gradient(ellipse 100% 100% at 30% 70%, rgba(7, 10, 28, 0.62), transparent 72%);
  z-index: -1;
  filter: blur(6px);
}

/* Last line of defence: the scrims above handle the general case, but the
   film moves, so a bright element can drift under any given word. A soft
   shadow keeps letterforms readable against a highlight without reading as
   a "text shadow" effect. */
.label, h1, h2, .support, .cta-note {
  text-shadow: 0 1px 14px rgba(7, 10, 28, 0.55);
}

.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }

.support {
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--ink-dim);
  max-width: 46ch;
}

/* ---------- Portrait (opening scene only) ---------- */

.portrait {
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 240px);
  border: 1px solid rgba(217, 182, 78, 0.55);
  border-radius: 10px;
  padding: 10px 10px 12px;
  background: rgba(7, 10, 28, 0.5);
  backdrop-filter: blur(4px);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.portrait figcaption {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- Scroll cue ---------- */

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 34px;
  margin: 0.5rem auto 0;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: cueDrop 2.2s ease-in-out infinite;
}

@keyframes cueDrop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Final scene ---------- */

.scene-action { align-items: center; }

.scene-action .scene-inner { justify-content: center; text-align: center; }

.scene-action .scene-copy::before {
  inset: -30% -40%;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(7, 10, 28, 0.55), transparent 70%);
}

.scene-action .support, .scene-action .cta-note { margin-left: auto; margin-right: auto; }

.cta-main {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--navy-950);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 0.95rem 2.3rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 30px rgba(217, 182, 78, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-main:hover { transform: translateY(-2px); box-shadow: 0 10px 38px rgba(217, 182, 78, 0.45); }

.cta-main.pending { cursor: default; }

.cta-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 40ch;
}

/* ---------- Scene counter ---------- */

.scene-counter {
  position: absolute;
  left: var(--pad); /* bottom-left: keeps clear of the floating WhatsApp button */
  bottom: 1.5rem;
  z-index: 12;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 3.2rem var(--pad) 2.6rem;
  background: var(--navy-950);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.site-footer.in { opacity: 1; transform: none; }

.foot-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.foot-brand em { font-style: italic; color: var(--gold); }

.foot-addr { font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 0.5rem; }

.foot-legal { font-size: 0.75rem; color: var(--ink-faint); }

/* The "Film loading — N%" badge that used to live here was removed: the film
   is now small enough that announcing its arrival did more harm than the
   wait itself. */

/* ---------- Floating WhatsApp ---------- */

.wa-float {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 50;
  width: 54px; height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.wa-float.show { opacity: 1; transform: scale(1); }

.wa-float svg { width: 30px; height: 30px; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .scene { align-items: flex-end; padding-bottom: clamp(4rem, 11vh, 6rem); }

  .scene-inner {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
  }

  /* Phones bottom-align the copy, dropping it straight onto the brightest
     part of frame — the lit road. Both scrims get heavier here. */
  .scene-copy::before {
    inset: -20% -12%;
    background: radial-gradient(ellipse 100% 100% at 50% 60%, rgba(7, 10, 28, 0.72), transparent 74%);
  }

  .contrast {
    background:
      linear-gradient(180deg, rgba(7, 10, 28, 0.46) 0%, transparent 26%),
      linear-gradient(0deg,
        rgba(7, 10, 28, 0.90) 0%,
        rgba(7, 10, 28, 0.76) 28%,
        rgba(7, 10, 28, 0.42) 52%,
        transparent 70%);
  }

  .portrait { width: clamp(120px, 34vw, 170px); }

  .support { margin: 0 auto; }

  .scene-counter { display: none; }

  .scroll-cue { display: none; }

  .brand-name { font-size: 0.92rem; }

  h1 { font-size: clamp(2.1rem, 9vw, 2.9rem); }
  h2 { font-size: clamp(1.75rem, 7.5vw, 2.5rem); }
}

@media (max-height: 640px) {
  .portrait { display: none; }
  .scene { padding-bottom: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
  .header-cta, .site-footer, .wa-float { transition: none; }
}
