/* =====================================================================
   PRAJNATA — applied artificial intelligence
   ---------------------------------------------------------------------
   Concept: "Ancient depth, applied with modern precision."
   The name means prajñā — the deep insight that sees a thing as it is.
   So the surface is calm and editorial (depth, age, authority); the
   detail is engineered and exact (the "applied" half). Every token below
   is named for the INTENT, not the value, so a motivated reader can
   reconstruct the reasoning from the source alone.
   ===================================================================== */

:root {
  /* --- Pigment: parchment + ink + the indigo of deep thought ---------
     Not stark white / tech-blue (the category default we are refusing).
     Parchment evokes the manuscript and the reading room; ink is warm,
     not pure black; indigo is the dye literally named after India and
     the colour the mind reaches for when it thinks deeply; brass is the
     engraver's gold, used only on hairlines and the seal.                */
  --paper:            #f3eee2;  /* warm ivory ground                      */
  --paper-recessed:   #ece4d3;  /* a shade deeper — cards, alt bands      */
  --paper-edge:       #e2d8c2;  /* hairline on light                      */

  --ink:              #1b1610;  /* sumi-ink, warm near-black, body text   */
  --ink-muted:        #5c5346;  /* secondary prose                        */
  --ink-faint:        #8a8071;  /* metadata, captions                     */
  --ink-hairline:     rgba(27, 22, 16, 0.14);

  --indigo:           #262a66;  /* the accent — deep, pigment-like        */
  --indigo-bright:    #3a3f95;  /* links, focus, active                   */
  --indigo-ink:       #14163a;  /* the deepest band background            */
  --on-indigo:        #ece6d6;  /* paper, riding on indigo                */
  --on-indigo-muted:  #a9aad0;  /* secondary text on indigo               */
  --on-indigo-hair:   rgba(236, 230, 214, 0.18);

  --brass:            #9c7c43;  /* engraver's gold — seals, rules, never text body */
  --brass-soft:       rgba(156, 124, 67, 0.45);

  /* --- Voice of the type ---------------------------------------------
     Spectral = the calm, literate authority (the depth).
     Plex Sans = engineered, even, modern (the application).
     Plex Mono = the instrument panel: indices, labels, the seal.        */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- Scale: a quiet body, headlines that breathe -------------------- */
  --t-meta:    0.75rem;                                  /* mono labels    */
  --t-body:    1.0625rem;
  --t-lead:    clamp(1.18rem, 0.95rem + 1.0vw, 1.5rem);  /* hero sub, leads*/
  --t-h3:      clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);
  --t-h2:      clamp(2rem, 1.5rem + 2.4vw, 3.1rem);
  --t-display: clamp(2.7rem, 1.7rem + 4.6vw, 5.4rem);    /* the one big line*/

  /* --- Measure & rhythm ---------------------------------------------- */
  --measure:   1200px;
  --gutter:    clamp(1.25rem, 1rem + 4vw, 4.5rem);
  --band:      clamp(4.5rem, 3rem + 9vw, 9.5rem);        /* section padding */
  --prose:     38rem;

  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================ reset =============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.62;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A barely-there paper grain — tactility for the lingering eye, behind
   everything, never touching contrast. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

a { color: var(--indigo); text-decoration: none; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--indigo-bright);
  outline-offset: 3px;
  border-radius: 1px;
}

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

/* ============================ helpers ============================= */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--indigo);
  color: var(--on-indigo);
  padding: 0.6rem 1rem;
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.05em;
  transition: top 0.2s var(--ease);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* The mono "instrument label": section numbers, eyebrows, metadata.
   Small caps, tracked out, brass-or-faint — the engraved register. */
.label {
  font: 500 var(--t-meta)/1.1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.label--brass { color: var(--brass); }

.rule {
  border: 0;
  height: 1px;
  background: var(--ink-hairline);
  margin: 0;
}

/* ============================ masthead =========================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.masthead[data-scrolled="true"] { border-bottom-color: var(--ink-hairline); }

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
}

.wordmark {
  font: 600 1.35rem/1 var(--serif);
  letter-spacing: 0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}
.wordmark .diacritic { color: var(--brass); }       /* the engraved P */
.wordmark small {
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav { display: flex; align-items: baseline; gap: clamp(1rem, 2.5vw, 2.4rem); }
.nav a {
  font: 500 0.84rem/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  position: relative;
  padding-block: 0.2rem;
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--indigo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav .nav__contact { color: var(--indigo); }
@media (max-width: 620px) {
  .nav__about { display: none; }   /* keep the bar uncrowded on phones */
}
@media (max-width: 560px) {
  .wordmark small { display: none; }      /* shed the tagline before it crowds */
  .masthead__inner { gap: 1rem; }
  .nav { gap: 1.1rem; }
  .nav a { font-size: 0.82rem; }
}
@media (max-width: 600px) {
  /* On phones the section links are just a scroll away — keep only the
     one action that matters, so the bar never clips. */
  .nav a { display: none; }
  .nav a.nav__contact { display: inline-block; }
}

/* ============================ hero =============================== */
.hero { padding-block: clamp(3.5rem, 2rem + 9vw, 8rem) var(--band); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.75rem; }
}

.hero__eyebrow { margin: 0 0 1.6rem; }

.hero h1 {
  font: 400 var(--t-display)/1.02 var(--serif);
  letter-spacing: -0.018em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--indigo);
}

.hero__lead {
  font: 400 var(--t-lead)/1.5 var(--serif);
  color: var(--ink-muted);
  max-width: 34ch;
  margin: 1.8rem 0 0;
}

.hero__etym {
  margin: 2.2rem 0 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brass-soft);
  max-width: 40ch;
}
.hero__etym .deva { font: 400 1.25rem/1 var(--serif); color: var(--ink); }
.hero__etym .gloss {
  display: block;
  margin-top: 0.5rem;
  font: 400 0.95rem/1.5 var(--mono);
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.hero__seal { justify-self: center; }
@media (max-width: 880px) { .hero__seal { order: -1; justify-self: start; } }

/* ============================ the seal =========================== */
/* Concentric rings = depth. The crosshair ticks = applied precision.
   प्र at the centre = the seed of prajñā, the point of insight. Ringed
   in Latin like an institution's colophon. Drawn, not decorated.
   (Devanagari is kept out of the rotating ring on purpose — tracking it
   out shatters the conjuncts; it lives, whole, at the centre instead.) */
.seal { width: clamp(150px, 26vw, 230px); height: auto; color: var(--ink); }
.seal .ring-text { fill: var(--ink-muted); font: 500 7px/1 var(--mono); letter-spacing: 1.85px; }
.seal .hair { fill: none; stroke: var(--brass); stroke-width: 0.8; }
.seal .hair--fine { fill: none; stroke: var(--ink-hairline); stroke-width: 0.8; }
.seal .deva-core { fill: var(--indigo); font: 400 24px/1 var(--serif); }
.seal .crosshair { stroke: var(--brass-soft); stroke-width: 0.8; }

@media (prefers-reduced-motion: no-preference) {
  .seal .spin { transform-box: fill-box; transform-origin: center; animation: seal-turn 90s linear infinite; }
  @keyframes seal-turn { to { transform: rotate(360deg); } }
}

/* ============================ generic section ==================== */
.section { padding-block: var(--band); }
.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.section__head .idx { color: var(--brass); }
.section__head h2 {
  font: 400 var(--t-h2)/1.08 var(--serif);
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.section__head .standfirst {
  grid-column: 2;
  font: 400 var(--t-lead)/1.5 var(--serif);
  color: var(--ink-muted);
  margin: 1rem 0 0;
  max-width: var(--prose);
}
@media (max-width: 620px) {
  .section__head { grid-template-columns: 1fr; gap: 0.8rem; }
  .section__head .standfirst { grid-column: 1; }
}

/* ============================ practice (what we do) ============= */
.practice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink-hairline);
}
@media (max-width: 820px) { .practice { grid-template-columns: 1fr; } }

.pillar {
  padding: 2.4rem clamp(1.25rem, 2.5vw, 2.2rem) 2.6rem;
  border-bottom: 1px solid var(--ink-hairline);
  border-right: 1px solid var(--ink-hairline);
  position: relative;
}
.practice .pillar:nth-child(3n) { border-right: 0; }
@media (max-width: 820px) { .pillar { border-right: 0; } }

.pillar .num {
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--brass);
}
.pillar h3 {
  font: 500 var(--t-h3)/1.12 var(--serif);
  margin: 1.6rem 0 0.9rem;
  letter-spacing: -0.01em;
}
.pillar p { margin: 0; color: var(--ink-muted); font-size: 1rem; }
.pillar .pillar__tag {
  display: inline-block;
  margin-top: 1.4rem;
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ============================ tenets (inverted band) ============ */
/* The one dark band gives the page its centre of gravity — the
   manifesto, read against indigo like ink against a deep dusk. */
.tenets {
  background: var(--indigo-ink);
  color: var(--on-indigo);
  position: relative;
}
.tenets::after { /* a hairline frame, brass, top & bottom only */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-top: 1px solid var(--brass-soft);
  border-bottom: 1px solid var(--brass-soft);
}
.tenets .section__head h2 { color: var(--on-indigo); }
.tenets .section__head .idx { color: var(--brass); }
.tenets .section__head .standfirst { color: var(--on-indigo-muted); }

.tenet-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--on-indigo-hair);          /* gridlines via gap */
  border: 1px solid var(--on-indigo-hair);
}
@media (max-width: 720px) { .tenet-list { grid-template-columns: 1fr; } }

.tenet {
  background: var(--indigo-ink);
  padding: 2rem clamp(1.4rem, 2.5vw, 2.4rem) 2.2rem;
}
.tenet .t-num {
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--brass);
}
.tenet h3 {
  font: 400 var(--t-h3)/1.15 var(--serif);
  color: var(--on-indigo);
  margin: 1rem 0 0.7rem;
}
.tenet p { margin: 0; color: var(--on-indigo-muted); font-size: 1rem; }

/* ============================ capabilities ===================== */
.caps { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 820px) { .caps { grid-template-columns: 1fr; gap: 2.5rem; } }

.caps__note { color: var(--ink-muted); max-width: 34ch; }
.caps__note .label { display: block; margin-bottom: 1.2rem; }

.caps__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink-hairline); }
.caps__list li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--ink-hairline);
}
.caps__list .ci {
  font: 500 var(--t-meta)/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--brass);
}
.caps__list .cn {
  font: 400 1.15rem/1.3 var(--serif);
  color: var(--ink);
}
.caps__list .cd {
  grid-column: 2;
  font-size: 0.94rem;
  color: var(--ink-faint);
  margin-top: 0.15rem;
}

/* ============================ contact ========================== */
.contact { background: var(--paper-recessed); border-top: 1px solid var(--paper-edge); }
.contact__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; } }

.contact h2 {
  font: 400 var(--t-h2)/1.05 var(--serif);
  letter-spacing: -0.015em;
  margin: 0.8rem 0 0;
  max-width: 14ch;
  text-wrap: balance;
}
.contact p { color: var(--ink-muted); max-width: 36ch; margin: 1.4rem 0 0; font-size: 1.05rem; }

.contact__cta { justify-self: start; }
.maillink {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  font: 400 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1 var(--serif);
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 0.35rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.maillink .arrow { font-family: var(--sans); color: var(--indigo); transition: transform 0.25s var(--ease); }
.maillink:hover { color: var(--indigo); border-color: var(--indigo); }
.maillink:hover .arrow { transform: translate(3px, 0); }

.contact__meta { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }
.contact__meta span { font: 500 var(--t-meta)/1.4 var(--mono); letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }

/* ============================ colophon (footer) =============== */
.colophon { background: var(--indigo-ink); color: var(--on-indigo); padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.colophon__grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
@media (max-width: 620px) { .colophon__grid { grid-template-columns: 1fr; gap: 2rem; } }

.colophon .seal { width: 96px; }
.colophon .seal .ring-text { fill: var(--on-indigo-muted); }
.colophon .seal .hair--fine { stroke: var(--on-indigo-hair); }
.colophon .seal .deva-core { fill: var(--brass); }
.colophon .seal .crosshair { stroke: var(--on-indigo-hair); }

.colophon__mark { font: 600 1.3rem/1 var(--serif); color: var(--on-indigo); }
.colophon__mark .diacritic { color: var(--brass); }
.colophon__say { margin: 0.9rem 0 0; color: var(--on-indigo-muted); max-width: 52ch; font-size: 0.98rem; }
.colophon__line {
  margin-top: 1.6rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  font: 500 var(--t-meta)/1.5 var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-indigo-muted);
}
.colophon__line a { color: var(--on-indigo-muted); border-bottom: 1px solid var(--on-indigo-hair); }
.colophon__line a:hover { color: var(--on-indigo); }

/* ============================ reveal on attention ============== */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  [data-reveal].is-in { opacity: 1; transform: none; }
  [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
  [data-reveal][data-delay="2"] { transition-delay: 0.16s; }
  [data-reveal][data-delay="3"] { transition-delay: 0.24s; }
}
