:root { --container: 1440px; --gutter: clamp(20px, 4vw, 72px); }
/* ─── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #080a0d;
  --bg2:        #0f1116;
  --bg3:        #161920;
  --gold:       #b8922a;
  --gold2:      #d4aa3f;
  --white:      #ede9df;
  --muted:      #6e737f;
  --radius:     5px;
  --transition: 0.33s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--bg); }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ─── NAV ─────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 var(--gutter); height: 66px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(8,10,13,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(184,146,42,0.2);
}
.nav-brand { display: flex; align-items: center; gap: 13px; }
.nav-logo-img {
  width: 44px; height: 44px;
  object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(184,146,42,0.2));
}
.nav-brand-text { line-height: 1.1; }
.nav-brand-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; letter-spacing: 3px; color: var(--white); }
.nav-brand-sub  { font-size: 0.65rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.nav-links { display: flex; gap: 34px; list-style: none; }
.nav-links a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 66px; left: 0; right: 0;
    background: var(--bg2); flex-direction: column; align-items: center;
    gap: 0; padding: 0; max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
    border-bottom: 1px solid rgba(184,146,42,0.2);
  }
  .nav-links.open { max-height: 300px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px var(--gutter); border-bottom: 1px solid rgba(255,255,255,0.04); }
}

/* ─── PAGE HERO ────────────────────────────────────── */
.page-hero {
  position: relative; overflow: hidden;
  min-height: 320px; display: flex; align-items: flex-end;
  background: var(--bg); border-bottom: 1px solid rgba(184,146,42,0.18);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 100% at 75% 50%, rgba(184,146,42,0.10) 0%, transparent 60%),
    linear-gradient(170deg, var(--bg) 0%, rgba(8,10,13,0.65) 60%, var(--bg) 100%);
  z-index: 0;
}
.page-hero-lines {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06;
  background-image:
    linear-gradient(rgba(184,146,42,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,146,42,0.6) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(135deg, transparent 0%, black 40%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(135deg, transparent 0%, black 40%, black 60%, transparent 100%);
}
.page-hero-ghost {
  position: absolute; right: -1vw; bottom: -2vh;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(9rem, 20vw, 18rem);
  letter-spacing: -2px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(184,146,42,0.06);
  user-select: none; pointer-events: none; z-index: 1; white-space: nowrap;
}
.page-hero-bar {
  position: absolute; top: 0; left: 5vw;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0.4; z-index: 2;
}
.page-hero-content {
  position: relative; z-index: 3;
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: 130px var(--gutter) 52px calc(var(--gutter) + 28px);
}
.page-hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.68rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 14px;
}
.page-hero-tag::before { content: ''; width: 24px; height: 1.5px; background: var(--gold); display: block; }
.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  letter-spacing: 2px; line-height: 0.9; color: var(--white); margin-bottom: 18px;
}
.page-title .accent { color: var(--gold); }
.divider { width: 44px; height: 3px; background: var(--gold); border-radius: 2px; }

/* ─── MAIN CONTENT ─────────────────────────────────── */
.history-outer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px var(--gutter) 100px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) {
  .history-outer { grid-template-columns: 1fr; gap: 48px; }
  .history-nav { display: none; }
}

/* ─── STICKY SIDEBAR NAV ───────────────────────────── */
.history-nav {
  position: sticky;
  top: 90px;
}
.history-nav-title {
  font-size: 0.68rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(184,146,42,0.2);
}
.history-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.history-nav ul li a {
  display: block; padding: 8px 14px;
  font-size: 0.85rem; color: var(--muted);
  border-left: 2px solid transparent;
  transition: var(--transition); border-radius: 0 4px 4px 0;
}
.history-nav ul li a:hover,
.history-nav ul li a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(184,146,42,0.05);
}

/* ─── HISTORY CONTENT ──────────────────────────────── */
.history-content { display: flex; flex-direction: column; gap: 72px; }

.history-era {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}

.era-header { display: flex; flex-direction: column; gap: 10px; }

.era-period {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 2px; line-height: 1; color: var(--white);
}
.era-period .accent { color: var(--gold); }

.era-subtitle {
  font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}

.era-divider {
  display: flex; align-items: center; gap: 16px;
}
.era-divider-line { flex: 1; height: 1px; background: rgba(184,146,42,0.2); }
.era-divider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  box-shadow: 0 0 8px rgba(184,146,42,0.5);
}

.era-body { display: flex; flex-direction: column; gap: 16px; }
.era-body p {
  font-size: 1rem; color: rgba(237,233,223,0.72); line-height: 1.85;
}
.era-body strong { color: var(--white); font-weight: 600; }

/* Notable achievements card */
.era-achievements {
  background: var(--bg2);
  border: 1px solid rgba(184,146,42,0.15);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px;
  margin-top: 8px;
}
.era-achievements h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; letter-spacing: 2px;
  color: var(--gold); margin-bottom: 18px;
}
.era-achievements ul {
  list-style: none; display: flex; flex-direction: column; gap: 0;
}
.era-achievements ul li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px 24px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.era-achievements ul li:last-child { border-bottom: none; }
.era-achievements ul li::before { display: none; }

.achievement-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.achievement-desc {
  font-size: 0.88rem;
  color: rgba(237,233,223,0.65);
  line-height: 1.5;
}

/* Last item — full width highlight */
.achievement-highlight {
  grid-template-columns: 1fr !important;
  background: rgba(184,146,42,0.06);
  margin: 8px -26px -22px;
  padding: 14px 26px !important;
  border-radius: 0 0 8px 8px;
  border-bottom: none !important;
}
.achievement-highlight .achievement-desc {
  color: rgba(237,233,223,0.75);
  font-style: italic;
}

@media (max-width: 580px) {
  .era-achievements ul li { grid-template-columns: 1fr; gap: 4px; }
  .achievement-name { white-space: normal; }
}

/* Quote / highlight block */
.era-quote {
  background: linear-gradient(135deg, rgba(184,146,42,0.07), rgba(184,146,42,0.02));
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 8px;
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: rgba(237,233,223,0.85);
  line-height: 1.65;
  font-style: italic;
  border: 1px solid rgba(184,146,42,0.12);
}

/* ─── TODAY BANNER ─────────────────────────────────── */
.today-banner {
  background: linear-gradient(135deg, rgba(184,146,42,0.1), rgba(184,146,42,0.03));
  border: 1px solid rgba(184,146,42,0.2);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}
.today-banner h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 2px; color: var(--white); margin-bottom: 16px;
}
.today-banner h3 span { color: var(--gold); }
.today-banner p {
  font-size: 1rem; color: rgba(237,233,223,0.7); line-height: 1.8;
  max-width: 600px; margin: 0 auto 28px;
}
.today-banner .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
  border-radius: 5px; cursor: pointer; transition: var(--transition);
  background: var(--gold); color: var(--bg); border: none;
}
.today-banner .btn:hover { background: var(--gold2); transform: translateY(-2px); }

/* ─── FOOTER ───────────────────────────────────────── */
footer { background: var(--bg2); border-top: 1px solid rgba(255,255,255,0.06); padding: 36px var(--gutter) 24px; }
.footer-bottom {
  max-width: var(--container); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-bottom a { color: var(--gold); }

/* ─── GRAIN ────────────────────────────────────────── */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 128px 128px;
}
