/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; font-size: 1rem; line-height: 1.6; color: #F5F5F5; background-color: #1A1A1A; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
a:hover, a:focus-visible { color: #DAA520; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; appearance: none; -webkit-appearance: none; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #DAA520; outline-offset: 2px; }
::selection { background-color: #8B0000; color: #F5F5F5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== CSS Variables ===== */
:root {
  --c-primary: #8B0000;
  --c-primary-dark: #5C0000;
  --c-gold: #DAA520;
  --c-gold-light: #F0C75E;
  --c-dark: #1A1A1A;
  --c-dark-alt: #2E2E2E;
  --c-text: #F5F5F5;
  --c-text-dim: #A0A0A0;
  --c-border: rgba(218,165,32,0.25);
  --c-glow: 0 0 20px rgba(218,165,32,0.4);
  --gradient-red-gold: linear-gradient(135deg, #8B0000 0%, #DAA520 100%);
  --gradient-dark: linear-gradient(180deg, #1A1A1A 0%, #0D0D0D 100%);
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --content-max: 1280px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --radius-sm: 2px;
  --radius-md: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Skip Link ===== */
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 1000; padding: 0.75rem 1.5rem; background: #DAA520; color: #121212; font-weight: 600; border-radius: 0 0 4px 4px; transition: top 0.2s ease; }
.skip-link:focus { top: 0; outline: none; }

/* ===== Scroll Progress ===== */
.scroll-progress { position: fixed; top: 0; left: 0; z-index: 999; height: 3px; background: var(--gradient-red-gold); width: 0%; transition: width 0.1s linear; will-change: width; }
@media (prefers-reduced-motion: reduce) { .scroll-progress { transition: none; } }

/* ===== Site Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(26,26,26,0.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-md); height: 64px; gap: var(--space-sm); }
.brand-logo a { display: flex; align-items: center; gap: 0.5rem; color: #F5F5F5; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; position: relative; }
.brand-icon { font-size: 1.5rem; color: #DAA520; filter: drop-shadow(0 0 6px rgba(218,165,32,0.5)); }
.brand-text { background: var(--gradient-red-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand-glow { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(218,165,32,0.2) 0%, transparent 70%); animation: brandPulse 2.5s ease-in-out infinite; }
@keyframes brandPulse { 0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.9); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .brand-glow { animation: none; opacity: 0.5; } }

/* ===== Compact Navigation ===== */
.nav-compact ul { display: flex; gap: 0.25rem; align-items: center; }
.nav-compact a { display: block; padding: 0.4rem 0.75rem; font-size: 0.85rem; font-weight: 500; color: #C0C0C0; letter-spacing: 0.02em; border-bottom: 2px solid transparent; transition: color 0.25s, border-color 0.25s; white-space: nowrap; position: relative; }
.nav-compact a::before { content: ''; position: absolute; bottom: -2px; left: 10%; width: 80%; height: 2px; background: var(--gradient-red-gold); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left; }
.nav-compact a:hover, .nav-compact a:focus-visible { color: #DAA520; }
.nav-compact a:hover::before, .nav-compact a:focus-visible::before { transform: scaleX(1); }
.nav-compact a[aria-current="page"] { color: #DAA520; font-weight: 600; }
.nav-compact a[aria-current="page"]::before { transform: scaleX(1); }
.nav-compact a[aria-current="page"]::after { content: ''; position: absolute; top: 50%; right: -6px; width: 6px; height: 6px; border-radius: 50%; background: #DAA520; box-shadow: 0 0 8px rgba(218,165,32,0.6); transform: translateY(-50%); }

/* ===== Header Actions ===== */
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.search-trigger { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #C0C0C0; transition: color 0.25s; border-radius: var(--radius-sm); }
.search-trigger:hover, .search-trigger:focus-visible { color: #DAA520; }
.cta-btn { display: inline-flex; align-items: center; padding: 0.5rem 1.25rem; background: var(--gradient-red-gold); color: #F5F5F5; font-weight: 600; font-size: 0.85rem; border-radius: var(--radius-sm); letter-spacing: 0.03em; transition: box-shadow 0.3s, transform 0.2s; box-shadow: 0 0 0 rgba(218,165,32,0); white-space: nowrap; }
.cta-btn:hover, .cta-btn:focus-visible { box-shadow: 0 0 24px rgba(218,165,32,0.4); transform: translateY(-1px); color: #F5F5F5; }

/* ===== Nav Toggle (Mobile) ===== */
.nav-toggle { display: none; flex-direction: column; gap: 4px; width: 30px; height: 30px; align-items: center; justify-content: center; padding: 4px; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: #DAA520; border-radius: 1px; transition: transform 0.3s ease, opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .nav-toggle .bar { transition: none; } }

/* ===== Search Bar ===== */
.search-bar { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease; opacity: 0; background: rgba(26,26,26,0.98); border-bottom: 1px solid var(--c-border); }
.search-bar[aria-hidden="false"] { max-height: 72px; opacity: 1; }
.search-inner { display: flex; align-items: center; max-width: var(--content-max); margin: 0 auto; padding: 0.75rem var(--space-md); gap: 0.75rem; }
.search-inner input { flex: 1; padding: 0.6rem 1rem; background: #2E2E2E; border: 1px solid var(--c-border); border-radius: var(--radius-sm); color: #F5F5F5; font-size: 0.95rem; }
.search-inner input::placeholder { color: #888; }
.search-inner input:focus { outline: none; border-color: #DAA520; box-shadow: 0 0 12px rgba(218,165,32,0.2); }
.search-close { color: #C0C0C0; font-size: 1.2rem; padding: 0.25rem 0.5rem; transition: color 0.25s; }
.search-close:hover { color: #DAA520; }

/* ===== Site Footer ===== */
.site-footer { background: var(--gradient-dark); border-top: 1px solid var(--c-border); position: relative; padding-top: 0; }
.footer-decor { height: 4px; background: var(--gradient-red-gold); clip-path: polygon(0 0, 100% 0, 98% 100%, 2% 100%); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: var(--space-lg); max-width: var(--content-max); margin: 0 auto; padding: var(--space-xl) var(--space-md) var(--space-lg); }
.footer-brand .brand-logo { margin-bottom: var(--space-sm); }
.footer-tagline { font-family: var(--font-heading); font-size: 1.1rem; color: #DAA520; margin-bottom: var(--space-xs); }
.footer-trust { font-size: 0.85rem; color: var(--c-text-dim); line-height: 1.7; max-width: 32em; }
.footer-heading { font-family: var(--font-heading); font-size: 1rem; color: #DAA520; margin-bottom: var(--space-sm); letter-spacing: 0.03em; text-transform: uppercase; border-bottom: 1px solid var(--c-border); padding-bottom: 0.4rem; display: inline-block; }
.footer-links ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { font-size: 0.9rem; color: #C0C0C0; transition: color 0.25s; padding: 0.15rem 0; display: inline-block; }
.footer-links a:hover, .footer-links a:focus-visible { color: #DAA520; transform: translateX(3px); }
.contact-item { font-size: 0.9rem; color: #C0C0C0; margin-bottom: 0.3rem; }
.contact-label { color: var(--c-text-dim); margin-right: 0.25rem; }
.contact-item a { color: #DAA520; }
.contact-item a:hover { text-decoration: underline; }
.icp-info { font-size: 0.85rem; color: var(--c-text-dim); margin-bottom: 0.25rem; }
.copyright { font-size: 0.85rem; color: var(--c-text-dim); }

/* ===== Shared Components ===== */
.text-divider { display: block; width: 60px; height: 2px; background: var(--gradient-red-gold); margin: var(--space-sm) 0; }
.data-card { background: #2E2E2E; border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: var(--space-md); transition: box-shadow 0.3s, transform 0.2s; position: relative; overflow: hidden; }
.data-card::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 20% 30%, rgba(218,165,32,0.03) 0px, transparent 2px, transparent 12px); pointer-events: none; }
.data-card:hover { box-shadow: 0 0 30px rgba(218,165,32,0.15); transform: translateY(-2px); border-color: rgba(218,165,32,0.4); }
.data-card:hover::before { animation: drumPulse 1.5s ease-in-out infinite; }
@keyframes drumPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .data-card::before { animation: none; } .data-card:hover { transform: none; } }
.metric-block { display: flex; flex-direction: column; gap: 0.15rem; }
.metric-block .metric-value { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; color: #DAA520; line-height: 1.1; }
.metric-block .metric-label { font-size: 0.85rem; color: var(--c-text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.timeline-node { display: flex; gap: var(--space-sm); align-items: flex-start; position: relative; padding-left: var(--space-md); }
.timeline-node::before { content: ''; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gradient-red-gold); box-shadow: 0 0 10px rgba(218,165,32,0.3); }
.timeline-node::after { content: ''; position: absolute; left: 4px; top: 18px; width: 2px; height: calc(100% - 12px); background: repeating-linear-gradient(180deg, var(--c-border) 0px, var(--c-border) 4px, transparent 4px, transparent 8px); }
.timeline-node:last-child::after { display: none; }
.tab-group { display: flex; gap: 0; border-bottom: 1px solid var(--c-border); margin-bottom: var(--space-md); }
.tab-item { padding: 0.6rem 1.2rem; font-size: 0.9rem; font-weight: 500; color: #C0C0C0; cursor: pointer; border-bottom: 2px solid transparent; transition: color 0.25s, border-color 0.25s; background: none; }
.tab-item:hover, .tab-item:focus-visible { color: #DAA520; }
.tab-item[aria-selected="true"] { color: #DAA520; border-bottom-color: #DAA520; box-shadow: 0 2px 12px rgba(218,165,32,0.15); }
.grid-precision { background-image: repeating-linear-gradient(0deg, rgba(218,165,32,0.04) 0px, rgba(218,165,32,0.04) 1px, transparent 1px, transparent 40px), repeating-linear-gradient(90deg, rgba(218,165,32,0.04) 0px, rgba(218,165,32,0.04) 1px, transparent 1px, transparent 40px); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
  .nav-compact a { font-size: 0.8rem; padding: 0.35rem 0.5rem; }
  .nav-compact a[aria-current="page"]::after { display: none; }
}
@media (max-width: 768px) {
  .header-inner { height: 56px; padding: 0 var(--space-sm); }
  .nav-compact { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(26,26,26,0.98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: var(--space-md); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; z-index: 200; }
  .nav-compact[data-open] { transform: translateX(0); }
  .nav-compact ul { flex-direction: column; gap: 0.5rem; align-items: stretch; }
  .nav-compact a { font-size: 1.1rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--c-border); text-align: center; }
  .nav-compact a::before { display: none; }
  .nav-compact a[aria-current="page"] { background: rgba(218,165,32,0.08); border-radius: var(--radius-sm); }
  .nav-compact a[aria-current="page"]::after { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .cta-btn { display: none; }
  .search-inner { padding: 0.5rem var(--space-sm); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-md); padding: var(--space-lg) var(--space-sm); }
  .footer-brand { text-align: center; }
  .footer-heading { text-align: center; width: 100%; }
  .footer-links ul { align-items: center; }
  .footer-contact { text-align: center; }
  .footer-legal { text-align: center; }
}
@media (max-width: 480px) {
  .brand-text { font-size: 1.1rem; }
  .brand-icon { font-size: 1.2rem; }
  .header-inner { gap: 0.35rem; }
  .search-trigger { width: 32px; height: 32px; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-compact { transition: none; }
  .data-card { transition: none; }
  .data-card:hover { transform: none; }
  .cta-btn { transition: none; }
  .cta-btn:hover { transform: none; }
  .brand-glow { animation: none; }
}

/* ===== Main Content Wrapper ===== */
#main-content { min-height: 60vh; padding-top: var(--space-md); }

/* ===== Breadcrumbs ===== */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; font-size: 0.85rem; color: var(--c-text-dim); margin-bottom: var(--space-md); }
.breadcrumbs a { color: #C0C0C0; transition: color 0.25s; }
.breadcrumbs a:hover { color: #DAA520; }
.breadcrumbs .separator { color: var(--c-border); user-select: none; }
.breadcrumbs .current { color: #DAA520; font-weight: 500; }

/* ===== Container ===== */
.content-container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-md); }
.content-container-narrow { max-width: 840px; margin: 0 auto; padding: 0 var(--space-md); }
