/* ============================================================
   Dant Upchaar — Base: reset, typography, layout primitives
   Loads after tokens.css. No hard-coded colours here — tokens only.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--page-wash); /* faint brand tints — premium depth */
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--s4);
  line-height: 1.14;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.005em; }
h4 { font-size: var(--fs-title); font-weight: 700; }

p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

ul, ol { margin: 0 0 var(--s4); padding-left: 1.25em; }
li { margin-bottom: var(--s2); }

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

strong { font-weight: 700; color: var(--text); }
small { font-size: var(--fs-label); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s7) 0;
}

::selection { background: rgba(0, 184, 217, 0.28); }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 7vw, 80px); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head.center { margin-inline: auto; text-align: center; }

.lead {
  font-size: var(--fs-body-lg);
  color: var(--text-2);
  max-width: 62ch;
}
.section-head.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--s4);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--g1), var(--g3));
}

/* Accent word inside a heading — always the text-safe derivative */
.accent { color: var(--accent-text); }

/* Display-gradient ink for hero accents — both endpoints are AA inks, so
   every interpolated stop stays readable; non-supporting browsers keep the
   solid accent colour above. */
/* NEVER put the clipped background on the .rotator wrapper itself: an
   ancestor's background-clip:text paints through the glyph outlines of ALL
   stacked phrases regardless of each phrase's opacity (caught in the v2.2
   eyeball pass — every phrase rendered at once). Clip per phrase only. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 .accent:not(.rotator),
  .rotator .phrase {
    background-image: linear-gradient(98deg, var(--link) 10%, var(--accent-text) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Hidden per-page gradient defs for premium icon strokes */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.svg-defs .ig-a { stop-color: var(--link); }
.svg-defs .ig-b { stop-color: var(--accent-text); }
/* Inverse gradient for icons on locally-dark .band-navy surfaces: the main
   defs resolve at :root scope, so on the LIGHT page they hold dark inks —
   wrong against navy. These stops are always bright. */
.svg-defs .ig-ia { stop-color: var(--blue-bright); }
.svg-defs .ig-ib { stop-color: var(--teal-bright); }

/* Two-tone brand wordmark: Dant = blue, Upchaar = teal (text-safe inks) */
.wm-dant { color: var(--link); }
.wm-upchaar { color: var(--accent-text); }

/* ---------- Utilities ---------- */
/* All tracks are minmax(0,1fr): a bare 1fr lets long words force the grid
   past narrow viewports. */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }

@media (min-width: 480px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
  .grid-4 { gap: var(--s5); }
}
@media (min-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.center { text-align: center; }

.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;
}

/* Hidden by translating its WHOLE box (plus shadow) above the viewport. A fixed
   `top: -48px` left the ~50px-tall link and its shadow peeking in at the top-left
   of every page (caught in the v2.4 eyeball pass). */
.skip-link {
  position: absolute;
  top: var(--s4);
  left: var(--s4);
  z-index: 200;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  transform: translateY(calc(-100% - 2 * var(--s7)));
  transition: transform var(--t-micro) var(--ease-out);
}
.skip-link:focus { transform: none; }

main { display: block; }
