/* ==========================================================================
   Kingdom Authority — Coming Soon
   Palette: black + dark navy, premium & cinematic.
   ========================================================================== */

:root {
  /* Core palette */
  --black-deep: #050505;
  --black-near: #0a0a0a;
  --navy-deep: #071a33;
  --blue-dark: #0b2a4a;
  --white: #ffffff;
  --white-soft: #f5f7fa;

  /* Text */
  --text-primary: var(--white);
  --text-secondary: rgba(245, 247, 250, 0.78);
  --text-muted: rgba(245, 247, 250, 0.6);

  /* Typography */
  --font-display: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --content-max-width: 42rem;
  --edge-spacing: clamp(1.5rem, 6vw, 4rem);

  /* Motion */
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--black-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--edge-spacing);
  /* The corner logo is pinned independently (absolute), so centering
     here needs its own guaranteed exclusion zone — sized from the
     exact same formulas that size the logo itself (edge-spacing +
     the logo's own height), not a guessed constant. That keeps the
     centered block from ever drifting up under the logo, at any
     viewport height, without needing per-breakpoint special cases. */
  padding-top: max(
    calc(var(--edge-spacing) + clamp(52.6px, 9.29vw, 86.7px) + 1.75rem),
    env(safe-area-inset-top)
  );
  /* The footer is pinned independently to the very bottom (absolute),
     so — same reasoning as the padding-top exclusion zone above —
     centering needs its own guaranteed clearance so content can never
     drift down into it. */
  padding-bottom: max(
    calc(var(--edge-spacing) + 2.25rem),
    env(safe-area-inset-bottom)
  );
  padding-left: max(var(--edge-spacing), env(safe-area-inset-left));
  padding-right: max(var(--edge-spacing), env(safe-area-inset-right));
  background-color: var(--black-deep);
  text-align: center;
}

/* Cinematic backdrop — no photo, just the brand palette: black as the
   dominant tone with a contained dark-blue glow behind the headline,
   plus a slow diagonal wash so it doesn't read as a flat fill. */
.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      55% 42% at 50% 46%,
      rgba(11, 42, 74, 0.65) 0%,
      rgba(11, 42, 74, 0) 72%
    ),
    linear-gradient(
      160deg,
      var(--black-near) 0%,
      var(--navy-deep) 45%,
      var(--black-deep) 100%
    );
  transform: scale(1.04);
  animation: backdrop-breathe 30s var(--ease-premium) infinite alternate;
}

/* Very slow, restrained expansion and contraction — a breath, not a
   zoom — so the gradient never feels static or reads as a flashing
   loop. */
@keyframes backdrop-breathe {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1);
  }
}

/* Fine film grain — the kind of detail that reads as "premium" without
   announcing itself. Pure CSS, no extra image request. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--content-max-width);
  opacity: 0;
  animation: rise-in 1.1s var(--ease-premium) 0.15s forwards;
  /* The logo's exclusion zone above (padding-top) is necessarily
     bigger than the footer's below (padding-bottom), which biases
     plain centering downward — this makes up exactly that difference
     so the content centers on the viewport itself, not on the padded
     box. Only takes effect where there's slack to redistribute; it
     can't push content past the guaranteed clearance in either
     direction. */
  margin-bottom: calc(clamp(52.6px, 9.29vw, 86.7px) - 0.5rem);
}

/* Stacked, centered: image above the text, at every screen size. */
.hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Hero image — the provided photo, used exactly as supplied, now
   presented as an actual framed image rather than a stretched,
   blurred backdrop. It sits as its own piece on the black/navy
   backdrop instead of behind everything else.
   -------------------------------------------------------------------------- */

.hero-image {
  width: min(100%, 640px);
  margin: 0 0 clamp(1.75rem, 5vw, 2.75rem);
  border-radius: clamp(10px, 1.5vw, 16px);
  overflow: hidden;
  border: 1px solid rgba(245, 247, 250, 0.14);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(11, 42, 74, 0.35);
  opacity: 0;
  animation: rise-in 1.1s var(--ease-premium) 0.15s forwards;
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   Site header — the provided logo file, used exactly as supplied
   (full image, uncropped), pinned upper-left like a normal site
   header so it stays clearly visible without competing with the
   centered headline below.
   -------------------------------------------------------------------------- */

.site-header {
  position: absolute;
  top: max(var(--edge-spacing), env(safe-area-inset-top));
  left: max(var(--edge-spacing), env(safe-area-inset-left));
  z-index: 2;
  opacity: 0;
  animation: header-in 1s var(--ease-premium) 0.2s forwards;
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-logo {
  width: clamp(170px, 30vw, 280px);
  height: auto;
}

/* --------------------------------------------------------------------------
   Brand name — live text, set in real fonts so it stays crisp and
   readable at every size (matches the wording in the logo above).
   -------------------------------------------------------------------------- */

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  /* Sized (and checked against the text's own measured width, not
     guessed) to always fit "Kingdom Authority" on a single line,
     from the narrowest phone up. */
  font-size: clamp(1.25rem, 4.4vw, 2.25rem);
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  animation: rise-in 1s var(--ease-premium) 0.3s forwards;
}

.brand-byline {
  margin: clamp(0.4rem, 1.5vw, 0.65rem) 0 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  animation: fade-in 1s var(--ease-premium) 0.5s forwards;
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */

.divider {
  display: block;
  width: 48px;
  height: 1px;
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 clamp(1.75rem, 5vw, 2.75rem);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 247, 250, 0.45),
    transparent
  );
  opacity: 0;
  animation: fade-in 1s var(--ease-premium) 0.55s forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Announcement — the primary message
   -------------------------------------------------------------------------- */

.announce {
  position: relative;
  margin: 0 0 clamp(1rem, 3vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.95rem, 6vw, 3.75rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  animation: rise-in 1s var(--ease-premium) 0.7s forwards;
}

/* A slow, single light sweep across the headline every few seconds —
   restrained enough to feel premium rather than decorative.
   The gradient's first and last stops match (both solid white), so
   tiling it via background-repeat never exposes a gap as it moves —
   the text stays fully opaque throughout the sweep. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .announce {
    background-image: linear-gradient(
      100deg,
      var(--white) 0%,
      var(--white) 42%,
      rgba(255, 255, 255, 0.4) 50%,
      var(--white) 58%,
      var(--white) 100%
    );
    background-size: 250% 100%;
    background-repeat: repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: rise-in 1s var(--ease-premium) 0.7s forwards,
      shimmer 9s linear 2.5s infinite;
  }
}

@keyframes shimmer {
  0%,
  60% {
    background-position: 0 0;
  }
  100% {
    background-position: -250% 0;
  }
}

/* --------------------------------------------------------------------------
   Tagline — subtle, supporting
   -------------------------------------------------------------------------- */

.tagline {
  margin: 0;
  max-width: 34ch;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--text-secondary);
  opacity: 0;
  animation: fade-in 1.1s var(--ease-premium) 0.95s forwards;
}

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

/* Pinned to the very bottom of the frame — independent of how tall
   the centered content above it happens to be, rather than just
   trailing after it. */
.site-footer {
  position: absolute;
  bottom: max(var(--edge-spacing), env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  opacity: 0;
  animation: fade-in 1.2s var(--ease-premium) 1.2s forwards;
}

.site-footer p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

/* Portrait phones: ease the breathing animation a touch. */
@media (max-width: 600px) {
  .hero__backdrop {
    animation-duration: 24s;
  }

  .announce {
    letter-spacing: 0.1em;
  }
}

/* Small phones: tighten spacing so nothing feels cramped, and pull
   the corner brand mark in a little closer. */
@media (max-width: 380px) {
  .site-logo {
    width: clamp(130px, 38vw, 170px);
  }

  .divider {
    margin-bottom: 1.5rem;
  }
}

/* Side-by-side — wide screens only. Image on the left, the headline
   column next to it on the right — but the text inside that column
   stays centered on itself, the same look it has stacked on mobile,
   just relocated rather than re-aligned. Mobile and tablet keep the
   stacked composition (there isn't really room for two columns). */
@media (min-width: 860px) {
  :root {
    --content-max-width: 68rem;
  }

  .hero__layout {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(2.5rem, 6vw, 4.5rem);
  }

  .hero-image {
    flex: 0 0 auto;
    width: min(46%, 520px);
    margin-bottom: 0;
  }

  .hero__text {
    flex: 0 1 auto;
    max-width: 35rem;
  }

  /* Re-checked against the text's measured width for this column
     size specifically — still one line, just a bit larger since
     there's more room here than on a narrow phone. */
  .brand-name {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
  }

  .announce {
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    letter-spacing: 0.09em;
  }
}

/* Large / high-resolution displays: keep composition from feeling
   substantial rather than adrift in empty space. */
@media (min-width: 1600px) {
  :root {
    --content-max-width: 80rem;
  }

  .hero-image {
    width: min(46%, 600px);
  }

  .hero__text {
    max-width: 39rem;
  }
}

/* Short viewports (landscape phones, small laptops with browser chrome).
   The base .hero padding-top formula already keeps the centered
   block clear of the logo at any height, so this just trims the logo
   and type down a notch for comfort on genuinely cramped screens. */
@media (max-height: 480px) {
  .site-logo {
    width: clamp(120px, 22vw, 170px);
  }

  .brand-name {
    font-size: clamp(1.3rem, 4.2vw, 2rem);
  }
}

