/* Ujjwal Bharat Labs. Brand tokens follow the main site (client/src): saffron accent, Space Grotesk + Inter.
   Layout: one centered column, a two-part hero (copy + verse map), then projects and principles. */
:root {
  --bg: #FFFFFF;
  --bg-2: #F6F4F0;
  --surface: #FFFFFF;
  --text: #16181D;
  --muted: #5C6470;
  --line: #E7E2D9;
  --accent: #B65C0F;
  --accent-bright: #F7891E;
  --accent-hot: #F1512A;
  --accent-soft: #FCEBD8;
  --dot: #E9DCCB;
  --dot-on: #F7891E;
  --ok: #1F7A4D;
  --ok-soft: #E3F3EA;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-sa: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", "Nirmala UI", serif;
  --wrap: 1120px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315; --bg-2: #18191C; --surface: #1C1D21; --text: #EDEBE7; --muted: #A3A8B0; --line: #2D2E33;
    --accent: #F7A04A; --accent-bright: #F7891E; --accent-hot: #FF6A43; --accent-soft: #2E2116;
    --dot: #2F2A25; --dot-on: #F7891E; --ok: #5FCB92; --ok-soft: #17291F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.eyebrow { font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.accent-text {
  background: linear-gradient(120deg, var(--accent-hot) 0%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.brand-labs { color: var(--accent); }
.top-nav { display: flex; gap: 22px; align-items: center; font-size: 0.95rem; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.top-nav .to-main { color: var(--accent); font-weight: 500; }
@media (max-width: 640px) { .top-nav a:not(.to-main) { display: none; } }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 96px); background: radial-gradient(60% 80% at 85% 20%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.btn-primary { background: linear-gradient(135deg, #FFAE3C 0%, var(--accent-bright) 45%, var(--accent-hot) 100%); color: #241100; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-figure { margin: 0; display: grid; gap: 14px; min-width: 0; }
.verse-map {
  display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: clamp(3px, 0.7vw, 7px);
  align-items: end; padding: clamp(16px, 2.5vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.chapter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; align-content: end; }
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--dot); animation: glow 0.6s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.chapter:hover .dot { background: var(--accent); }
.chapter:first-child .dot:first-child { background: var(--accent-hot); box-shadow: 0 0 0 2px var(--accent-soft); }
@keyframes glow { from { background: var(--dot-on); } to { background: var(--dot); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.ch-num { grid-column: 1 / -1; text-align: center; font-size: 0.62rem; color: var(--muted); padding-top: 6px; font-variant-numeric: tabular-nums; }
figcaption { font-size: 0.92rem; color: var(--muted); max-width: 36em; }
.fig-label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--text); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ch-num { font-size: 0.5rem; }
}

/* Sections */
.projects, .approach { padding-block: clamp(56px, 8vw, 96px); }
.projects { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 32px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 40px); display: grid; gap: 14px; }
.project + .project { margin-top: 20px; }
.project-body { display: grid; gap: 14px; max-width: 46em; }
.project h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.project p { color: var(--muted); }
.project-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px; }
.status-active { background: var(--ok-soft); color: var(--ok); }
.status-soon { background: var(--accent-soft); color: var(--accent); }
.project-kind { font-size: 0.85rem; color: var(--muted); }

.sanskrit { font-family: var(--font-sa); font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.75; color: var(--text) !important; padding: 16px 20px; border-left: 3px solid var(--accent-bright); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.verse-ref { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: -6px; }
.facts { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); }
.facts strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--text); margin-right: 4px; font-variant-numeric: tabular-nums; }
.small { font-size: 0.88rem; }
.project-next { border-style: dashed; background: transparent; }
.text-link { font-weight: 600; text-decoration: none; justify-self: start; }
.text-link:hover { text-decoration: underline; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.principle { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 2px solid var(--accent-bright); }
.principle h3 { font-size: 1.15rem; }
.principle p { color: var(--muted); }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 0.92rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.project-title-link { color: inherit; text-decoration: none; }
.project-title-link:hover { color: var(--accent); }
.project-cta { justify-self: start; margin-top: 4px; }
