/* ═══════════════════════════════════════════════
   Aegis Pantheon — Public Site
   Redesign: Clean · Premium · Institutional
   ═══════════════════════════════════════════════ */

/* ─── Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* ─── Variables ─── */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-alt: #f5f1ea;
  --ink: #1a1714;
  --muted: #7c756a;
  --muted-light: #a59e92;
  --gold: #8b7340;
  --gold-soft: rgba(139, 115, 64, 0.08);
  --gold-line: rgba(139, 115, 64, 0.2);
  --navy: #0f1a2e;
  --navy-soft: rgba(15, 26, 46, 0.03);
  --border: #e8e2d8;
  --border-light: #f0ece4;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --read-w: 720px;
  --nav-h: 72px;
  --radius: 0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.04);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

/* ─── Typography ─── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.25; }
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
p { color: var(--muted); margin-bottom: 1em; }
a { color: var(--gold); text-decoration: none; transition: opacity .25s; }
a:hover { opacity: .7; }
.small { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-light); }

/* ─── Container ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 48px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }
@media (max-width: 480px) { .container { padding: 0 20px; } }

/* ─── Nav ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
}
nav .logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--navy);
}
nav .logo span { color: var(--gold); }
nav .nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
nav .nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  position: relative;
  transition: color .25s;
}
nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s ease;
}
nav .nav-links a:hover, nav .nav-links a.active { color: var(--ink); }
nav .nav-links a:hover::after, nav .nav-links a.active::after { transform: scaleX(1); }
nav .nav-cta {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .25s, color .25s;
}
nav .nav-cta:hover { background: var(--gold); color: #fff !important; }
nav .nav-cta::after { display: none !important; }
.mobile-toggle { display: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); background: none; border: none; padding: 8px; }

@media (max-width: 768px) {
  nav { padding: 0 24px; }
  nav .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 16px 24px;
    display: none; box-shadow: var(--shadow-md);
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--border-light); width: 100%; }
  nav .nav-links a::after { display: none; }
  nav .nav-links li:last-child a { border-bottom: none; }
  nav .nav-cta { margin-top: 8px; text-align: center; }
  .mobile-toggle { display: block; }
}

/* ─── Hero ─── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) 0 0;
  position: relative;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
}
.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}
.hero h1 { max-width: 800px; margin-bottom: 1.5rem; }
.hero p {
  max-width: 540px;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all .3s;
  cursor: pointer;
}
.hero-btn.primary {
  background: var(--navy);
  color: #fff;
  border: none;
}
.hero-btn.primary:hover { background: #1a2a44; opacity: 1; }
.hero-btn.outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.hero-btn.outline:hover { border-color: var(--ink); opacity: 1; }

@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  .hero-inner { padding: 0 24px; }
}

/* ─── Section ─── */
.section {
  padding: 100px 0;
}
.section:not(:last-child) {
  border-bottom: none;
}
.section-header {
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.section-header h2 { max-width: 600px; margin-bottom: 1rem; }
.section-header p { max-width: 520px; font-size: 1rem; }

@media (max-width: 768px) { .section { padding: 72px 0; } }

/* ─── Divider ─── */
.divider { width: 32px; height: 1px; background: var(--gold); margin: 2rem 0; }

/* ─── Grids ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Cards ─── */
.card {
  padding: 0;
  background: transparent;
  border: none;
}
.card:hover {
  box-shadow: none;
}
.card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.card h3 { margin-bottom: 0.75rem; font-weight: 400; }
.card p { font-size: 0.9rem; }

/* ─── Contained card (for grid sections needing visible containers) ─── */
.contained-card {
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  transition: box-shadow .35s;
}
.contained-card:hover {
  box-shadow: var(--shadow-md);
}
.contained-card h3 { margin-bottom: 0.75rem; font-weight: 400; }
.contained-card p { font-size: 0.9rem; }
.card-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}
.card-num::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--gold);
  margin-top: 10px;
  margin-bottom: 20px;
}

/* ─── Service offering cards ─── */
.offering-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 48px 40px;
  position: relative;
  transition: box-shadow .35s;
}
.offering-card:hover {
  box-shadow: var(--shadow-md);
}
.offering-card::before {
  content: '';
  position: absolute;
  top: 0; left: 40px; right: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.offering-card h3 { margin-bottom: 0.75rem; }
.offering-card p { font-size: 0.9rem; }
.offering-card .tags {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--muted-light);
  letter-spacing: 0.03em;
}

/* ─── Stats / Numbers ─── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { text-align: center; padding: 32px 16px; }
.stat-num { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); line-height: 1.1; font-weight: 400; }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 6px; letter-spacing: 0.03em; }
@media (max-width: 768px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

/* ─── Team ─── */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.member-card { padding: 0; background: var(--surface); border: 1px solid var(--border-light); }
.member-avatar {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--muted-light);
}
.member-info { padding: 24px; }
.member-info h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; margin-bottom: 4px; }
.member-title { font-size: 0.78rem; color: var(--gold); letter-spacing: 0.04em; margin-bottom: 12px; }
.member-info p { font-size: 0.82rem; }

@media (max-width: 1024px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* ─── Research list ─── */
.research-list { list-style: none; }
.research-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.research-item:first-child { padding-top: 0; }
.research-item:last-child { border-bottom: none; padding-bottom: 0; }
.research-title { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 6px; }
.research-desc { font-size: 0.85rem; color: var(--muted); }
.research-meta { font-size: 0.75rem; color: var(--muted-light); white-space: nowrap; letter-spacing: 0.03em; }

/* ─── Contact ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-card {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border-light);
}
.contact-card h3 { margin-bottom: 1rem; font-weight: 400; }
.contact-card p { font-size: 0.9rem; }
.contact-email { display: inline-block; margin-top: 12px; font-size: 0.85rem; font-weight: 500; color: var(--gold); }
.contact-note { font-size: 0.8rem; color: var(--muted-light); margin-top: 24px; max-width: 480px; }

@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

/* ─── Timeline ─── */
.timeline { position: relative; padding-left: 0; }
.tl-item {
  position: relative;
  padding: 32px 0 32px 40px;
  border-left: 1px solid var(--gold-line);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 36px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.tl-year {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.tl-item h4 { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; margin-bottom: 8px; }
.tl-item p { font-size: 0.88rem; max-width: 600px; }

/* ─── Legal page ─── */
.legal-section { max-width: var(--read-w); }
.legal-section h3 { margin-top: 40px; margin-bottom: 12px; }
.legal-section p { font-size: 0.88rem; }

/* ─── Back link ─── */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 48px; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.back-link:hover { color: var(--ink); opacity: 1; }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border-light);
  padding: 64px 48px 48px;
  margin-top: 0;
}
footer .footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
footer .footer-brand { font-family: var(--serif); font-size: 1rem; letter-spacing: 0.06em; color: var(--navy); margin-bottom: 12px; }
footer .footer-brand span { color: var(--gold); }
footer .footer-desc { font-size: 0.82rem; color: var(--muted-light); max-width: 300px; line-height: 1.7; }
footer .footer-col h4 { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; font-weight: 500; font-family: var(--sans); }
footer .footer-col a { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
footer .footer-col a:hover { color: var(--ink); opacity: 1; }
footer .footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer .footer-bottom p { font-size: 0.75rem; color: var(--muted-light); margin: 0; }
footer .legal-note {
  max-width: var(--max-w);
  margin: 24px auto 0;
  font-size: 0.68rem;
  color: rgba(124, 117, 106, 0.5);
  line-height: 1.6;
}

@media (max-width: 768px) {
  footer { padding: 48px 24px 32px; }
  footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer .footer-col:first-child { grid-column: 1 / -1; }
  footer .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  footer .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Animations ─── */
.fade-up { opacity: 0; transform: translateY(16px); animation: fadeUp .6s ease forwards; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ─── Utilities ─── */
.text-center { text-align: center; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.wide { max-width: 100% !important; }
.bg-alt { background: var(--surface-alt); }
