:root {
  --accent-color: #60a5fa;
  --accent-glow: rgba(96, 165, 250, 0.5);
  --radius: 8px;
  --transition-fast: 0.3s;
  --transition-medium: 0.5s;
  --transition-slow: 0.8s;
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);

  --bg-color: #000;
  --text-color: #fff;
  --text-muted: #aaa;
  --border-color: #333;
  --form-field-bg: transparent;
  --header-bg: rgba(0, 0, 0, 0.3);
  --card-bg: rgba(0, 0, 0, 0.3);
  --about-bg: #000;
  --footer-bg: #000;
  --footer-blurb-color: #aaa;
}

body.light-mode {
  --bg-color: #fff;
  --text-color: #111;
  --text-muted: #555;
  --border-color: #eee;
  --header-bg: rgba(255, 255, 255, 0.3);
  --form-field-bg: #f0f0f0;
  --card-bg: rgba(255, 255, 255, 0.3);
  --about-bg: #fff;
  --footer-bg: #fff;
  --footer-blurb-color: #555;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

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

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

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

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
button,
input,
label {
  margin: 0;
  padding: 0;
  font-family: inherit;
}

ul {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

/* Global announcement bar */
.site-alert {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.85));
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  position: relative;
  z-index: 1100;
}

.site-alert__inner {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.site-alert__text {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .site-alert__text {
    animation: site-alert-marquee 12s linear infinite;
    padding-left: 100%;
  }
}

@keyframes site-alert-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  transition: background-color var(--transition-fast);
  padding-top: env(safe-area-inset-top);
}

.site-header .e-con-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 65px;
  padding: 5px 20px;
}

.site-logo {
  display: inline-flex;
  transition: transform var(--transition-fast) var(--ease-out-cubic);
}

.site-logo:hover {
  transform: scale(1.08);
}

.site-logo img {
  width: 50px;
}

.logo-dark {
  display: block;
}

.logo-light {
  display: none;
}

body.light-mode .logo-dark {
  display: none;
}

body.light-mode .logo-light {
  display: block;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav ul {
  display: flex;
  gap: 30px;
}

.main-nav a {
  font-weight: 500;
  font-size: 15px;
  padding: 5px 0;
  position: relative;
  transition: color var(--transition-fast);
}

.main-nav a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.theme-toggle {
  position: relative;
  width: 22px;
  height: 22px;
}

.theme-toggle svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  stroke: var(--text-color);
  transition: stroke var(--transition-fast);
}

.theme-toggle:hover svg,
.theme-toggle:focus-visible svg {
  stroke: var(--accent-color);
}

.icon-sun {
  display: none;
}

body.light-mode .icon-moon {
  display: none;
}

body.light-mode .icon-sun {
  display: block;
}

@keyframes scale-out {
  from {
    transform: rotate(0) scale(1);
    opacity: 1;
  }

  to {
    transform: rotate(360deg) scale(0);
    opacity: 0;
  }
}

@keyframes scale-in {
  from {
    transform: rotate(-360deg) scale(0);
    opacity: 0;
  }

  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

.animating-out {
  animation: scale-out 0.3s ease-in-out forwards;
}

.animating-in {
  animation: scale-in 0.3s ease-in-out forwards;
}

.menu-toggle {
  display: none;
}

@media (max-width: 767px) {
  .site-header .e-con-inner {
    flex-direction: row;
    align-items: center;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    visibility: hidden;
    transition:
      max-height 0.4s ease-in-out,
      opacity 0.4s ease-in-out,
      visibility 0s linear 0.4s;
  }

  body.light-mode .main-nav {
    background: rgba(255, 255, 255, 0.8);
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    transition:
      max-height 0.4s var(--ease-out-cubic),
      opacity 0.4s ease-out,
      visibility 0s linear 0s;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav a {
    display: block;
    padding: 15px 20px;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 24px;
    height: 24px;
  }

  .menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-color);
    position: absolute;
    transition:
      transform 0.3s ease-in-out,
      opacity 0.3s ease-in-out;
  }

  .menu-toggle .icon-close {
    transform: rotate(-45deg) scale(0);
    opacity: 0;
  }

  .menu-toggle.js-open .icon-menu {
    transform: rotate(45deg) scale(0);
    opacity: 0;
  }

  .menu-toggle.js-open .icon-close {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

.hero {
  height: 100vh;
  margin-top: calc(-65px - env(safe-area-inset-top));
  color: #fff;
}

.hero .e-con-inner {
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding-top: 65px;
}

.video-background-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-background-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.video-background-wrapper iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-title .char {
  display: inline-block;
}

.hero-divider {
  width: 120px;
  height: 3px;
  background: var(--accent-color);
  margin: 25px auto;
  border-radius: 2px;
  transform: scaleX(0);
}

.in-view .hero-divider {
  transform: scaleX(1);
  transition: transform 0.8s var(--ease-in-out-quart) 0.5s;
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero-tagline span {
  color: var(--accent-color);
}

/* Lite-video component */
.lite-video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background-color: #000;
  overflow: hidden;
}

.lite-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lite-video__poster img,
.lite-video__poster picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lite-video__trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.lite-video__trigger:hover,
.lite-video__trigger:focus-visible {
  background: var(--accent-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.lite-video__icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

/* Hide play button for autoplay background videos */
.lite-video[data-autoplay='true'] .lite-video__trigger {
  display: none;
}

.lite-video--activated {
  background: transparent;
}

/* Hide trigger immediately when video starts loading */
.lite-video--activated .lite-video__trigger {
  display: none;
}

/* Keep poster ON TOP of iframe until video is playing - hides gray loading state */
.lite-video--activated .lite-video__poster {
  z-index: 3;
}

/* Iframe loads underneath the poster */
.lite-video--activated iframe {
  z-index: 1;
}

/* Fade out poster after video starts playing */
.lite-video--loaded .lite-video__poster {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.lite-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
  border: none;
}

/* Ensure video-background-wrapper fills and positions correctly */
.video-background-wrapper .lite-video {
  position: absolute;
  inset: 0;
}

/* Animation helpers - MUST be in critical.css to prevent FOUC */
/* Unified system: .animated + optional .slide-up / .slide-left / etc */
.animated {
  opacity: 0;
  transition:
    opacity 0.5s var(--ease-out-cubic, ease-out),
    transform 0.5s var(--ease-out-cubic, ease-out);
}

.animated.slide-up {
  transform: translateY(30px);
}
.animated.slide-down {
  transform: translateY(-30px);
}
.animated.slide-left {
  transform: translateX(-30px);
}
.animated.slide-right {
  transform: translateX(30px);
}

.animated.in-view {
  opacity: 1;
  transform: none;
}

/* Hero content visible immediately - divider animates via .in-view parent */
.hero-content,
.hero-tagline {
  opacity: 1 !important;
  transform: none !important;
}

/* Suppress CSS transitions during View Transitions */
.view-transitioning .animated {
  transition: none !important;
}
