/* ====== RESET & BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0a1628;
  --navy-light: #132340;
  --olive: #4a5d23;
  --olive-light: #6b8c2e;
  --khaki: #b5a77d;
  --khaki-light: #d4c9a8;
  --sand: #e8dcc8;
  --cream: #f5f0e6;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-light: #6b7280;
  --orange-accent: #c75b22;
  --gold: #c9a84c;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  font-style: italic;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-dark h2 { color: var(--cream); }

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  color: var(--navy);
}

.section-dark h3,
.section-dark .era-block h3 { color: var(--khaki-light); }

p { margin-bottom: 1rem; color: var(--text); }
.section-dark p,
.section-dark .lead { color: var(--sand); }

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-light);
  max-width: 800px;
  margin-bottom: 2.5rem;
}

/* ====== NAVIGATION ====== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
  padding: 16px 0;
}

#navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.logo-icon { font-size: 1.4rem; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}

/* ====== HERO ====== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(74, 93, 35, 0.4), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.15), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(10, 22, 40, 0.8), transparent 60%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  max-width: 800px;
}

.hero-label {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--khaki);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--orange-accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #d46a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(199, 91, 34, 0.35);
}

/* ====== SECTIONS ====== */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--navy);
}

.section-dark .lead {
  color: var(--khaki);
}

/* ====== INTRO BLOCK ====== */
.intro-block {
  margin-bottom: 3rem;
}

.intro-block .lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text);
}

/* ====== CARD GRID ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
}

.section-dark .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

.section-dark .card p { color: var(--sand); }
.section-dark .card h3 { color: var(--khaki-light); }

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--orange-accent) !important;
  margin-top: 0.5rem;
}

/* ====== SPLIT LAYOUT ====== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 2rem 0;
}

.split-text ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.split-text ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text);
}

.section-dark .split-text ul li { color: var(--sand); }

.split-text ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--orange-accent);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ====== ERA BLOCK ====== */
.era-block {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.section-dark .era-block {
  border-bottom-color: rgba(255,255,255,0.08);
}

.era-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.highlight {
  background: rgba(199, 91, 34, 0.08);
  border-left: 4px solid var(--orange-accent);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
}

.section-dark .highlight {
  background: rgba(201, 168, 76, 0.08);
  border-left-color: var(--gold);
}

.highlight p { margin-bottom: 0; }

/* ====== TIMELINE ====== */
.timeline {
  position: relative;
  padding-left: 40px;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--olive-light), var(--khaki));
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange-accent);
  border: 3px solid var(--cream);
  z-index: 1;
}

.tl-year {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--orange-accent);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.tl-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.tl-content p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ====== EVOLUTION CHAIN ====== */
.evolution-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 3rem 0;
  padding: 32px;
  background: var(--navy);
  border-radius: 12px;
}

.chain-item {
  background: rgba(255,255,255,0.08);
  color: var(--sand);
  padding: 14px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  min-width: 100px;
}

.chain-item small {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--khaki);
  display: block;
  margin-top: 4px;
}

.chain-item.highlight-chain {
  background: var(--orange-accent);
  color: var(--white);
}

.chain-arrow {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 300;
}

/* ====== LEGACY ====== */
.legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 2rem 0;
}

.legacy-item {
  background: rgba(255,255,255,0.05);
  padding: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.legacy-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--khaki-light);
}

.legacy-item p {
  color: var(--sand);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.legacy-quote {
  text-align: center;
  margin: 4rem 0 0;
  padding: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.legacy-quote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.legacy-quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--khaki);
  letter-spacing: 1px;
}

/* ====== FOOTER ====== */
footer {
  background: var(--navy-light);
  padding: 48px 0 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.footer-brand p {
  color: var(--khaki);
  font-size: 0.85rem;
  margin: 0 0 0 8px;
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: 0.4s ease;
    box-shadow: -4px 0 30px rgba(0,0,0,0.3);
  }

  .nav-links.open { right: 0; }

  .nav-toggle { display: flex; }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .split-layout { grid-template-columns: 1fr; gap: 32px; }
  .legacy-grid { grid-template-columns: 1fr; }
  .evolution-chain { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); }

  .section { padding: 60px 0; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h2 { font-size: 1.75rem; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-desc { font-size: 1rem; }
  .btn-primary { padding: 12px 28px; }
}

/* ====== HERO BACKGROUND LOGO ====== */
.hero-bg-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-logo img {
  width: 60%;
  max-width: 500px;
  height: auto;
}

/* ====== SECTION IMAGES ====== */
.section-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: block;
}

.split-img {
  display: flex;
  align-items: center;
}

.section-dark .split-img .section-img {
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .hero-bg-logo img {
    width: 80%;
    max-width: 300px;
  }
}
