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

:root {
  --bg: #071019;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.92);
  --white-muted: rgba(255, 255, 255, 0.78);
  --border: rgba(255, 255, 255, 0.14);
  --panel-top: rgba(255, 255, 255, 0.11);
  --panel-bottom: rgba(255, 255, 255, 0.06);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  --text-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --max-panel: 860px;
  --space: clamp(16px, 2vw, 28px);
  --logo-width: clamp(180px, 28vw, 420px);
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background */
.bg-layer,
.bg-overlay,
.bg-glow,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-layer {
  background: url("../images/background.jpg") center center / cover no-repeat;
  transform: scale(1.045);
  animation: backgroundFloat 16s ease-in-out infinite alternate;
}

.bg-overlay {
  background:
    linear-gradient(180deg, rgba(3, 8, 15, 0.38) 0%, rgba(4, 10, 18, 0.58) 42%, rgba(3, 8, 14, 0.78) 100%),
    radial-gradient(circle at 20% 20%, rgba(89, 148, 255, 0.08), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(255, 210, 142, 0.08), transparent 24%),
    radial-gradient(circle at 70% 75%, rgba(67, 116, 220, 0.08), transparent 24%);
}

.bg-glow {
  filter: blur(88px);
  opacity: 0.22;
}

.bg-glow-one {
  width: 24rem;
  height: 24rem;
  left: 4%;
  bottom: 7%;
  border-radius: 50%;
  background: rgba(90, 136, 255, 0.24);
  animation: glowDriftOne 14s ease-in-out infinite alternate;
}

.bg-glow-two {
  width: 20rem;
  height: 20rem;
  right: 8%;
  top: 6%;
  border-radius: 50%;
  background: rgba(255, 210, 145, 0.16);
  animation: glowDriftTwo 16s ease-in-out infinite alternate;
}

.grain {
  opacity: 0.05;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.6) 0.5px, transparent 0.6px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

/* Layout */
.site-header,
.hero {
  position: relative;
  z-index: 2;
}

.site-header {
  width: 100%;
  padding: 28px var(--space) 0;
}

.logo-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 100%;
  max-width: var(--logo-width);
  height: auto;
  object-fit: contain;
  opacity: 0.72;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.05))
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.34))
    blur(0.18px)
    saturate(0.9)
    brightness(0.97);
  animation: logoReveal 1.6s cubic-bezier(.2,.7,.2,1) both;
}

.hero {
  min-height: calc(100vh - 110px);
  display: grid;
  place-items: center;
  padding: 20px var(--space) 42px;
}

.hero-panel {
  width: min(100%, var(--max-panel));
  text-align: center;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-top) 0%, var(--panel-bottom) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  animation: panelReveal 1.2s cubic-bezier(.2,.7,.2,1) 0.22s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: var(--text-shadow);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  text-wrap: balance;
  text-shadow: var(--text-shadow);
}

.subtitle {
  margin: 0 0 12px;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  font-weight: 500;
  color: var(--white-soft);
  text-shadow: var(--text-shadow);
}

.description {
  max-width: 680px;
  margin: 0 auto;
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
  line-height: 1.75;
  color: var(--white-muted);
  text-shadow: var(--text-shadow);
  text-wrap: pretty;
}

/* Large screens */
@media (min-width: 1600px) {
  :root {
    --logo-width: 460px;
    --max-panel: 920px;
  }

  .hero {
    padding-bottom: 58px;
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .hero {
    min-height: calc(100vh - 96px);
  }

  .hero-panel {
    width: min(100%, 760px);
  }

  .site-logo {
    opacity: 0.7;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }

  .site-header {
    padding-top: 20px;
  }

  .hero {
    min-height: calc(100vh - 84px);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .hero-panel {
    border-radius: 24px;
  }

  .bg-layer {
    background-position: center center;
    transform: scale(1.07);
  }

  .bg-glow-one {
    width: 16rem;
    height: 16rem;
    left: -4%;
    bottom: 4%;
  }

  .bg-glow-two {
    width: 14rem;
    height: 14rem;
    right: -2%;
    top: 4%;
  }

  .site-logo {
    max-width: clamp(170px, 52vw, 300px);
    opacity: 0.66;
  }
}

@media (max-width: 480px) {
  :root {
    --radius: 20px;
  }

  .site-header,
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-panel {
    padding: 24px 18px;
  }

  .badge {
    min-height: 34px;
    padding: 0 13px;
    margin-bottom: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  .subtitle {
    margin-bottom: 10px;
  }

  .description {
    line-height: 1.65;
  }
}

@media (max-width: 360px) {
  .hero-panel {
    padding: 22px 15px;
  }

  .site-logo {
    max-width: 170px;
  }
}

/* Motion */
@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    filter:
      drop-shadow(0 0 0 rgba(255,255,255,0))
      drop-shadow(0 0 0 rgba(0,0,0,0))
      blur(1.2px)
      saturate(0.86)
      brightness(0.94);
  }
  100% {
    opacity: 0.72;
    transform: translateY(0) scale(1);
    filter:
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.05))
      drop-shadow(0 10px 28px rgba(0, 0, 0, 0.34))
      blur(0.18px)
      saturate(0.9)
      brightness(0.97);
  }
}

@keyframes backgroundFloat {
  from {
    transform: scale(1.045) translateY(0);
  }
  to {
    transform: scale(1.065) translateY(-6px);
  }
}

@keyframes glowDriftOne {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(16px, -12px, 0); }
}

@keyframes glowDriftTwo {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-14px, 10px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bg-layer,
  .bg-glow-one,
  .bg-glow-two,
  .hero-panel,
  .site-logo {
    animation: none;
  }
}
