/*
  Kailas — shared static stylesheet
  Dark graphite base, copper + blue-cyan accents, geometric/technical motifs.
  No build step: plain CSS, system font stacks (no remote font requests).
*/

:root {
  --radius: 4px;

  --bg: #10131a;
  --bg-raised: #151a23;
  --card: #161c26;
  --fg: #eef0ee;
  --muted: #a3a9ad;
  --border: rgba(238, 240, 238, 0.12);
  --line: rgba(238, 240, 238, 0.07);

  --primary: #7fd8e8;        /* blue-cyan accent */
  --primary-foreground: #0b1620;
  --copper: #c98a55;         /* copper accent */

  --font-display: "Sora", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans: "Manrope", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 300;
  margin: 0;
}

p {
  margin: 0;
}

ul, ol, dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout helpers ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  border-bottom: 1px solid var(--border);
  padding: 72px 0;
}

.section--card {
  background-color: var(--card);
}

.section--grid {
  position: relative;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(16, 19, 26, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.primary-nav {
  display: none;
}

.primary-nav ul {
  display: flex;
  gap: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--fg);
}

@media (min-width: 860px) {
  .primary-nav {
    display: block;
  }
}

.mobile-nav {
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

@media (min-width: 860px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav ul {
  display: flex;
  gap: 24px;
  padding: 12px 24px;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Language switch ---------- */

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  overflow: hidden;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch button[aria-pressed="true"] {
  background-color: var(--fg);
  color: var(--bg);
}

.lang-switch button:hover:not([aria-pressed="true"]) {
  color: var(--fg);
}

/* ---------- Typography utilities ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  color: var(--primary);
}

.eyebrow .num {
  color: var(--copper);
}

h1.display {
  font-size: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
  line-height: 1.04;
  font-weight: 300;
}

h2.display {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  line-height: 1.08;
  font-weight: 300;
}

.lede {
  color: var(--muted);
  line-height: 1.7;
  max-width: 42ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  opacity: 0.85;
}

.btn--ghost {
  border-color: var(--border);
  color: var(--fg);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(238, 240, 238, 0.4);
  background-color: var(--bg-raised);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding: 80px 0 0;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 7fr 5fr;
    align-items: start;
    padding-top: 112px;
  }
}

.hero__visual {
  display: none;
}

@media (min-width: 960px) {
  .hero__visual {
    display: block;
    aspect-ratio: 10 / 7;
  }
}

.hero__meta {
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.hero__meta ul {
  display: grid;
  gap: 0;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero__meta ul {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero__meta li {
    border-left: 1px solid var(--border);
    padding-left: 24px;
  }
  .hero__meta li:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.hero__meta li {
  padding: 20px 0;
}

/* ---------- Section head ---------- */

.section-head {
  display: grid;
  gap: 24px;
}

@media (min-width: 960px) {
  .section-head {
    grid-template-columns: 7fr 5fr;
    align-items: end;
  }
}

.section-head h2 {
  margin-top: 16px;
}

/* ---------- Capability / numbered grid ---------- */

.numbered-grid {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0;
}

@media (min-width: 860px) {
  .numbered-grid {
    grid-template-columns: repeat(var(--cols, 5), 1fr);
  }
  .numbered-grid > li {
    border-left: 1px solid var(--border);
    padding: 32px 24px 0;
  }
  .numbered-grid > li:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.numbered-grid > li {
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

@media (min-width: 860px) {
  .numbered-grid > li {
    border-bottom: none;
  }
}

.numbered-grid .idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
}

.numbered-grid h3 {
  margin-top: 20px;
  font-size: 1.1rem;
  font-weight: 400;
}

.numbered-grid p {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Project cards ---------- */

.project-grid {
  margin-top: 56px;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background-color: var(--bg);
  padding: 32px;
  transition: background-color 0.15s ease;
}

.project-card:hover {
  background-color: var(--bg-raised);
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
}

.status-pill .dot--rd {
  background-color: var(--copper);
}

.project-card__motif {
  margin: 28px 0;
  aspect-ratio: 32 / 21;
  width: 100%;
}

.project-card h3 {
  font-size: 1.7rem;
}

.project-card p.lede {
  margin-top: 12px;
}

.project-card--static {
  cursor: default;
}

.project-card--static:hover {
  background-color: var(--bg);
}

/* ---------- Definition grid (operating model) ---------- */

.def-grid {
  display: grid;
  gap: 1px;
  background-color: var(--border);
}

@media (min-width: 640px) {
  .def-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.def-grid > div {
  background-color: var(--bg);
  padding: 28px;
}

.def-grid dt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
}

.def-grid dd {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Partnerships list ---------- */

.partner-list {
  border-top: 1px solid var(--border);
}

.partner-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding: 18px 8px;
}

.partner-list .idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--copper);
}

.partner-list .label {
  font-size: 1.05rem;
}

/* ---------- About facts ---------- */

.fact-grid {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .fact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fact-grid dd {
  margin-top: 8px;
  font-size: 0.92rem;
}

/* ---------- Grid layout (generic two-column) ---------- */

.cols-12 {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .cols-12 {
    grid-template-columns: 5fr 7fr;
  }
  .cols-12--reverse {
    grid-template-columns: 7fr 5fr;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .site-footer__row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer__tag {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .site-footer__meta {
    align-items: flex-end;
    text-align: right;
  }
}

/* ---------- Project detail page specifics ---------- */

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--primary);
}

.stage-banner {
  margin-top: 32px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--copper);
  border-radius: var(--radius);
  padding: 20px 24px;
  background-color: var(--card);
}

.stage-banner .eyebrow {
  margin-bottom: 8px;
}

.axis-grid {
  --cols: 4;
}

.pipeline-figure {
  margin-top: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background-color: var(--card);
  overflow-x: auto;
}

.pipeline-figure figcaption {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.pipeline-svg text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--fg);
}

.pipeline-svg .pipeline-sub {
  fill: var(--muted);
  font-size: 9.5px;
}

.pipeline-svg .node-box {
  fill: var(--bg);
  stroke: var(--border);
}

.pipeline-svg .node-box--accent {
  stroke: var(--primary);
}

.pipeline-svg .flow-line {
  stroke: var(--copper);
  stroke-width: 1.5;
  fill: none;
}

.concept-grid {
  margin-top: 56px;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .concept-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.concept-card {
  background-color: var(--bg);
  padding: 28px;
}

.concept-card .status-pill {
  margin-bottom: 16px;
}

.concept-card h3 {
  font-size: 1.15rem;
  font-weight: 400;
}

.concept-card p {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.sibling-nav {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.sibling-nav a {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.88rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sibling-nav a:hover,
.sibling-nav a:focus-visible {
  border-color: rgba(238, 240, 238, 0.4);
  background-color: var(--bg-raised);
}

/* animation utilities (kept minimal, compositor-friendly) */
@keyframes pulse-soft {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.pulse-soft {
  animation: pulse-soft 3.5s ease-in-out infinite;
}

/* ---------- LixIA page: heap cross-section hero ---------- */

.lixia-hero {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .lixia-hero {
    grid-template-columns: 7fr 5fr;
    align-items: center;
  }
}

.heap-visual {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 16px;
}

.heap-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.heap-visual .heap-layer {
  fill: none;
  stroke: rgba(238, 240, 238, 0.18);
}

.heap-visual .heap-outline {
  fill: rgba(238, 240, 238, 0.03);
  stroke: rgba(238, 240, 238, 0.45);
}

.heap-visual .heap-inferred {
  fill: none;
  stroke: var(--copper);
  stroke-dasharray: 5 4;
}

.heap-visual .heap-drip {
  stroke: var(--primary);
  stroke-opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .heap-visual .pulse-soft {
    animation: none;
  }
}

/* ---------- Project grid / card grids: fill an odd last cell ---------- */

@media (min-width: 768px) {
  .project-grid > .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .concept-grid--fill > :last-child:nth-child(3n + 2) {
    grid-column: span 2;
  }
}

/* ---------- 5T page: field communications ---------- */

.t5-hero {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .t5-hero {
    grid-template-columns: 7fr 5fr;
    align-items: center;
  }
}

.net-visual {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 16px;
}

.net-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.net-visual figcaption {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.net-visual .net-ring {
  fill: none;
  stroke: var(--primary);
  stroke-opacity: 0.45;
  stroke-dasharray: 3 5;
}

.net-visual .net-spoke {
  stroke: rgba(238, 240, 238, 0.35);
  stroke-width: 1.5;
}

.net-visual .net-spoke--fallback {
  stroke: var(--copper);
  stroke-dasharray: 5 4;
}

.net-visual .net-node {
  fill: var(--bg);
  stroke: rgba(238, 240, 238, 0.55);
}

.net-visual .net-hub {
  fill: var(--bg);
  stroke: var(--primary);
}

.net-visual text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--fg);
}

.net-visual .net-hub-label {
  fill: var(--primary);
  font-size: 11px;
}

.diagram-svg {
  min-width: 720px;
}

.diagram-svg .rns-band {
  fill: rgba(127, 216, 232, 0.05);
  stroke: var(--primary);
  stroke-opacity: 0.6;
  stroke-dasharray: 4 4;
}

.diagram-svg .flow-line--fallback {
  stroke-dasharray: 5 4;
}

.diagram-svg .flow-line--soft {
  stroke: rgba(238, 240, 238, 0.4);
  stroke-dasharray: 2 4;
}

.diagram-svg .pipeline-label {
  fill: var(--muted);
  font-size: 9.5px;
}

.card-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 8px;
}

.concept-card .card-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.chip-list {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.usecase-grid {
  margin-top: 56px;
  display: grid;
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .usecase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.usecase-card {
  background-color: var(--bg);
  padding: 32px;
}

.usecase-card h3 {
  font-size: 1.4rem;
}

.usecase-card ul {
  margin-top: 20px;
}

.usecase-card li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.link-inline {
  display: inline-block;
  margin-top: 12px;
  border-bottom: 1px solid var(--copper);
}

.link-inline:hover,
.link-inline:focus-visible {
  border-bottom-color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .net-visual .pulse-soft {
    animation: none;
  }
}
