/* Layout: left-aligned editorial rows. A narrow mono label column sits beside wide content, stacking on phones.
   Dark bands (.dark) carry the hero and page heads; light rows carry the detail. */
:root {
  --bg: #F5F4F0;
  --surface: #ECEAE4;
  --fg: #171A1C;
  --muted: #5C6264;
  --line: #DAD7CE;
  --accent: #D8161E;
  --accent-hot: #FF3B45;
  --accent-fg: #FFFFFF;
  --ink: #0B0C0E;
  color-scheme: light;
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 120rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 4rem); }

/* Dark band: re-points the tokens so everything inside reads light-on-ink */
.dark {
  --fg: #F2F1EC;
  --muted: #9CA1A4;
  --surface: #15171A;
  --line: #24272A;
  background: var(--ink);
  color: var(--fg);
  color-scheme: dark;
}
.dark :focus-visible { outline-color: var(--accent-hot); }

/* Header */
header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; height: 2.6rem; width: auto; max-width: 100%; }
nav { display: flex; gap: 1.5rem; }
nav a { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--fg); }
nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.top nav { margin-left: auto; }
.top .connect { padding: 0.5rem 1rem; font-size: 0.875rem; white-space: nowrap; }
@media (max-width: 40rem) { nav { display: none; } }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 1.5rem; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent-hot); }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
.hero h1 em { display: block; }
.lede { font-size: 1.125rem; color: var(--muted); margin: 0 0 2rem; }
.lede b { color: var(--fg); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block; padding: 0.75rem 1.25rem; font-size: 0.95rem; font-weight: 500;
  text-decoration: none; border: 1px solid var(--fg); border-radius: 2px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost:hover { background: var(--surface); }
.surfaces { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 2.25rem 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.surfaces li::before { content: "/"; color: var(--accent-hot); margin-right: 0.45rem; }
.hero-ball { width: 100%; max-width: 38rem; aspect-ratio: 1; justify-self: center; }
@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > div:first-child { padding-left: 0; }
  .hero-ball { max-width: 22rem; justify-self: center; }
}

/* Figures strip under the hero */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(2rem, 5vw, 3.5rem) 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 1.4rem 1.25rem 1.8rem; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.stats dd { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 44rem) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Page heads (non-home pages) */
.page-head { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); }
.page-head .intro { margin-bottom: 0; font-size: 1.1rem; }

/* Sections */
section.block { padding-block: clamp(2.5rem, 6vw, 4.5rem); scroll-margin-top: 4rem; }
section.block + section.block { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr); }
h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1rem; text-wrap: balance; }
.intro { color: var(--muted); margin: 0 0 2.5rem; }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
@media (max-width: 44rem) { .two { grid-template-columns: minmax(0, 1fr); } }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.list li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem; padding: 0.9rem 1.1rem; background: var(--surface); border-radius: 4px; }
.list b { font-weight: 600; }
.list span { color: var(--muted); font-size: 0.93rem; }
.list.cols li { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.list.cols b { font-family: var(--font-mono); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 30rem) { .list.cols li { grid-template-columns: minmax(0, 1fr); } }

.tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.list a.tag { display: inline-block; margin-top: 0.6rem; }

/* The group: parent + subsidiaries */
.group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.entity { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.5rem 1.4rem 1.6rem; background: var(--surface); border-radius: 4px; border-top: 3px solid var(--accent); min-width: 0; }
.entity.parent { border-top-color: var(--fg); }
.entity .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.entity h3 { font-size: 1.4rem; margin: 0; }
.entity p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.entity .tag { margin-top: auto; padding-top: 0.75rem; }
@media (max-width: 56rem) { .group { grid-template-columns: minmax(0, 1fr); } }

/* Build / Break / Teach */
.triad { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.triad li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 2rem; align-items: baseline; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.triad .word { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6.5vw, 4.6rem); line-height: 0.95; letter-spacing: -0.035em; }
.triad li:nth-child(2) .word { color: var(--accent); }
.triad p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.triad p b { color: var(--fg); font-weight: 600; }
@media (max-width: 44rem) { .triad li { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; } }

/* Things we refuse to do */
.refuse li { grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.75rem; }
.refuse li::before { content: "\00D7"; grid-row: span 2; font-family: var(--font-mono); font-size: 1.1rem; line-height: 1.4; color: var(--accent); }

/* Numbered steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
.step-num { font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem; color: var(--accent); }
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Training / research tiles */
.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.track { padding: 1.25rem 1.25rem 1.5rem; background: var(--surface); border-radius: 4px; min-width: 0; }
.track h3 { margin-bottom: 0.4rem; }
.track p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.track .num { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); margin-bottom: 1.5rem; }
@media (max-width: 56rem) { .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .tracks { grid-template-columns: minmax(0, 1fr); } }
.audience { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.chip { font-size: 0.85rem; padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); }

/* Icon cards: one component for services, products, programs and pillars, so every grid aligns the same way */
.icon { width: 1.4rem; height: 1.4rem; display: block; }
.ico { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 6px; background: rgba(216, 22, 30, 0.08); color: var(--accent); flex: none; }
.dark .ico { background: rgba(255, 59, 69, 0.12); color: var(--accent-hot); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.cards.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.5rem 1.4rem 1.6rem; background: var(--surface); border-radius: 4px; min-width: 0; }
.card .ico { margin-bottom: 0.4rem; }
.card .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card .tag { margin-top: auto; padding-top: 0.75rem; }
.bullets { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.93rem; }
.bullets li { display: grid; grid-template-columns: 0.9rem minmax(0, 1fr); gap: 0.4rem; }
.bullets li::before { content: "/"; font-family: var(--font-mono); color: var(--accent); }
.card .bullets { color: var(--muted); }
@media (max-width: 56rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .cards, .cards.pair { grid-template-columns: minmax(0, 1fr); } }
.lang { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lang span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; border: 1px solid var(--line); border-radius: 100px; color: var(--fg); }

/* Company logos: square marks (.by) beside a name, and full logos on the group cards */
.by { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.by img { width: 1.5rem; height: 1.5rem; border-radius: 5px; display: block; flex: none; object-fit: contain; }
.entity .logo { display: block; width: 2.75rem; height: 2.75rem; object-fit: contain; border-radius: 8px; margin-bottom: 0.4rem; }
.brands { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 1.5rem 0 0; padding: 1.25rem 0 0; list-style: none; border-top: 1px solid var(--line); }
.brands li { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brands img { display: block; height: 2.25rem; width: auto; border-radius: 6px; }
.brands .note { font-family: var(--font-mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dark img.tile, footer img.tile { box-shadow: 0 0 0 1px #2A2D30; }
footer .with-logo { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: 0.65rem; align-items: center; }
footer .with-logo img { grid-row: span 2; width: 1.6rem; height: 1.6rem; border-radius: 5px; object-fit: contain; }

/* Statement */
.statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.18; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.statement em { font-style: normal; color: var(--accent); }
.dark .statement em { color: var(--accent-hot); }

footer { background: var(--ink); color: #9CA1A4; padding-block: clamp(2.5rem, 6vw, 3.5rem) 1.75rem; }
footer a { text-decoration: none; }
footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid #222527; margin-bottom: 1.5rem; }
.footer-brand .brand { display: inline-block; background: #fff; padding: 0.5rem 0.8rem; border-radius: 6px; line-height: 0; }
.footer-brand .brand img { height: 2.2rem; }
.footer-brand p { margin: 1rem 0 0; max-width: 22rem; font-size: 0.9rem; line-height: 1.6; }
.footer-grid h4 { font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #6E7275; margin: 0 0 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; font-size: 0.92rem; }
.footer-grid ul a { color: #C8CBCD; }
.footer-grid ul small { display: block; color: #6E7275; font-size: 0.78rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; font-size: 0.85rem; color: #6E7275; }
.footer-bottom b { color: #C8CBCD; font-weight: 600; }
@media (max-width: 56rem) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; } }

/* GlowCursor (glow-cursor.js): WebGL light trail behind a section's content */
.glow-cursor { position: relative; overflow: hidden; }
.glow-cursor__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.glow-cursor > :not(.glow-cursor__canvas) { position: relative; z-index: 1; }

/* CrystalizedBall (crystalized-ball.js) */
.crystalized-ball { position: relative; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Links out to the subsidiaries (navdyut.com, reconix.in) */
a.by, .brands a, .entity h3 a, .lede a { text-decoration: none; }
a.by:hover, .brands a:hover { color: var(--fg); }
.brands a { display: flex; align-items: center; gap: 0.6rem; }
.entity h3 a:hover, .lede a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Bento: in .cards grids some cards span two columns (.span-2) or two rows (.rows-2); .dark cards are the features */
.cards.pair { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.cards.pair.flip { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.card.span-2 { grid-column: span 2; }
.card.rows-2 { grid-row: span 2; }
.card.span-2, .card.rows-2, .cards.pair .card { padding: clamp(1.5rem, 2.5vw, 2.25rem); }
.card.span-2 h3, .card.rows-2 h3, .cards.pair .card h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: -0.02em; }
.card.span-2 > p, .card.rows-2 > p { font-size: 1rem; }
.card.span-2 .bullets { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.card.rows-2 .ico { width: 3.5rem; height: 3.5rem; }
.card.rows-2 .ico .icon { width: 1.8rem; height: 1.8rem; }
.card.dark { background: #15171A; }
.card.dark .tag { color: var(--accent-hot); }
.card.dark .bullets li::before { color: var(--accent-hot); }
@media (max-width: 56rem) {
  .card.rows-2 { grid-row: auto; }
}
@media (max-width: 36rem) {
  .card.span-2 { grid-column: auto; }
  .card.span-2 .bullets { grid-template-columns: minmax(0, 1fr); }
  .cards.pair, .cards.pair.flip { grid-template-columns: minmax(0, 1fr); }
}

/* Outcome / surface tiles that fill the lower part of a large card */
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-top: auto; padding-top: 1.25rem; list-style: none; padding-left: 0; margin-bottom: 0; }
.mini { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
.mini b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.25rem; }
.dark .mini b { color: var(--accent-hot); }
.mini span { display: block; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 36rem) { .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card.span-2.rows-2 h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.card.span-2.rows-2 > p { font-size: 1.05rem; }
.card.span-2.rows-2 .mini { padding: 1.1rem 1.15rem; }
.card .push { margin-top: auto; }
.minis.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.minis.compact .mini { padding: 0.7rem 0.9rem; }
.minis.compact .mini b { margin: 0; }

/* Current work: status pills and large step numbers */
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 100px; color: var(--fg); white-space: nowrap; }
.status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #2BB673; }
.status.build::before { background: #F5A524; }
.big-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 4.5vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; color: var(--accent); margin-bottom: 1.25rem; }
.card:has(.big-num) { padding: clamp(1.5rem, 2.5vw, 2.25rem); }
.card:has(.big-num) h3 { font-size: 1.3rem; }
.entity .logo { align-self: flex-start; }
