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

html {
  scroll-behavior: smooth;
  background: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, rgba(46, 125, 91, 0.14), transparent 45%),
              radial-gradient(circle at 85% 25%, rgba(212, 163, 89, 0.08), transparent 40%),
              var(--bg-obsidian);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

button, input, select, textarea {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(1280px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Sticky Transparent -> Glass Navbar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 900;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(10, 15, 14, 0.72) 0%, rgba(10, 15, 14, 0) 100%);
  transition: background var(--transition-smooth), border-color var(--transition-smooth), backdrop-filter var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border-subtle);
}

.nav-inner {
  width: min(1360px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92rem;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 225px;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

.brand-crest {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-emerald), #153528);
  border: 1px solid var(--border-strong);
  color: var(--accent-gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-select {
  background: rgba(18, 32, 27, 0.75);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-pill);
  padding: 0.62rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald-bright), var(--accent-emerald));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Fullscreen Hero */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(4rem, 9vh, 6.5rem);
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(63, 168, 123, 0.22), transparent 55%),
    radial-gradient(ellipse at 75% 20%, rgba(212, 163, 89, 0.16), transparent 45%),
    linear-gradient(175deg, #0b1613 0%, #10241c 48%, #0a0f0e 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 15, 14, 0.45) 0%, rgba(10, 15, 14, 0.22) 45%, rgba(10, 15, 14, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(18, 32, 27, 0.72);
  border: 1px solid var(--border-strong);
  color: var(--accent-gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1.06;
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.hero-subcopy {
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  margin: 0 0 1.65rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-asset-note {
  margin-top: 1.2rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 29, 24, 0.8);
  border: 1px dashed var(--border-strong);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Status Grid for Phase 1 Foundation */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  margin: 0;
}

.section-subtitle {
  color: var(--text-secondary);
  margin: 0.35rem 0 0;
  max-width: 640px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  backdrop-filter: blur(14px);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(63, 168, 123, 0.16);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(63, 168, 123, 0.3);
}

.badge.is-warn {
  background: rgba(212, 163, 89, 0.15);
  color: var(--accent-gold);
  border-color: rgba(212, 163, 89, 0.35);
}

/* Persistent Right-Edge Emergency Button */
.emergency-fab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 960;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem 0.85rem 1.05rem;
  background: var(--accent-emergency);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-right: none;
  border-radius: 14px 0 0 14px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: -4px 8px 28px rgba(217, 56, 58, 0.45);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.emergency-fab:hover {
  background: var(--accent-emergency-hover);
  transform: translateY(-50%) translateX(-2px);
}

.emergency-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
}

/* Emergency Drawer */
.emergency-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: flex-end;
}

.emergency-drawer.is-open {
  display: flex;
}

.emergency-panel {
  width: min(440px, 100%);
  height: 100%;
  background: #131918;
  border-left: 1px solid rgba(217, 56, 58, 0.35);
  padding: 1.5rem;
  overflow-y: auto;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-nav-height) + 12px);
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--mobile-nav-height);
    z-index: 950;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(10, 15, 14, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: var(--text-secondary);
    gap: 0.2rem;
  }

  .mobile-bottom-nav a.is-active {
    color: var(--accent-emerald-bright);
  }

  /* Compact non-overlapping Emergency button above mobile bottom bar */
  .emergency-fab {
    top: auto;
    bottom: calc(var(--mobile-nav-height) + 14px);
    transform: none;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    border-radius: 12px 0 0 12px;
  }

  .emergency-fab:hover {
    transform: translateX(-2px);
  }
}
