/* Trinetra public site · design system 2.0 (Day)
 *
 * Landing, products, company, research, public safety, Darpan, transparency, status, changelog.
 * Header and footer are rendered by /assets/site.js into header.masthead[data-site] and
 * footer.colophon[data-site]. Tokens: /assets/ds/tokens.css. Shared parts: /assets/ds/components.css.
 */
@import url("/assets/ds/tokens.css");
@import url("/assets/ds/components.css");

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 650; text-wrap: balance; }
p, li { text-wrap: pretty; }
strong, b { font-weight: 650; }
img, svg, canvas, video { max-width: 100%; }
svg.tg { flex: none; display: inline-block; vertical-align: middle; }
code, kbd, pre, samp { font-family: var(--font-code); }

a { color: var(--accent-ink); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ── page frame ───────────────────────────────────────────────── */

.frame { width: min(var(--page), 100%); margin: 0 auto; padding: 0 24px 96px; }
.frame.wide { width: min(1320px, 100%); }
main { display: block; padding-top: clamp(40px, 6vw, 88px); }

/* ── global navigation ────────────────────────────────────────── */

.masthead[data-site] {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  width: 100%;
  background: var(--nav-glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 80%, transparent);
}
.nav-inner {
  width: min(var(--page), 100%);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; flex: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand .tg { color: var(--accent); }
.nav-brand .word { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; font-variation-settings: "wdth" 110; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.masthead .nav-toggle { display: none; }
@media (max-width: 920px) {
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px 24px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-float);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .masthead .nav-toggle { display: inline-flex; }
  .nav-cta .btn.small { display: none; }
}

/* ── buttons ──────────────────────────────────────────────────── */

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--d-2) var(--ease), color var(--d-2) var(--ease), transform var(--d-1) var(--ease);
}
.btn:hover { background: oklch(0.86 0.004 270); text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); border-color: oklch(0.4 0.008 270); }
.btn.quiet { background: transparent; color: var(--accent-ink); padding: 0 6px; }
.btn.quiet:hover { background: transparent; text-decoration: underline; }
.btn.small { min-height: 34px; padding: 0 15px; font-size: 14px; }
.btn.icon { padding: 0; width: 40px; min-height: 40px; background: transparent; color: var(--ink-2); }
.btn.icon:hover { background: var(--surface-2); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ── typography blocks ────────────────────────────────────────── */

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 550;
  color: var(--ink-2);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 16px;
}
h1.title, .display {
  font-size: var(--t-display);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 560;
  font-variation-settings: "wdth" var(--wdth-display);
  max-width: 16ch;
  margin-bottom: 22px;
}
h2.section, .headline {
  font-size: var(--t-headline);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 560;
  font-variation-settings: "wdth" var(--wdth-headline);
  max-width: 20ch;
  margin: clamp(72px, 9vw, 128px) 0 22px;
  text-transform: none;
  color: var(--ink);
}
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.epigraph { font-size: var(--t-lead); line-height: 1.45; max-width: 52ch; margin-bottom: 40px; }
.epigraph .deva, .deva { font-family: var(--font-script); }
.small:not(.btn), .body .small:not(.btn) { font-size: 15px; color: var(--ink-3); }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.015em; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.25rem; margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0.8em 0; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote { border: 0; background: var(--surface-2); border-radius: 14px; padding: 16px 20px; color: var(--ink-2); }

/* sections in label + body rows (product and company pages) */
section.row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 32px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
section.row > .label, section.row > .body { min-width: 0; }
section.row > .label {
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: 0;
  padding-top: 2px;
}
.body { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.62; }
.body p + p { margin-top: 0.9em; }
.body strong { font-weight: 650; }
.body ul, ul.dots { list-style: none; padding: 0; margin: 10px 0 0; }
.body li, ul.dots li { padding: 5px 0 5px 22px; position: relative; }
.body li::before, ul.dots li::before {
  content: ""; position: absolute; left: 4px; top: 0.95em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
@media (max-width: 760px) {
  section.row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 32px 0; }
}

/* ── product hero (product pages) ─────────────────────────────── */

.hero { padding: 8px 0 clamp(48px, 7vw, 88px); }
.hero .name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; }
.hero .name .mark { font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }
.hero .name .deva { font-size: 1.125rem; color: var(--ink-3); font-family: var(--font-script); }
.hero h1 {
  font-size: clamp(2.5rem, 1.35rem + 3.3vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 560;
  font-variation-settings: "wdth" var(--wdth-display);
  max-width: 19ch;
}
.hero .lead { margin-top: 20px; }

/* ── chips (public variants) ──────────────────────────────────── */

.chip.live { --chip: var(--ok); }
.chip.pilot { --chip: var(--watch); }
.chip.soon, .chip.building {
  --chip: var(--ink-2);
  background: transparent;
  border: 1px dashed var(--line-strong);
  height: 21px;
}

/* ── cards and tiles ──────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background var(--d-2) var(--ease), border-color var(--d-2) var(--ease);
}
a.card:hover { background: var(--surface-2); border-color: var(--line-strong); text-decoration: none; }
.card .k { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: 0; text-transform: none; }
.card .t { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.card .d { font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.card .deva { font-family: var(--font-script); color: var(--ink-3); font-size: 15px; }

/* data strip (real readings, not hero metrics) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; margin: 12px 0 40px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi .v { font-size: 2rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .k { margin-top: 4px; font-size: 14.5px; color: var(--ink-3); letter-spacing: 0; text-transform: none; }

/* ── tables, code, figures, callouts ──────────────────────────── */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.spec { width: 100%; border-collapse: collapse; font-size: 15.5px; }
table.spec th, table.spec td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; text-transform: none; border-bottom-color: var(--line-strong); }
table.spec td { font-variant-numeric: tabular-nums; }

pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
:not(pre) > code { background: var(--surface-2); border-radius: 6px; padding: 1px 6px; font-size: 0.88em; }

figure.diagram, .media {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(16px, 3vw, 32px);
  overflow: hidden;
}
figure.diagram figcaption, .media figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

.callout { font-size: 15.5px; border-radius: 16px; padding: 16px 20px; }

/* ── footer ───────────────────────────────────────────────────── */

footer.colophon[data-site] {
  width: 100%;
  margin-top: clamp(72px, 10vw, 140px);
  background: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.foot-inner { width: min(var(--page), 100%); margin: 0 auto; padding: 56px 24px 40px; }
.foot-cols { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 32px; }
.foot-brand { display: flex; flex-direction: column; gap: 12px; }
.foot-brand .row1 { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; font-size: 17px; }
.foot-brand .row1 .tg { color: var(--accent); }
.foot-brand p { font-size: 14.5px; color: var(--ink-3); max-width: 30ch; }
.foot-col h3 { font-size: 14px; font-weight: 650; color: var(--ink); margin-bottom: 12px; }
.foot-col a { display: block; color: var(--ink-2); font-size: 14.5px; padding: 4px 0; text-decoration: none; }
.foot-col a:hover { color: var(--ink); }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-size: 13.5px; color: var(--ink-3); }
.foot-base a { color: var(--ink-3); }
.foot-base a:hover { color: var(--ink); }
/* the Devanagari wordmark is an image mask, so plain English pages never download the Devanagari font */
.foot-base .satya {
  display: inline-block; width: 2.6em; height: 1.02em; flex: none;
  background: var(--ink-2);
  -webkit-mask: url("/assets/img/trinetra-deva-mask.png") no-repeat left center / contain;
  mask: url("/assets/img/trinetra-deva-mask.png") no-repeat left center / contain;
}
.foot-base .spacer { flex: 1; }
@media (max-width: 900px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }

/* legacy masthead parts if a page renders its own header */
.masthead:not([data-site]) { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 40px; }

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