
:root{
  --bg-deep:#081125;
  --bg-deeper:#020611;
  --bg-panel:#0d1833;
  --bg-panel-soft:#122043;

  --accent-blue:#2e5bff;
  --accent-blue-deep:#1738b8;
  --accent-red:#d9485f;
  --accent-red-deep:#9c2338;
  --accent-gold:#d8b075;

  --text-main:#f5f7fb;
  --text-soft:rgba(245,247,251,0.86);
  --text-mute:rgba(245,247,251,0.62);

  --line-subtle:rgba(245,247,251,0.10);
  --line-strong:rgba(216,176,117,0.25);
  --shadow-strong:0 28px 80px rgba(0,0,0,0.50);
  --shadow-soft:0 16px 42px rgba(0,0,0,0.28);
  --radius-lg:24px;
  --radius-md:16px;
  --radius-sm:12px;
  --measure:72ch;
  --font-sans:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-serif:ui-serif,Georgia,"Times New Roman",serif;
}

body[data-theme="light"]{
  --bg-deep:#eff3ff;
  --bg-deeper:#ffffff;
  --bg-panel:#ffffff;
  --bg-panel-soft:#f5f7ff;
  --text-main:#121b33;
  --text-soft:rgba(18,27,51,0.84);
  --text-mute:rgba(18,27,51,0.62);
  --line-subtle:rgba(18,27,51,0.10);
  --line-strong:rgba(46,91,255,0.18);
  --shadow-strong:0 24px 72px rgba(6,17,37,0.16);
  --shadow-soft:0 12px 30px rgba(6,17,37,0.10);
}

*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--text-main);
  line-height:1.65;
  background:
    radial-gradient(1100px 700px at 10% 10%, rgba(46,91,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 85% 12%, rgba(217,72,95,0.12), transparent 58%),
    linear-gradient(180deg, var(--bg-deeper), var(--bg-deep));
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(900px 540px at var(--mx,50%) var(--my,20%), rgba(46,91,255,0.08), transparent 62%),
    radial-gradient(700px 440px at 55% 78%, rgba(216,176,117,0.06), transparent 60%);
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,textarea{font:inherit}

.wrap{
  width:min(1180px, calc(100% - 32px));
  margin-inline:auto;
}

main{padding:32px 0 72px}

header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(2,6,17,0.75);
  border-bottom:1px solid var(--line-subtle);
  backdrop-filter:blur(16px);
}
body[data-theme="light"] header{background:rgba(255,255,255,0.78)}

/* =========================
   HEADER LAYOUT (GRID)
   ========================= */
.nav{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
  min-height:84px;
}

.nav-left{justify-self:start}
.nav-center{justify-self:center}
.nav-right{justify-self:end}

.brand{
  display:flex;
  align-items:center;
  justify-content:center; /* logo + text centered within the brand block */
  gap:14px;
  min-width:0;
}

.brand-logo{
  width:125px;
  height:125px;
  position:relative;
  padding:auto;
}

.brand-text{display:grid;gap:2px}
.brand-text strong{font-size:.78rem;letter-spacing:.16em;text-transform:uppercase;color:var(--text-mute)}
.brand-text span{font-size:1rem;font-weight:700;line-height:1.2}

/* =========================
   NAV LINKS (DE-BUNCH)
   ========================= */
.nav-links{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;

  /* Key de-bunch improvements */
  gap:10px;       /* slightly more horizontal breathing room */
  row-gap:10px;   /* IMPORTANT: spacing between wrapped rows */
}

.nav-links a{
  padding:8px 10px;   /* was 8px 14px — tighter prevents wrap-bunching */
  border-radius:999px;
  font-size:.92rem;
  color:var(--text-soft);
  border:1px solid transparent;
  transition:all .2s ease;
  white-space:nowrap; /* keeps each item as a neat pill */
}

.nav-links a:hover,
.nav-links a.is-active{
  color:var(--text-main);
  border-color:var(--line-subtle);
  background:rgba(255,255,255,0.05);
}
body[data-theme="light"] .nav-links a:hover,
body[data-theme="light"] .nav-links a.is-active{background:rgba(18,27,51,0.04)}

.actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.progress{
  position:fixed;
  top:0;
  left:0;
  width:0;
  height:3px;
  z-index:80;
  background:linear-gradient(90deg, var(--accent-blue), var(--accent-gold), var(--accent-red));
  box-shadow:0 0 18px rgba(216,176,117,0.45);
}

.section{margin-top:28px}

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px, .95fr);
  gap:24px;
  align-items:stretch;
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:999px;
  color:var(--text-soft);
  background:rgba(255,255,255,0.04);
  border:1px solid var(--line-subtle);
}
.kicker-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(180deg, var(--accent-gold), var(--accent-red));
}

.hero-copy,
.panel,
.card,
.banner,
.table-wrap,
.timeline-item{
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border:1px solid var(--line-subtle);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
}
body[data-theme="light"] .hero-copy,
body[data-theme="light"] .panel,
body[data-theme="light"] .card,
body[data-theme="light"] .banner,
body[data-theme="light"] .table-wrap,
body[data-theme="light"] .timeline-item{background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,250,255,.90))}

.hero-copy,
.panel,
.banner{padding:28px}
.card{padding:22px}
.table-wrap{padding:12px;overflow:auto}
.timeline-item{padding:18px 20px}

.hero h1,
.page-title h1{
  font-family:var(--font-serif);
  font-size:clamp(2.4rem, 5vw, 4.6rem);
  line-height:1.04;
  letter-spacing:-0.03em;
  margin:18px 0 16px;
}
.page-title h1{font-size:clamp(2rem, 4vw, 3.3rem);margin:12px 0}

.lead,
.hero-sub{
  max-width:var(--measure);
  color:var(--text-soft);
  font-size:1.08rem;
}

.grid-3,
.grid-2{
  display:grid;
  gap:18px;
}
.grid-3{grid-template-columns:repeat(3, minmax(0, 1fr))}
.grid-2{grid-template-columns:repeat(2, minmax(0, 1fr))}

.list-clean{margin:0;padding-left:18px}
.list-clean li + li{margin-top:10px}

.hr{
  height:1px;
  background:linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin:24px 0;
  border:0;
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:680px;
}
.table th,
.table td{
  padding:14px 12px;
  text-align:left;
  border-bottom:1px solid var(--line-subtle);
  vertical-align:top;
}
.table th{
  font-size:.85rem;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:var(--text-mute);
}

.footer{
  padding:32px 0 48px;
  color:var(--text-mute);
}

.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .55s ease, transform .55s ease;
}
.reveal.is-in{opacity:1;transform:none}

.backtop{
  position:fixed;
  right:18px;
  bottom:18px;
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:all .2s ease;
  z-index:50;
}
.backtop.is-on{opacity:1;transform:none;pointer-events:auto}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1080px){
  .nav{
    grid-template-columns:1fr; /* stack left/center/right */
    padding:14px 0;
  }

  .nav-left,
  .nav-center,
  .nav-right{
    justify-self:start;
  }

  .hero{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr 1fr}
}

@media (max-width: 760px){
  .wrap{width:min(100% - 20px, 1180px)}
  main{padding-top:20px}
  .hero-copy,.panel,.banner{padding:22px}
  .card{padding:18px}
  .grid-3,.grid-2{grid-template-columns:1fr}

  .nav-links{
    justify-content:flex-start; /* your original intent */
    row-gap:10px;              /* keep wrapped rows readable */
  }

  .actions{width:100%;justify-content:flex-start}
  .brand-text span{font-size:.94rem}
}
