/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #F1FAEE;
  background-color: #0B0C10;
  -webkit-font-smoothing: antialiased;
}
a { color: #E63946; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid #F4A261; outline-offset: 2px; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ===== CSS Variables ===== */
:root {
  --color-primary-red: #E63946;
  --color-primary-orange: #F4A261;
  --color-accent-blue: #1D3557;
  --color-accent-silver: #C0C0C0;
  --color-bg-dark: #0B0C10;
  --color-bg-light: #F1FAEE;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A8DADC;
  --gradient-highlight: linear-gradient(135deg, #E63946, #F4A261);
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --weight-heading: 800;
  --letter-spacing-heading: 0.15em;
  --header-height: 4rem;
  --max-width: 1280px;
  --gap: 1.5rem;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary-orange);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 10000;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-highlight);
  z-index: 9999;
  transition: width 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  .progress-bar { display: none; }
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(11,12,16,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(196,196,196,0.2);
  z-index: 1000;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  letter-spacing: var(--letter-spacing-heading);
  color: var(--color-text-primary);
  text-decoration: none;
}
.site-header__logo-icon { font-size: 1.5rem; }
.site-header__logo-text { font-size: 1.2rem; line-height: 1; }

/* Navigation - pill style */
.nav__list {
  display: flex;
  gap: 0.5rem;
}
.nav__link {
  display: block;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link:focus-visible {
  background: var(--gradient-highlight);
  color: #000;
  text-decoration: none;
}
.nav__link[aria-current="page"] {
  background: var(--gradient-highlight);
  color: #000;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(11,12,16,0.95);
    backdrop-filter: blur(12px);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    border-bottom: 1px solid rgba(196,196,196,0.2);
  }
  .nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__list {
    flex-direction: column;
    gap: 0.25rem;
  }
  .nav__link {
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: linear-gradient(135deg, #1D3557, #0B0C10);
  color: var(--color-text-primary);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.site-footer__logo {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  letter-spacing: var(--letter-spacing-heading);
  font-size: 1.3rem;
}
.site-footer__tagline { color: var(--color-text-secondary); margin-top: 0.5rem; }
.site-footer__contact p { margin-bottom: 0.25rem; }
.site-footer__contact a { color: var(--color-primary-orange); }
.site-footer__note { font-size: 0.85rem; color: var(--color-accent-silver); margin-top: 0.5rem; }
.site-footer__links .footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer__links a { color: var(--color-text-secondary); }
.site-footer__links a:hover { color: var(--color-primary-orange); }
.site-footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(196,196,196,0.2);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: center;
}
.site-footer__icp { font-size: 0.85rem; color: var(--color-accent-silver); }
.site-footer__trust { font-size: 0.8rem; color: var(--color-accent-silver); margin-top: 0.5rem; }

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.btn:hover { transform: scale(1.02); }
.btn:focus-visible { outline: 2px solid var(--color-primary-orange); outline-offset: 2px; }
.btn--primary {
  background: var(--gradient-highlight);
  color: #000;
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary-orange);
  color: var(--color-primary-orange);
}

/* ===== Glass Card ===== */
.glass-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; transform: none; }
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Image Container ===== */
.img-container {
  position: relative;
  overflow: hidden;
  background: var(--color-accent-blue);
}
.img-container::before {
  content: '';
  display: block;
  padding-bottom: 56.25%; /* 16:9 */
}
.img-container > img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Focus visible & reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== Misc ===== */
:focus-visible {
  outline: 2px solid var(--color-primary-orange);
  outline-offset: 2px;
}
::selection {
  background: var(--color-primary-orange);
  color: #000;
}
