/* reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

:root {
  --bg: #1A1A1A;
  --text: #E0E0E0;
  --accent: #D32F2F;
  --accent-light: #FF5252;
  --accent-blue: #00BFFF;
  --silver: #C0C0C0;
  --cream: #F5F0E1;
  --deep-red: #8B0000;
  --deep-blue: #0A2463;
  --card-bg: #F5F0E1;
  --card-text: #1A1A1A;
  --border: #C0C0C0;
  --nav-bg: rgba(26,26,26,0.95);
  --header-height: 60px;
  --max-width: 1200px;
  --gap: 1.5rem;
}

/* skip link */
.skip-link {
  position: absolute; top: -100%; left: 0; z-index: 9999;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem;
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 0; }

/* container */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* header */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--nav-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--accent); height: var(--header-height);
  display: flex; align-items: center;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.header__brand {
  font-family: Futura, Impact, sans-serif; font-weight: 800; font-style: italic;
  font-size: 1.8rem; color: var(--accent); text-decoration: none; letter-spacing: 1px;
}
.header__brand:hover { color: var(--accent-light); }

/* navigation */
.header__nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; gap: 0.5rem; }
.nav-link {
  display: inline-block; padding: 0.5rem 1rem; color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 0.95rem; border-radius: 4px; transition: 0.2s;
  position: relative;
}
.nav-link:hover, .nav-link:focus-visible { background: var(--accent); color: #fff; }
.nav-link[aria-current="page"] {
  background: var(--accent); color: #fff; box-shadow: 0 0 8px var(--accent);
}

/* mobile toggle */
.header__toggle {
  display: none; flex-direction: column; gap: 4px; background: transparent; border: none;
  cursor: pointer; padding: 0.5rem;
}
.toggle-bar { display: block; width: 28px; height: 3px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* mobile nav */
@media (max-width: 768px) {
  .header__toggle { display: flex; }
  .header__nav {
    position: fixed; top: var(--header-height); left: 0; width: 100%; max-height: 0;
    overflow: hidden; background: var(--bg); transition: max-height 0.4s ease;
    border-bottom: 2px solid var(--accent);
  }
  .header__nav[data-open] { max-height: 400px; }
  .nav-list { flex-direction: column; padding: 1rem; gap: 0.25rem; }
  .nav-link { display: block; padding: 0.75rem 1rem; }
}

/* header toggle animation */
[data-nav-toggle][aria-expanded="true"] .toggle-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
[data-nav-toggle][aria-expanded="true"] .toggle-bar:nth-child(2) { opacity: 0; }
[data-nav-toggle][aria-expanded="true"] .toggle-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* progress bar */
[data-progress-bar] {
  position: fixed; top: var(--header-height); left: 0; width: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  z-index: 999; transition: width 0.1s linear;
}

/* footer */
.footer {
  background: #111; border-top: 2px solid var(--accent); padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer__inner { display: flex; flex-direction: column; gap: 1.5rem; }
.footer__brand { font-family: Futura, Impact, sans-serif; font-size: 2rem; font-weight: 800; color: var(--accent); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; }
.footer-link { color: var(--silver); text-decoration: none; font-weight: 500; }
.footer-link:hover, .footer-link:focus-visible { color: var(--accent-light); }
.footer__contact { color: #aaa; font-size: 0.9rem; }
.footer__icp { color: #777; font-size: 0.8rem; border-top: 1px solid #333; padding-top: 1rem; }

/* buttons */
.btn {
  display: inline-block; padding: 0.6rem 1.4rem; border: 2px solid transparent; border-radius: 4px;
  font-weight: 700; text-decoration: none; cursor: pointer; transition: 0.2s;
  font-family: inherit; font-size: 1rem;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--deep-red); border-color: var(--deep-red); }
.btn--secondary { background: transparent; color: var(--accent-blue); border-color: var(--accent-blue); }
.btn--secondary:hover { background: var(--deep-blue); color: #fff; }

/* common containers */
.breadcrumb { padding: 0.5rem 0; color: var(--silver); font-size: 0.85rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* section number styling */
.section-number { font-family: Futura, Impact, sans-serif; font-size: 4rem; font-weight: 800; color: var(--accent); opacity: 0.3; line-height: 1; }
.section-title { font-size: 2rem; font-weight: 700; color: var(--text); }

/* image placeholder base */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: #333; color: #aaa; font-size: 0.9rem;
  aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
}

/* responsive */
@media (max-width: 480px) {
  .header__brand { font-size: 1.4rem; }
  .section-number { font-size: 2.5rem; }
  .section-title { font-size: 1.5rem; }
}

/* focus-visible & reduced motion */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
