:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --bg-deep: #07111f;
  --ink: #0b1220;
  --muted: #5b6475;
  --line: #e2e8f2;
  --blue: #0d3b66;
  --cyan: #1e88e5;
  --cyan-light: #4fc3f7;
  --gold: #c9a227;
  --green: #2e7d52;
  --purple: #7c4dff;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(11, 18, 32, .1);
  --shadow-soft: 0 12px 40px rgba(11, 18, 32, .06);
  --glass: rgba(255, 255, 255, .72);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: auto; }

.skip-link {
  position: absolute; left: 18px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: #fff;
  box-shadow: var(--shadow-soft); transition: top .2s;
}
.skip-link:focus { top: 14px; }

/* Topbar */
.topbar {
  background: linear-gradient(90deg, var(--bg-deep), #0f2847);
  color: rgba(255,255,255,.88);
  font-size: 12px;
  letter-spacing: .02em;
}
.topbar-inner {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; align-items: center;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.nav-inner {
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff; font-size: 13px; font-weight: 900;
  box-shadow: 0 10px 28px rgba(13,59,102,.28);
}
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.links { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 650; }
.links a:not(.cta):hover { color: var(--cyan); }
.cta {
  padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: #fff;
  box-shadow: 0 8px 24px rgba(11,18,32,.15);
}

/* Language */
.language-selector { position: relative; }
.language-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; padding: 10px 14px; font-weight: 700;
}
.language-toggle::after {
  content: ""; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.language-selector.is-open .language-toggle::after { transform: translateY(2px) rotate(225deg); }
.language-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(480px, 90vw); max-height: 400px; overflow: auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
  margin: 0; padding: 8px; list-style: none;
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff; box-shadow: var(--shadow);
}
.language-menu[hidden] { display: none; }
.language-option {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 10px; background: transparent;
  padding: 9px 12px; text-align: left;
}
.language-option:hover, .language-option:focus-visible { background: var(--bg-soft); outline: none; }
.language-option[aria-checked="true"] { background: #eaf4ff; color: var(--blue); font-weight: 800; }
.language-option[aria-checked="true"]::after { content: "✓"; color: var(--green); }

/* Hero */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-viz { width: 100%; height: 100%; }
.hn-label { fill: rgba(255,255,255,.5); font-size: 11px; text-anchor: middle; font-family: var(--font); }
.hn { fill: rgba(255,255,255,.7); }
.hn-core { fill: var(--cyan-light); filter: drop-shadow(0 0 12px rgba(79,195,247,.6)); }
.hl { stroke: rgba(255,255,255,.15); stroke-width: 1; }
.hl-1,.hl-2,.hl-3 { animation: pulse-line 3s ease-in-out infinite; }
.hero-content {
  position: relative; z-index: 1;
  padding: 100px 0 80px;
  max-width: 820px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.9);
  padding: 8px 16px; font-size: 12px; font-weight: 700;
  backdrop-filter: blur(8px);
}
.hero h1 {
  margin: 24px 0; font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02; letter-spacing: -.04em; color: #fff;
  font-weight: 900;
}
.hero .lead {
  font-size: clamp(17px, 2.2vw, 21px);
  color: rgba(255,255,255,.78); max-width: 680px; line-height: 1.7;
}
.pillars {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0;
}
.pillars span {
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 14px 24px; border-radius: 999px;
  font-weight: 800; font-size: 14px; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.primary {
  border: 0; background: linear-gradient(135deg, var(--cyan), #1565c0);
  color: #fff; box-shadow: 0 16px 40px rgba(30,136,229,.3);
}
.secondary {
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff;
  backdrop-filter: blur(8px);
}

/* Sections */
.section { padding: 100px 0; }
.section.soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section.dark {
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0a1a30 100%);
  color: #fff;
}
.head { margin-bottom: 48px; }
.head.center { text-align: center; }
.head.center p { margin: 16px auto 0; max-width: 640px; color: var(--muted); }
.head.light p { color: rgba(255,255,255,.65); }
.head h2 {
  margin: 12px 0 0; font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05; letter-spacing: -.035em; font-weight: 900;
}
.section-tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cyan);
}
.section.dark .section-tag { color: var(--cyan-light); }

/* Identity */
.identity-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.identity-card {
  padding: 28px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft); transition: transform .3s, box-shadow .3s;
}
.identity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.identity-letter {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, #eaf4ff, #f0f4fa);
  font-size: 22px; font-weight: 900; color: var(--blue);
}
.identity-card h3 { margin: 0 0 8px; font-size: 18px; }
.identity-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* Civilization Map */
.map-container {
  border-radius: 28px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03); padding: 24px;
  backdrop-filter: blur(12px);
}
.civ-map { width: 100%; height: auto; display: block; }
.node-bg { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.2); stroke-width: 1; }
.node-bg.accent { fill: rgba(30,136,229,.15); stroke: rgba(79,195,247,.4); }
.node-text { fill: #fff; font-size: 13px; font-weight: 700; font-family: var(--font); }
.node-text-sm { fill: rgba(255,255,255,.9); font-size: 11px; font-weight: 600; font-family: var(--font); }
.node-text-xs { fill: rgba(255,255,255,.75); font-size: 10px; font-weight: 600; font-family: var(--font); }
.node-sub { fill: rgba(255,255,255,.82); font-size: 10px; font-weight: 600; font-family: var(--font); }
.node-sub-sm { fill: rgba(255,255,255,.55); font-size: 8.5px; font-weight: 500; font-family: var(--font); }
.civ-map { min-height: 520px; min-width: 900px; }
.map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Companies */
.companies-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.company-card {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft);
}
.company-card.highlight {
  border-color: rgba(30,136,229,.35);
  background: linear-gradient(135deg, #f8fbff, #fff);
}
.company-region {
  display: inline-block; margin-bottom: 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--cyan);
}
.company-card h3 {
  margin: 0 0 10px; font-size: 18px; line-height: 1.35;
  word-break: break-word;
}
.company-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.65; }

/* Projects */
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.project-card {
  padding: 24px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, border-color .25s;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(30,136,229,.3); }
.project-card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.2; }
.project-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.conn.intelligence { stroke: #4fc3f7; }
.conn.trust { stroke: #ffb74d; }
.conn.identity { stroke: #b39ddb; }
.conn.knowledge { stroke: #81c784; }
.conn.infrastructure { stroke: rgba(255,255,255,.3); }
.conn.connectivity { stroke: #4dd0e1; }
.conn.data { stroke: #90caf9; }
.conn.research { stroke: #ce93d8; }
.conn.energy { stroke: #ffcc80; }
.map-legend, .constellation-legend {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  margin-top: 20px; font-size: 12px; color: rgba(255,255,255,.7);
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.intelligence { background: #4fc3f7; }
.dot.trust { background: #ffb74d; }
.dot.identity { background: #b39ddb; }
.dot.knowledge { background: #81c784; }
.dot.data { background: #90caf9; }

/* Vision Engine */
.engine-pipeline {
  display: flex; flex-direction: column; align-items: center;
  max-width: 520px; margin: 0 auto;
}
.engine-stage {
  width: 100%; padding: 28px 32px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft); text-align: center;
  transition: border-color .4s, box-shadow .4s, transform .4s;
}
.engine-stage.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), var(--shadow);
  transform: scale(1.02);
}
.engine-icon { font-size: 28px; color: var(--cyan); margin-bottom: 8px; }
.engine-stage h3 { margin: 0 0 8px; font-size: 20px; }
.engine-stage p { margin: 0; font-size: 14px; color: var(--muted); }
.engine-arrow {
  font-size: 24px; color: var(--cyan); padding: 8px 0;
  animation: bounce-arrow 2s ease-in-out infinite;
}

/* Architecture */
.arch-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.arch-layer {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .3s, border-color .3s;
  min-height: 148px;
}
.arch-layer:hover { transform: translateY(-3px); border-color: rgba(30,136,229,.3); }
.arch-visual {
  width: 72px; height: 72px; flex: 0 0 72px;
  display: grid; place-items: center;
  border-radius: 16px; background: linear-gradient(135deg, #eaf4ff, #f5f8fc);
  color: var(--blue);
}
.arch-visual svg { width: 48px; height: 48px; }
.arch-body { flex: 1; min-width: 0; }
.arch-label {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 6px; line-height: 1.3;
}
.arch-body h3 {
  margin: 0 0 8px; font-size: 20px; line-height: 1.2;
  word-break: break-word;
}
.arch-body p {
  margin: 0; font-size: 14px; color: var(--muted);
  line-height: 1.65; word-break: break-word;
}

/* Programs */
.programs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.program-card {
  padding: 32px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
  transition: transform .3s, background .3s;
}
.program-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.07); }
.program-num {
  font-size: 13px; font-weight: 800; color: var(--cyan-light);
  letter-spacing: .1em; margin-bottom: 12px;
}
.program-card h3 { margin: 0 0 10px; font-size: 22px; }
.program-card p { margin: 0 0 16px; font-size: 14px; color: rgba(255,255,255,.65); line-height: 1.7; }
.program-status {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(46,125,82,.2); color: #81c784;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}

/* Impact */
.impact-viz {
  border-radius: 28px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafd, #fff);
  padding: 20px; overflow: hidden;
}
.impact-svg { width: 100%; height: auto; display: block; }
.impact-node { fill: #eaf4ff; stroke: var(--cyan); stroke-width: 2; }
.impact-core { fill: var(--blue); stroke: var(--cyan-light); stroke-width: 2; }
.impact-label { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font); }
.impact-core-label { fill: #fff; font-size: 14px; font-weight: 900; font-family: var(--font); }
.impact-ring { animation: ring-pulse 6s ease-in-out infinite; }
.ring-2 { animation-delay: 2s; }
.ring-3 { animation-delay: 4s; }

/* Constellation */
.constellation-container {
  position: relative; border-radius: 28px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.2); overflow: hidden;
  min-height: 480px;
}
#constellation-canvas { width: 100%; height: 480px; display: block; }

/* Hierarchy */
.hierarchy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hierarchy-card {
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft);
}
.hierarchy-card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--blue), #0a2540);
  color: #fff; border: 0;
}
.hierarchy-card.primary .hierarchy-role { color: var(--cyan-light); }
.hierarchy-card.primary p { color: rgba(255,255,255,.72); }
.hierarchy-role {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 8px;
}
.hierarchy-card h3 { margin: 0 0 8px; font-size: 22px; }
.hierarchy-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* Legacy */
.legacy {
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0d2848 100%);
  color: #fff; padding: 120px 0;
}
.legacy-content { max-width: 800px; margin: 0 auto; text-align: center; }
.legacy-quote {
  margin: 24px 0; font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px); font-weight: 400;
  line-height: 1.15; letter-spacing: -.02em;
  font-style: italic;
}
.legacy-text {
  font-size: 18px; color: rgba(255,255,255,.7);
  line-height: 1.8; margin-bottom: 48px;
}
.legacy-pillars {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: left;
}
.legacy-item {
  padding: 24px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
}
.legacy-item strong { display: block; margin-bottom: 6px; font-size: 16px; }
.legacy-item span { font-size: 14px; color: rgba(255,255,255,.65); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.contact-box {
  padding: 40px; border-radius: 28px;
  background: linear-gradient(135deg, var(--blue), var(--bg-deep));
  color: #fff; box-shadow: var(--shadow);
}
.contact-box p { color: rgba(255,255,255,.75); margin-bottom: 24px; }
.contact-box .primary { background: #fff; color: var(--ink); box-shadow: none; }
.info-card {
  padding: 20px; border-radius: 18px;
  border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-soft); margin-bottom: 12px;
}
.info-card b { display: block; margin-bottom: 4px; font-size: 13px; }
.info-card span { font-size: 14px; color: var(--muted); }

/* Footer */
.footer {
  background: var(--ink); color: #fff; padding: 40px 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.footer small { display: block; color: rgba(255,255,255,.55); margin-top: 4px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* Animations */
@keyframes pulse-line {
  0%, 100% { stroke-opacity: .15; }
  50% { stroke-opacity: .5; }
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(4px); opacity: 1; }
}
@keyframes ring-pulse {
  0%, 100% { opacity: .2; }
  50% { opacity: .5; }
}

/* RTL */
[dir="rtl"] .language-menu { right: auto; left: 0; }
[dir="rtl"] .head.center { text-align: center; }

/* Responsive */
@media (max-width: 1024px) {
  .links { display: none; }
  .identity-grid { grid-template-columns: repeat(3, 1fr); }
  .arch-grid, .programs-grid, .projects-grid { grid-template-columns: 1fr 1fr; }
  .companies-grid { grid-template-columns: 1fr; }
  .hierarchy-grid { grid-template-columns: 1fr 1fr; }
  .hierarchy-card.primary { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .companies-grid, .projects-grid { grid-template-columns: 1fr; }
  .identity-grid { grid-template-columns: 1fr 1fr; }
  .legacy-pillars { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hierarchy-grid { grid-template-columns: 1fr; }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .language-menu { grid-template-columns: 1fr; position: fixed; inset: 80px 16px auto; width: auto; }
}
@media (max-width: 480px) {
  .identity-grid { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 32px); }
}
