/* ═══════════════════════════════════════════════════════════════
   KINGDOM VISION FILMS — styles.css  v9
   Studio-level cinematic static site
   Gold: #c9a84c  |  Deep Black: #000
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Tokens ──────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-pale:   #f5e4a8;
  --gold-bright: #f7d96b;
  --gold-dim:    #8a6f2e;
  --gold-deep:   #7a500e;
  --black:       #000000;
  --near-black:  #060604;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--black);
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

body.intro-active { overflow: hidden; }

::selection {
  background: rgba(201,168,76,0.22);
  color: var(--gold-pale);
}

::-webkit-scrollbar       { width: 3px; }
::-webkit-scrollbar-track { background: #060606; }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }


/* ═══════════════════════════════════════════════════════════════
   ① INTRO SCREEN  (z-index 9000 — above everything)
   ═══════════════════════════════════════════════════════════════ */
#intro-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: #000; overflow: hidden;
  transition: opacity 1.4s cubic-bezier(0.4,0,0.2,1);
}
#intro-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Video — covers full screen, seamless match-cut */
#intro-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 1;
  opacity: 0;
  /* 1.5s fade — same duration as JS VIDEO_FADE_DURATION */
  transition: opacity 1.5s cubic-bezier(0.4,0,0.2,1);
}
#intro-video.playing { opacity: 1; }

/* Cinematic letterbox vignette over video */
#intro-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    transparent 30%,
    rgba(0,0,0,0.28) 70%,
    rgba(0,0,0,0.62) 100%
  );
}

/* Loading indicator */
#intro-loader {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#intro-loader.hidden { opacity: 0; pointer-events: none; }

.loader-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(201,168,76,0.55);
  animation: loaderSpin 1.8s linear infinite;
}
.loader-ring:nth-child(1) { width: 52px; height: 52px; }
.loader-ring:nth-child(2) { width: 37px; height: 37px; animation-delay: -0.45s; border-top-color: rgba(232,201,122,0.38); }
.loader-ring:nth-child(3) { width: 23px; height: 23px; animation-delay: -0.90s; border-top-color: rgba(245,228,168,0.22); }

@keyframes loaderSpin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════
   ② HOMEPAGE
   Layer stack (back → front):
     #base-bg            z:0   pure black base
     #logo-bg            z:1   4K KVF image — object-fit:cover
     #grain-canvas       z:2   subtle film grain
     #logo-glow          z:3   warm amber radial glow on lion
     #cinematic-overlay  z:4   top+bottom gradient burns
     #vignette           z:5   edge darkening
     #particle-canvas    z:6   gold ember particles
     .smoke ×3           z:7   atmospheric haze
     #site-header        z:100 fixed navigation
     #hero-section       z:10  hero text — upper-centre
   ═══════════════════════════════════════════════════════════════ */
#homepage {
  position: relative;
  min-height: 100vh;
}


/* ── LAYER 0  Black base ─────────────────────────────────────── */
#base-bg {
  position: fixed; inset: 0; z-index: 0;
  background: #000; pointer-events: none;
}


/* ── LAYER 1  4K KVF Logo background ───────────────────────────
   1376×768 RGBA PNG (16:9).
   object-fit:cover fills viewport with zero distortion.
   object-position: center 28% keeps lion head in upper centre.
   transform:scale(1.04) removes sub-pixel edge gaps.
────────────────────────────────────────────────────────────────── */
#logo-bg {
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  overflow: hidden;
  /* always visible — intro-screen (z:9000) sits on top */
  opacity: 1;
  transition: opacity 2.2s ease;
  pointer-events: none;
}
#logo-bg.visible { opacity: 1; }

#logo-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.04);
  transform-origin: center center;
  display: block;
  /* Slight warmth lift — does NOT alter the logo's design */
  filter: brightness(1.06) contrast(1.04) saturate(1.12);
  animation: logoBreathe 20s ease-in-out infinite;
  will-change: filter, transform;
}

@keyframes logoBreathe {
  0%, 100% {
    filter: brightness(1.04) contrast(1.03) saturate(1.10);
    transform: scale(1.04);
  }
  48%, 52% {
    filter: brightness(1.16) contrast(1.07) saturate(1.20)
            drop-shadow(0 0 90px rgba(210,148,40,0.22));
    transform: scale(1.046);
  }
}


/* ── LAYER 2  Film grain (canvas — animated noise) ─────────── */
#grain-canvas {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.028;           /* ultra-subtle — perceived, not seen */
  mix-blend-mode: overlay;
  transition: opacity 3s ease;
  will-change: opacity;
}
#grain-canvas.visible { opacity: 0.028; }


/* ── LAYER 3  Warm amber glow on the lion ───────────────────── */
#logo-glow {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(
      ellipse 46% 36% at 50% 34%,
      rgba(200,135,22,0.26) 0%,
      rgba(160,100,12,0.12) 40%,
      transparent           68%
    ),
    radial-gradient(
      ellipse 28% 22% at 50% 26%,
      rgba(240,180,50,0.14) 0%,
      transparent           60%
    );
  opacity: 0; transition: opacity 2.4s ease;
  animation: glowPulse 12s ease-in-out infinite;
  animation-play-state: paused;
}
#logo-glow.visible {
  opacity: 1;
  animation-play-state: running;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.82; }
  50%       { opacity: 1.00; }
}


/* ── LAYER 4  Cinematic gradient overlay ────────────────────────
   Strong top dark band for navigation legibility.
   Open mid-zone so lion and wings read clearly.
   Heavy bottom gradient for scrollable content.
────────────────────────────────────────────────────────────────── */
#cinematic-overlay {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.92)  0%,
    rgba(0,0,0,0.76)  7%,
    rgba(0,0,0,0.54) 14%,
    rgba(0,0,0,0.32) 22%,
    rgba(0,0,0,0.08) 32%,
    rgba(0,0,0,0.00) 42%,
    rgba(0,0,0,0.00) 56%,
    rgba(0,0,0,0.20) 68%,
    rgba(0,0,0,0.60) 80%,
    rgba(0,0,0,0.88) 90%,
    rgba(0,0,0,0.96) 100%
  );
  opacity: 0; transition: opacity 2.2s ease;
}
#cinematic-overlay.visible { opacity: 1; }


/* ── LAYER 5  Edge vignette ─────────────────────────────────── */
#vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(
    ellipse 80% 72% at 50% 40%,
    transparent       16%,
    rgba(0,0,0,0.12)  52%,
    rgba(0,0,0,0.50) 100%
  );
  opacity: 0; transition: opacity 2.4s ease;
}
#vignette.visible { opacity: 1; }


/* ── LAYER 6  Gold dust / ember particles ───────────────────── */
#particle-canvas {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
  opacity: 0; transition: opacity 2.8s ease 0.4s;
  will-change: opacity;
}
#particle-canvas.visible { opacity: 1; }


/* ── LAYER 7  Atmospheric smoke haze ───────────────────────── */
.smoke {
  position: fixed; z-index: 7; pointer-events: none;
  border-radius: 50%; filter: blur(120px);
  opacity: 0; transition: opacity 6s ease;
  will-change: transform, opacity;
}
.smoke.visible { opacity: 1; }

#smoke-1 {
  width: 72vw; height: 48vh; top: -10vh; left: -6vw;
  background: radial-gradient(ellipse, rgba(201,168,76,0.032) 0%, transparent 70%);
  animation: haze1 28s ease-in-out infinite alternate;
}
#smoke-2 {
  width: 60vw; height: 50vh; bottom: -8vh; right: -6vw;
  background: radial-gradient(ellipse, rgba(201,168,76,0.020) 0%, transparent 70%);
  animation: haze2 34s ease-in-out infinite alternate;
}
#smoke-3 {
  width: 44vw; height: 38vh; top: 30vh; left: 34vw;
  background: radial-gradient(ellipse, rgba(255,210,80,0.014) 0%, transparent 70%);
  animation: haze3 42s ease-in-out infinite alternate;
}

@keyframes haze1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(6vw,5vh) scale(1.20); }
}
@keyframes haze2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-5vw,-6vh) scale(1.16); }
}
@keyframes haze3 {
  from { transform: translate(0,0) scale(1) rotate(0deg); }
  to   { transform: translate(4vw,4vh) scale(1.12) rotate(4deg); }
}


/* ── LAYER 8  Navigation ────────────────────────────────────── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 34px 64px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(-16px);
  transition: opacity 1.1s ease, transform 1.1s ease,
              background 0.5s ease, box-shadow 0.5s ease,
              padding 0.4s ease;
}
#site-header.visible  { opacity: 1; transform: translateY(0); }
#site-header.scrolled {
  background: rgba(2,2,1,0.94);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 1px 0 rgba(201,168,76,0.09);
  padding-top: 20px; padding-bottom: 20px;
}

#main-nav ul {
  list-style: none; display: flex; align-items: center; gap: 52px;
}
#main-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px; font-weight: 300;
  letter-spacing: 0.38em; text-transform: uppercase; text-decoration: none;
  color: rgba(201,168,76,0.60);
  position: relative; padding-bottom: 4px;
  transition: color 0.35s ease;
}
#main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(to right, var(--gold-dim), var(--gold-light), var(--gold-dim));
  transition: width 0.40s ease;
}
#main-nav a:hover { color: var(--gold-light); }
#main-nav a:hover::after { width: 100%; }

#main-nav a.nav-cta {
  border: 1px solid rgba(201,168,76,0.30);
  padding: 9px 22px; letter-spacing: 0.30em;
  transition: border-color 0.35s, color 0.35s, background 0.35s;
}
#main-nav a.nav-cta:hover {
  border-color: rgba(232,201,122,0.70);
  background: rgba(201,168,76,0.07);
  color: var(--gold-light);
}
#main-nav a.nav-cta::after { display: none; }

#nav-toggle {
  display: none; position: absolute; right: 28px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px;
}
#nav-toggle span {
  display: block; width: 22px; height: 1px; background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#nav-toggle.open span:nth-child(2) { opacity: 0; }
#nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ── LAYER 9  Hero text ──────────────────────────────────────────
   Fixed at padding-top: 14vh — sits above the lion's head.
   Strong dark overlay band (z:4) at 0–22% provides contrast.
────────────────────────────────────────────────────────────────── */
#hero-section {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding-top: 14vh;
  padding-left: 24px; padding-right: 24px;
  text-align: center;
  pointer-events: none;
}

#hero-headline-wrap {
  width: 100%; max-width: 1200px;
  pointer-events: auto;
}

/* Micro eyebrow */
.hero-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px; font-weight: 200;
  letter-spacing: 0.68em; text-transform: uppercase;
  color: rgba(201,168,76,0.40);
  margin-bottom: 22px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  text-shadow: 0 0 24px rgba(0,0,0,0.95);
}
.hero-eyebrow.in { opacity: 1; transform: translateY(0); }

/* ── THE KINGDOM IS BUILDING ─────────────────────────────────────
   Studio-grade metallic gold gradient with:
   - rich multi-stop gradient simulating light on metal
   - animated gradient sweep (background-position shift)
   - subtle bevel: inner shadow via text-shadow layers
   - glow pulse every 8s
────────────────────────────────────────────────────────────────── */
#hero-headline {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 4.6vw, 72px);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.06;
  text-transform: uppercase;
  white-space: nowrap;

  /* 11-stop metallic gold — wide spread simulates a reflective bevel */
  background: linear-gradient(
    148deg,
    #4a2c06  0%,
    #9a6820 8%,
    #d4a030 16%,
    #f8e898 26%,
    #ffe8a0 32%,
    #d0982a 42%,
    #8a5a14 50%,
    #c89030 58%,
    #f0d878 68%,
    #faf0b0 76%,
    #c08020 84%,
    #7a500e 91%,
    #e8c870 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 300%;

  /*
   * Bevel depth: two drop-shadows offset
   * Dark bottom-right = shadow side (depth)
   * Bright top-left   = highlight side (lift)
   * Black halo        = legibility over any bg
   */
  filter:
    drop-shadow(0  2px  2px rgba(0,0,0,0.98))
    drop-shadow(0  4px 10px rgba(0,0,0,0.96))
    drop-shadow(0  0   36px rgba(0,0,0,0.94))
    drop-shadow(0  1px  1px rgba(240,200,80,0.08));

  animation: headlineSweep 10s ease-in-out infinite,
             headlineGlow   8s ease-in-out infinite;
  will-change: filter, background-position;
}

/* Gradient light-sweep across the metal every 10s */
@keyframes headlineSweep {
  0%        { background-position:  0% 50%; }
  40%, 60%  { background-position: 100% 50%; }
  100%      { background-position:  0% 50%; }
}

/* Glow pulse — every 8s, peaks at 50% */
@keyframes headlineGlow {
  0%, 100% {
    filter:
      drop-shadow(0  2px  2px rgba(0,0,0,0.98))
      drop-shadow(0  4px 10px rgba(0,0,0,0.96))
      drop-shadow(0  0   36px rgba(0,0,0,0.94))
      drop-shadow(0  0    8px rgba(201,168,76,0.04));
  }
  28% {
    filter:
      drop-shadow(0  2px  2px rgba(0,0,0,0.96))
      drop-shadow(0  3px  8px rgba(0,0,0,0.92))
      drop-shadow(0  0   28px rgba(0,0,0,0.88))
      drop-shadow(0  2px 32px rgba(232,200,122,0.46))
      drop-shadow(0  0   64px rgba(201,168,76,0.22));
  }
  50% {
    filter:
      drop-shadow(0  2px  2px rgba(0,0,0,0.94))
      drop-shadow(0  2px  6px rgba(0,0,0,0.88))
      drop-shadow(0  0   22px rgba(0,0,0,0.82))
      drop-shadow(0  2px 52px rgba(248,232,152,0.80))
      drop-shadow(0  0  100px rgba(201,168,76,0.52))
      drop-shadow(0  0  160px rgba(201,168,76,0.20));
  }
  72% {
    filter:
      drop-shadow(0  2px  2px rgba(0,0,0,0.96))
      drop-shadow(0  3px  8px rgba(0,0,0,0.92))
      drop-shadow(0  0   28px rgba(0,0,0,0.88))
      drop-shadow(0  2px 32px rgba(232,200,122,0.46))
      drop-shadow(0  0   64px rgba(201,168,76,0.22));
  }
}

/* Word-by-word stagger entrance */
.word {
  display: inline-block;
  opacity: 0; transform: translateY(28px);
  transition: opacity 1.0s ease, transform 1.0s ease;
}
.word.in { opacity: 1; transform: translateY(0); }

/* Gold divider rule */
.hero-rule {
  width: 44px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
  margin: 20px auto 17px;
  opacity: 0; transition: opacity 1.2s ease, width 1.8s ease;
  box-shadow: 0 0 8px rgba(201,168,76,0.30);
}
.hero-rule.in { opacity: 0.70; width: 180px; }

/* Tagline */
.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(12px, 1.4vw, 18px);
  font-weight: 300; font-style: italic;
  letter-spacing: 0.30em;
  color: rgba(201,168,76,0.54);
  text-shadow: 0 0 24px rgba(0,0,0,0.97), 0 0 10px rgba(0,0,0,0.92);
  opacity: 0; transform: translateY(8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.hero-sub.in { opacity: 1; transform: translateY(0); }

/* Scroll cue */
#scroll-cue {
  margin-top: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; transition: opacity 1.4s ease;
  cursor: pointer; pointer-events: auto;
}
#scroll-cue.in    { opacity: 0.30; }
#scroll-cue:hover { opacity: 0.74; transition: opacity 0.3s; }

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: scrollBob 2.8s ease-in-out infinite;
}
@keyframes scrollBob {
  0%,100% { transform: scaleY(1.00); opacity: 0.50; }
  50%      { transform: scaleY(0.58); opacity: 1.00; }
}
#scroll-cue span {
  font-family: 'Montserrat', sans-serif;
  font-size: 6.5px; font-weight: 300;
  letter-spacing: 0.46em; color: var(--gold); text-transform: uppercase;
}


/* ── Scrollable anchor sections ─────────────────────────────── */
.anchor-section {
  position: relative; z-index: 10;
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(201,168,76,0.04);
  margin-top: 100vh;
}
.section-label {
  font-family: 'Cinzel', serif;
  font-size: clamp(11px, 1.6vw, 15px); font-weight: 400;
  letter-spacing: 0.62em; text-transform: uppercase;
  color: rgba(201,168,76,0.10);
}


/* ── Footer ─────────────────────────────────────────────────── */
#site-footer {
  position: relative; z-index: 10;
  padding: 0 64px 48px;
}
.footer-line {
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.14), transparent);
  margin-bottom: 28px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-parent {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-weight: 300; font-style: italic;
  letter-spacing: 0.14em; color: rgba(201,168,76,0.34);
}
.footer-copy {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px; font-weight: 300;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(201,168,76,0.20);
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Large tablets */
@media (max-width: 1100px) {
  #hero-headline { font-size: clamp(22px, 4.4vw, 60px); }
}

/* Tablets */
@media (max-width: 860px) {
  #site-header  { padding: 26px 32px; }
  #main-nav ul  { gap: 28px; }
  #main-nav a   { font-size: 9px; letter-spacing: 0.26em; }
  #main-nav a.nav-cta { padding: 8px 16px; }
  #hero-section { padding-top: 16vh; }
  /* Keep lion centred on portrait tablets */
  #logo-img     { object-position: center 30%; }
}

/* Mobile — hamburger nav */
@media (max-width: 640px) {
  #nav-toggle { display: flex; }

  #main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(2,2,1,0.97);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    padding: 0 28px; max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    border-bottom: 1px solid rgba(201,168,76,0.06);
  }
  #main-nav.open { max-height: 360px; padding: 22px 28px 26px; }
  #main-nav ul   { flex-direction: column; align-items: flex-start; gap: 22px; }
  #main-nav a    { font-size: 10px; }
  #main-nav a.nav-cta { border: none; padding: 0; }

  #hero-section  { padding-top: 18vh; padding-left: 18px; padding-right: 18px; }
  #hero-headline {
    white-space: normal; word-break: keep-all;
    letter-spacing: 0.10em;
    font-size: clamp(22px, 7.8vw, 44px);
  }

  /* On mobile keep the lion's face (upper-centre) visible */
  #logo-img { object-position: center 26%; }

  .footer-inner { justify-content: center; text-align: center; }
  .footer-parent, .footer-copy { width: 100%; text-align: center; }
  #site-footer  { padding: 0 24px 28px; }
}

/* Small phones */
@media (max-width: 420px) {
  #hero-headline { font-size: clamp(19px, 8.5vw, 36px); letter-spacing: 0.07em; }
  #hero-section  { padding-top: 20vh; }
  #logo-img      { object-position: center 24%; }
}

/* Landscape phones / short viewports */
@media (max-height: 560px) {
  #hero-section { padding-top: 10vh; }
  .hero-eyebrow { display: none; }
  .hero-rule    { margin: 8px auto; }
  #scroll-cue   { display: none; }
  #logo-img     { object-position: center 20%; }
}
