/* tknicn — shared styles
   1. Fonts  2. Tokens  3. Base  4. Layout  5. Buttons & links
   6. Header  7. Hero  8. Page content  9. Footer  10. Motion */

/* 1. Fonts (self-hosted, SIL OFL 1.1 — see assets/fonts/LICENSE.md) */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Subset containing only the letters of the wordmark: t k n i c */
@font-face {
  font-family: "Gugi";
  src: url("/assets/fonts/gugi-wordmark.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+63, U+69, U+6B, U+6E, U+74;
}

/* 2. Tokens */
:root {
  color-scheme: dark;

  /* Color */
  --color-bg: #0a0d14;
  --color-bg-raised: #0f131c;
  --color-surface: #141a26;
  --color-line: #1d2433;
  --color-line-strong: #2d3649;
  --color-text: #edeef2;
  --color-text-muted: #a1a9ba;
  --color-text-subtle: #7f889c;
  --color-primary: #5eead4;
  --color-primary-hover: #a7f3e8;
  --color-on-primary: #042420;
  --color-secondary: #f5b971;
  --tricolour: linear-gradient(90deg, #ff9933 0 33.33%, #ffffff 33.33% 66.66%, #138808 66.66%);

  /* Typography */
  --font-brand: "Gugi", "Bricolage Grotesque", system-ui, sans-serif;
  --font-sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.03rem + 0.4vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --text-display: clamp(2.5rem, 1.2rem + 5.6vw, 5.25rem);

  --leading-tight: 1.02;
  --leading-snug: 1.2;
  --leading-body: 1.65;
  --tracking-display: -0.035em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  /* Layout */
  --container: 76rem;
  --container-narrow: 46rem;
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --header-height: 4.5rem;

  /* Shape */
  --radius-sm: 0.375rem;
  --radius: 0.625rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.18s;

  /* Breakpoints (reference only; custom properties cannot be used in media queries)
     sm 40em (640px) · md 48em (768px) · lg 64em (1024px) · xl 90em (1440px) */
}

/* 3. Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-optical-sizing: auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--space-3);
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--color-primary-hover);
}

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

::selection {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-3));
}

/* 4. Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(4rem, 2.5rem + 5vw, 8rem);
}

.section-header {
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Small mono label with a short accent rule, used above section headings */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--color-primary);
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-3);
  color: var(--color-on-primary);
}

/* 5. Buttons & links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    box-shadow 0.25s ease,
    transform var(--duration-fast) ease;
}

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

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-on-primary);
  box-shadow: 0 0 0 4px rgb(94 234 212 / 0.16);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--sm {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
}

.btn .icon,
.link-arrow .icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.75rem;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 0.35em;
  transition: text-decoration-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.link-arrow:hover {
  color: var(--color-text);
  text-decoration-color: var(--color-primary);
}

.link-arrow:hover .icon {
  transform: translateY(3px);
}

/* 6. Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-line);
  background: rgb(10 13 20 / 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: var(--color-bg);
  }
}

/* With JavaScript the header is transparent at the top of the page and
   gains its glass background once the page scrolls or the menu opens. */
.js .site-header:not(.is-scrolled, .is-menu-open) {
  border-bottom-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: var(--space-2) var(--space-4);
  min-height: var(--header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--font-brand);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.wordmark:hover {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(0.25rem, 0.1rem + 1vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

/* Underline that grows from the left on hover, focus, and current page */
.nav-list a::after {
  content: "";
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: 0.55rem;
  height: 2px;
  border-radius: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-text);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.3s var(--ease-out),
    background-color 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after { transform: translateY(6px); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: rotate(-45deg); }

/* Below 56em: without JS the links wrap onto a second row;
   with JS they collapse into a menu panel under the header. */
@media (max-width: 55.99em) {
  html:not(.js) .header-inner {
    padding-top: var(--space-3);
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-inline: calc(-1 * var(--space-2));
    padding-bottom: var(--space-2);
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    margin: 0;
    padding: var(--space-2) var(--gutter) var(--space-4);
    border-bottom: 1px solid var(--color-line);
    background: var(--color-bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition:
      opacity 0.25s ease,
      transform 0.3s var(--ease-out),
      visibility 0s linear 0.3s;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.25s ease,
      transform 0.3s var(--ease-out),
      visibility 0s;
  }

  .js .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .js .nav-list a {
    display: flex;
    min-height: 3.25rem;
    padding-inline: 0;
    border-bottom: 1px solid var(--color-line);
    font-size: var(--text-lg);
  }

  .js .nav-list a::after {
    left: 0;
    right: auto;
    width: 2rem;
    bottom: -1px;
  }

  /* Shown as soon as the inline head script sets .js, so the header never
     changes size after first paint. */
  .js .nav-toggle {
    display: inline-flex;
  }
}

/* Narrow phones: tighten the header so everything fits at 320px */
@media (max-width: 25em) {
  .wordmark {
    font-size: 1.375rem;
  }

  .header-actions .btn--sm {
    padding-inline: 0.75rem;
  }
}

/* 7. Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 1.5rem + 6vw, 7rem) var(--space-5);
}

/* Faint drafting grid, faded toward the edges (hero and closing contact) */
.hero::before,
.page-hero::before,
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--color-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-line) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 35%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 70% at 70% 35%, #000 10%, transparent 72%);
  opacity: 0.6;
}

.hero-grid {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.hero-title {
  margin-bottom: var(--space-4);
  font-size: var(--text-display);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: initial;
}

.hero-title-line {
  display: block;
  text-wrap: balance;
}

.hero-title-line--muted {
  color: var(--color-text-muted);
}

.hero-title .accent {
  color: var(--color-primary);
}

.hero-lead {
  max-width: 36rem;
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.hero-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

/* Problem → solution diagram (decorative) */
.hero-visual {
  display: none;
  margin: 0;
}

.diagram {
  width: 100%;
  height: auto;
  overflow: visible;
}

.diagram-frame {
  fill: none;
  stroke: var(--color-line-strong);
  stroke-width: 1.5;
}

.diagram-scribble,
.diagram-route {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.diagram-scribble {
  stroke: var(--color-secondary);
  animation: draw 1.3s var(--ease-out) 0.35s backwards;
}

.diagram-route {
  stroke: var(--color-primary);
  animation: draw 2s cubic-bezier(0.65, 0, 0.35, 1) 1.2s backwards;
}

.diagram-node {
  fill: var(--color-bg);
  stroke: var(--color-primary);
  stroke-width: 1.5;
}

.diagram-goal {
  fill: var(--color-primary);
}

.diagram-goal-ring {
  fill: none;
  stroke: var(--color-primary);
  stroke-opacity: 0.35;
}

.diagram-label {
  fill: var(--color-text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.diagram-label--problem {
  fill: var(--color-secondary);
}

.diagram-label--goal {
  fill: var(--color-primary);
}

.diagram-step {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s var(--ease-out) backwards;
  animation-delay: calc(1.4s + var(--i) * 0.38s);
}

/* Summary index: what we solve / who we help */
.hero-index {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.hero-index dt {
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.hero-index dd {
  margin: 0;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.inline-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.inline-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  opacity: 0.7;
}

@media (min-width: 40em) {
  .hero-visual {
    display: block;
    width: min(100%, 30rem);
    justify-self: end;
  }
}

.hero-links a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition:
    color var(--duration-fast) ease,
    text-decoration-color var(--duration-fast) ease;
}

.hero-links a:hover {
  color: var(--color-primary);
  text-decoration-color: currentColor;
}

.hero-origin {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
}

@media (min-width: 48em) {
  .hero-index {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-5);
  }

  .hero-index > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 75em) {
  .hero-index {
    grid-template-columns: 2.4fr 1.6fr 1fr;
  }

  .hero-index > div:last-child {
    grid-column: auto;
  }
}

@media (min-width: 64em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--space-6);
  }

  .hero-visual {
    width: 100%;
  }
}

/* 8. Page content (homepage sections and inner pages) */
.section-lead,
.lead {
  max-width: 40rem;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.section h2 {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
}

/* Philosophy: editorial split, a large statement, then three ruled principles */
.philosophy {
  border-block: 1px solid var(--color-line);
  background: var(--color-bg-raised);
}

.philosophy-intro {
  display: grid;
  gap: var(--space-4);
  align-items: end;
}

.philosophy-intro h2 {
  max-width: 14ch;
  margin: 0;
}

.philosophy-text {
  max-width: 34rem;
  margin: 0;
  color: var(--color-text-muted);
}

.statement {
  max-width: 24ch;
  margin: clamp(3rem, 2rem + 4vw, 6rem) 0;
  padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-left: 2px solid var(--color-primary);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.statement em {
  font-style: normal;
  color: var(--color-primary);
}

.principles {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.principle {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-strong);
}

.principle-index,
.service-index,
.problem-index,
.belief-index {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.principle h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.principle p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }

  .statement {
    font-size: clamp(1.75rem, 1rem + 1.9vw, 2.5rem);
  }
}

@media (min-width: 64em) {
  .philosophy-intro {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .statement {
    margin-left: calc(100% / 6);
  }
}

/* Services: a ruled grid of six areas. A teal rule draws across the top of
   an area on hover, keyboard focus, or when it is the target of a link. */
.service-list {
  display: grid;
  gap: var(--space-6) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-strong);
}

.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}

.service:hover::before,
.service:focus-within::before,
.service:target::before {
  transform: scaleX(1);
}

.service-index {
  margin: 0;
  transition: color var(--duration-fast) ease;
}

.service:hover .service-index,
.service:focus-within .service-index {
  color: var(--color-primary);
}

.service-main h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
}

.service-main p {
  max-width: 34rem;
  margin: 0;
  color: var(--color-text-muted);
}

.service-examples-label {
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.service-examples ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.service-examples li {
  position: relative;
  padding-left: 1.25rem;
}

.service-examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 1px;
  background: var(--color-primary);
}

.disclosure summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 2.75rem;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

/* Plus that turns into a minus when open */
.disclosure summary::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  flex: none;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  color: var(--color-primary);
  transition: transform var(--duration-fast) var(--ease-out);
}

.disclosure[open] summary::before {
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
  transform: rotate(180deg);
}

.disclosure summary:hover {
  color: var(--color-primary);
}

.disclosure-body {
  max-width: 40rem;
  padding-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.service-also {
  margin: 0;
  color: var(--color-text);
}

.service-also span {
  margin-right: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

@media (min-width: 48em) {
  .service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 75em) {
  .service-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Who we help: one track from small to large problems. Markers grow with
   problem scale, not with importance; every column has the same weight. */
.scale {
  display: none;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.scale span:last-child::after {
  content: " →";
}

.audiences {
  border-top: 1px solid var(--color-line);
}

.audience-list {
  position: relative;
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0 0 0 var(--space-5);
  list-style: none;
}

/* The track: vertical on small screens, horizontal on desktop */
.audience-list::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.5625rem;
  width: 1px;
  background: var(--color-line-strong);
}

.audience {
  position: relative;
  max-width: 38rem;
}

.audience-marker {
  --size: 0.5rem;
  position: absolute;
  top: 0.75rem;
  left: calc(-1 * var(--space-5) + 0.5625rem);
  width: var(--size);
  height: var(--size);
  border: 1.5px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-bg);
  transform: translate(-50%, -50%);
}

.audience:nth-child(2) .audience-marker { --size: 0.75rem; }
.audience:nth-child(3) .audience-marker { --size: 1rem; }
.audience:nth-child(4) .audience-marker { --size: 1.25rem; }

.audience h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.audience > p {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.audience-focus {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.audience-focus li {
  position: relative;
  padding-left: 1.25rem;
}

.audience-focus li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 1px;
  background: var(--color-primary);
}

.audience-note {
  max-width: 40rem;
  margin: var(--space-6) 0 0;
  font-size: var(--text-lg);
  color: var(--color-text);
}

@media (min-width: 64em) {
  .scale {
    display: flex;
  }

  .audience-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5);
    padding: var(--space-6) 0 0;
  }

  .audience-list::before {
    top: 0.625rem;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
  }

  .audience-marker {
    top: calc(-1 * var(--space-6) + 0.625rem);
    left: 0;
    transform: translate(0, -50%);
  }
}

/* Technologies: a ruled spec sheet of groups */
.tech {
  border-block: 1px solid var(--color-line);
  background: var(--color-bg-raised);
}

.tech-groups {
  display: grid;
  gap: 1px;
  border: 1px solid var(--color-line);
  background: var(--color-line);
}

.tech-group {
  padding: var(--space-4);
  background: var(--color-bg-raised);
}

.tech-group h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.tech-group > p {
  max-width: 30rem;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.tech-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
}

.tech-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: var(--color-text-muted);
  transition: fill var(--duration-fast) ease;
}

.tech-list li {
  transition: transform var(--duration-fast) var(--ease-out);
}

.tech-list li:hover {
  transform: translateX(2px);
}

.tech-list li:hover .tech-icon {
  fill: var(--brand, var(--color-text));
}

/* Generic capabilities use stroke icons (no brand logo exists); they take
   their colour from `color` and light up in teal on hover. */
.tech-icon--line {
  fill: none;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) ease;
}

.tech-list li:hover .tech-icon--line {
  color: var(--brand, var(--color-primary));
}

.tech-group {
  transition: background-color 0.3s ease;
}

.tech-group:hover {
  background: var(--color-surface);
}

.tech-more {
  max-width: 44rem;
  margin: var(--space-5) 0 0;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.tech-note {
  max-width: 40rem;
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

@media (min-width: 48em) {
  .tech-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-group {
    padding: var(--space-5);
  }
}

@media (min-width: 64em) {
  .tech-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Problems: illustrative scenarios. Problem (amber) and approach (teal)
   echo the hero diagram's problem → solution colors. */
.problems {
  border-block: 1px solid var(--color-line);
  background: var(--color-bg-raised);
}

.problem-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-line);
}

.problem {
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.problem h3 {
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
}

.problem-body {
  display: grid;
  gap: var(--space-4);
  margin: 0 0 var(--space-3);
}

.problem-body > div {
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-secondary);
}

.problem-body > div + div {
  border-left-color: var(--color-primary);
}

.problem-body dt {
  margin-bottom: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}

.problem-body div + div dt {
  color: var(--color-primary);
}

.problem-body dd {
  max-width: 36rem;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.problem-body div:first-child dd {
  color: var(--color-text);
}

@media (min-width: 48em) {
  .problem-body {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  /* Arrow from problem to approach, centred in the gap */
  .problem-body > div + div {
    position: relative;
  }

  .problem-body > div + div::before {
    content: "→";
    position: absolute;
    top: -0.15rem;
    left: calc(-1 * var(--space-6) / 2 - 0.5em);
    width: 1em;
    color: var(--color-text-subtle);
    font-size: var(--text-lg);
    text-align: center;
  }
}

@media (min-width: 64em) {
  .problem {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 2fr);
    column-gap: var(--space-6);
    align-content: start;
  }

  .problem .problem-index { grid-column: 1; grid-row: 1; }
  .problem h3 { grid-column: 1; grid-row: 2; margin: 0; font-size: var(--text-lg); }
  .problem-body { grid-column: 2; grid-row: 1 / span 3; }
  .problem .disclosure { grid-column: 2; }
}

/* Approach: four numbered steps on one connected rule */
.approach {
  border-top: 1px solid var(--color-line);
}

.steps {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  align-content: start;
  column-gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-strong);
}

/* Short accent at the start of each step's rule */
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2rem;
  height: 1px;
  background: var(--color-primary);
}

.step-index {
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  color: var(--color-text-subtle);
}

.step h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.step p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-6);
  }
}

@media (min-width: 64em) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  /* One continuous rule across the four steps */
  .step {
    grid-template-columns: 1fr;
    padding-right: var(--space-5);
  }

  .step-index {
    margin-bottom: var(--space-4);
    font-size: var(--text-display);
  }
}

/* Inner pages */
.page-header {
  padding-block: var(--space-6) var(--space-4);
}

.page-header h1 {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
}

.prose h2 {
  margin-top: var(--space-5);
  font-size: var(--text-xl);
}


/* Inner pages end with their own space above the footer */
main > .container--narrow {
  padding-bottom: var(--space-7);
}

/* FAQ: sticky intro beside a ruled accordion */
.faq-layout {
  display: grid;
  gap: var(--space-5);
}

.faq-intro .section-header {
  margin-bottom: var(--space-4);
}

.faq-aside {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.faq-list {
  border-bottom: 1px solid var(--color-line);
}

.faq-item {
  border-top: 1px solid var(--color-line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 3.5rem;
  padding-block: var(--space-4);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 500;
  transition: color var(--duration-fast) ease;
}

.faq-item summary:hover h3 {
  color: var(--color-primary);
}

/* Plus that becomes a minus when open */
.faq-item summary::after {
  content: "";
  width: 0.875rem;
  height: 0.875rem;
  flex: none;
  background:
    linear-gradient(var(--color-primary), var(--color-primary)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--color-primary), var(--color-primary)) center / 1.5px 100% no-repeat;
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq-item[open] summary::after {
  background: linear-gradient(var(--color-primary), var(--color-primary)) center / 100% 1.5px no-repeat;
  transform: rotate(180deg);
}

.faq-answer {
  max-width: 40rem;
  padding-bottom: var(--space-4);
  color: var(--color-text-muted);
}

.faq-answer p {
  margin: 0;
}

@media (min-width: 64em) {
  .faq-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--space-7);
    align-items: start;
  }

  .faq-intro {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }
}

/* Closing contact: the page's last word, on the hero's drafting grid */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid var(--color-line);
  text-align: center;
}

.contact::before {
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(1rem, 0.5rem + 3vw, 3rem);
}

.contact .eyebrow::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--color-primary);
}

.contact-tagline {
  margin-bottom: var(--space-4);
  font-size: var(--text-display);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

.contact-tagline span {
  display: block;
  text-wrap: balance;
}

.contact-tagline span:first-child {
  color: var(--color-text-muted);
}

.contact-tagline .accent {
  display: inline;
  color: var(--color-primary);
}

.contact h2 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.contact-text {
  max-width: 36rem;
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.btn--lg {
  min-height: 3.75rem;
  padding: 1rem 1.75rem;
  font-size: var(--text-lg);
}

.contact-email {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

.contact-email a {
  font-family: var(--font-mono);
}

.contact-links {
  justify-content: center;
  margin-top: var(--space-5);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--color-text-muted);
}

.contact-links a:hover {
  color: var(--color-primary);
}

/* ---- About page ---- */

/* Page hero: same drafting grid and display type as the homepage hero */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 1.5rem + 6vw, 7rem) clamp(3rem, 2rem + 3vw, 5rem);
  border-bottom: 1px solid var(--color-line);
}

.page-hero .hero-lead {
  max-width: 40rem;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--color-text);
  text-decoration: none;
}

.page-nav a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Two-column editorial layout: heading aside, long-form body */
.split {
  display: grid;
  gap: var(--space-4);
}

.split-aside h2 {
  margin: 0;
}

@media (min-width: 64em) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--space-7);
    align-items: start;
  }

  .split-aside {
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
  }
}

.story-body {
  max-width: 42rem;
}

.story-body p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.story-body p:first-child {
  font-size: var(--text-xl);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.pullquote {
  margin: var(--space-5) 0;
  padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-left: 2px solid var(--color-primary);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.story-body .pullquote {
  font-size: var(--text-xl);
  color: var(--color-text);
}

/* Beliefs: large statements on ruled rows */
.beliefs {
  border-top: 1px solid var(--color-line);
}

.belief-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-line);
}

.belief {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-line);
}

.belief-index {
  margin: 0;
}

.belief h3 {
  margin: 0;
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
}

.belief p {
  max-width: 32rem;
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .belief {
    grid-template-columns: 3.5rem minmax(0, 1.2fr) minmax(0, 1fr);
    column-gap: var(--space-5);
    align-items: baseline;
  }
}

/* Research & development */
.research {
  border-block: 1px solid var(--color-line);
  background: var(--color-bg-raised);
}

.research-intro {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.research-intro h2 {
  max-width: 16ch;
}

.research-text p {
  max-width: 38rem;
  color: var(--color-text-muted);
}

.research-visual {
  width: min(100%, 20rem);
  justify-self: center;
}

.loop {
  width: 100%;
  height: auto;
  overflow: visible;
}

.loop-track {
  fill: none;
  stroke: var(--color-line-strong);
}

.loop-path {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 2.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s backwards;
}

.loop-arrow {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-node {
  fill: var(--color-bg-raised);
  stroke: var(--color-primary);
  stroke-width: 1.5;
}

.loop-label,
.loop-center {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.loop-label {
  fill: var(--color-text-muted);
  font-size: 13px;
}

.loop-center {
  fill: var(--color-secondary);
  font-size: 15px;
}

.loop-step {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s var(--ease-out) backwards;
  animation-delay: calc(0.4s + var(--i) * 0.55s);
}

/* With JavaScript, the loop waits until it scrolls into view.
   Without it, the animation simply plays on load. */
.js [data-in-view]:not(.in-view) .loop-path,
.js [data-in-view]:not(.in-view) .loop-step {
  animation-play-state: paused;
}

.research-details {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.research-block h3,
.now-next dt {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.research-steps {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: 1.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.research-steps li::marker {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.research-steps strong {
  font-weight: 600;
  color: var(--color-text);
}

.now-next {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
}

.now-next > div {
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.now-next > div + div {
  border-style: dashed;
  border-color: var(--color-line-strong);
}

.now-next > div + div dt {
  color: var(--color-primary);
}

.now-next dd {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .research-details,
  .now-next {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64em) {
  .research-intro {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: var(--space-7);
  }
}

/* Made in India */
.india-grid {
  display: grid;
  gap: var(--space-5);
}

/* The eyebrow's accent rule in India's tricolour (saffron, white, green) */
.eyebrow--tricolour::before {
  width: 3rem;
  height: 3px;
  border-radius: 2px;
  background: var(--tricolour);
}

.india-mark h2 {
  max-width: 14ch;
  margin: 0;
}

.india-body p {
  max-width: 38rem;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.india-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
}

.india-values > div {
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line-strong);
}

.india-values dt {
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.india-values dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (min-width: 64em) {
  .india-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--space-7);
  }
}

/* ---- Legal pages (privacy, terms) ---- */
.legal-title {
  margin-bottom: var(--space-4);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  margin: var(--space-5) 0 0;
}

.legal-meta dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.legal-meta dd {
  margin: 0;
  font-size: var(--text-sm);
}


.legal-layout {
  padding-block: var(--space-6) var(--space-7);
}

.legal-toc-heading {
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.75rem;
  font-size: var(--text-sm);
}

.legal-toc li::marker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.legal-toc a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (min-width: 40em) and (max-width: 63.99em) {
  .legal-toc ol {
    columns: 2;
    column-gap: var(--space-5);
  }
}

.legal-body {
  max-width: 44rem;
  min-width: 0;
}

.legal-body > section + section {
  margin-top: var(--space-6);
}

.legal-body h2 {
  margin-bottom: var(--space-3);
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}

.legal-body h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--text-lg);
}

.legal-body p,
.legal-body li {
  color: var(--color-text-muted);
}

.legal-body strong {
  font-weight: 600;
  color: var(--color-text);
}

.legal-body ul {
  margin: 0 0 var(--space-3);
  padding-left: 1.25rem;
}

.legal-body li {
  margin-bottom: var(--space-2);
}

.legal-body li::marker {
  color: var(--color-primary);
}

.legal-summary {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-line);
  border-left: 2px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--color-bg-raised);
}

.legal-summary h2 {
  font-size: var(--text-lg);
}

.legal-summary ul {
  margin: 0;
}

.legal-table-wrap {
  margin-bottom: var(--space-4);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.legal-table th,
.legal-table td {
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.legal-table thead th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.legal-table tbody th {
  font-weight: 500;
  color: var(--color-text);
}

.legal-table td {
  color: var(--color-text-muted);
}

/* Small screens: each row becomes a labelled block */
@media (max-width: 47.99em) {
  .legal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .legal-table tr {
    display: block;
    padding-block: var(--space-3);
    border-top: 1px solid var(--color-line-strong);
  }

  .legal-table th,
  .legal-table td {
    display: block;
    padding: var(--space-1) 0;
    border: 0;
  }

  .legal-table tbody th::before,
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-text-subtle);
  }
}

/* 9. Footer (shared by all pages) */
.site-footer {
  border-top: 1px solid var(--color-line);
  background: var(--color-bg-raised);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  gap: var(--space-5) var(--space-4);
  padding-block: var(--space-6) var(--space-5);
}

.footer-brand .wordmark {
  margin-bottom: var(--space-2);
  font-size: 1.875rem;
}

.footer-brand p {
  max-width: 22rem;
  margin: 0 0 var(--space-2);
}

.footer-tagline {
  color: var(--color-text);
}

.footer-heading {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

.footer-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition:
    color var(--duration-fast) ease,
    text-decoration-color var(--duration-fast) ease;
}

.footer-list a:hover,
.footer-contact a:hover,
.footer-list a[aria-current="page"] {
  color: var(--color-primary);
}

.footer-list a:hover,
.footer-contact a:hover {
  text-decoration-color: currentColor;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-4);
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
}

/* Rule aligned with the content edges rather than the container padding */
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--color-line);
}

.footer-bottom p {
  margin: 0;
}

.made-in-india {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text-muted);
}

/* India's tricolour as a short rule (colors only, not the national flag) */
.tricolour-mark {
  display: inline-block;
  flex: none;
  width: 1.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--tricolour);
}

@media (min-width: 40em) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64em) {
  .footer-grid {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* 10. Motion — entrance only; final state is the default, so content is
   fully visible when animations are disabled or unsupported. */
.reveal {
  animation: rise 0.9s var(--ease-out) backwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.09s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Largest-paint candidates (hero H1 and lead) rise into place without
   starting transparent, so they count as painted on the first frame. */
@keyframes settle {
  from {
    transform: translateY(0.75rem);
  }
}

.hero-title.reveal,
.hero-lead.reveal {
  animation-name: settle;
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* Scroll reveal. Content is always visible by default (crawlers, screenshots,
   no-JS, reduced motion). When motion is allowed, main.js adds .reveal-ready and
   marks elements .in-view just before they scroll on screen, which plays a
   one-time fade-up. Groups stagger their direct children. */
.reveal-ready [data-reveal].in-view,
.reveal-ready [data-reveal-group].in-view > * {
  animation: rise 0.8s var(--ease-out) backwards;
}

.reveal-ready [data-reveal-group].in-view > :nth-child(2) { animation-delay: 0.08s; }
.reveal-ready [data-reveal-group].in-view > :nth-child(3) { animation-delay: 0.16s; }
.reveal-ready [data-reveal-group].in-view > :nth-child(4) { animation-delay: 0.24s; }
.reveal-ready [data-reveal-group].in-view > :nth-child(5) { animation-delay: 0.32s; }
.reveal-ready [data-reveal-group].in-view > :nth-child(n + 6) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
    interpolate-size: allow-keywords;
  }

  /* Smooth open/close where supported; other browsers simply toggle */
  .disclosure::details-content,
  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition:
      block-size 0.3s var(--ease-out),
      content-visibility 0.3s allow-discrete;
  }

  .disclosure[open]::details-content,
  .faq-item[open]::details-content {
    block-size: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 404 page */
.not-found {
  border-bottom: 0;
  min-height: calc(100vh - var(--header-height) - 14rem);
}

.not-found-links {
  margin-top: var(--space-5);
}

.not-found-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
