/* ============================================================================
   Avinvesh LLP — corporate site.
   Palette derived from the supplied Avinvesh logo: navy #0b2a63 and accent
   #0d6efd on a near-white ground. Light-committed — the artwork was drawn for
   white, and on a dark ground its navy half disappears.
   ========================================================================== */

:root {
  --bg: #f8fafd;
  --s1: #ffffff;
  --s2: #f1f5fb;
  --s3: #e7eef8;
  --line: #e3e8f0;
  --line-2: #ccd6e4;
  --text: #0f1b2d;
  --muted: #4b5563;
  --faint: #6b7688;
  --brand: #0d6efd;
  --brand-deep: #0b2a63;
  --up: #0a7c55;
  --cyan: #0e7490;
  --violet: #6d3fd4;
  --grad: linear-gradient(90deg, var(--brand), var(--brand-deep));
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: color-mix(in oklab, var(--brand) 22%, transparent); }

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--s2); color: var(--text); padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: var(--r); text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- shared section furniture ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--brand); margin: 0 0 14px;
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.6px; }

.section { padding: 96px 24px; border-top: 1px solid var(--line); }
.section.alt { background: linear-gradient(180deg, var(--s1), var(--bg)); }
.section-in { max-width: var(--wrap); margin: 0 auto; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .two-col h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; line-height: 1.15; }
.section-sub, .body { color: var(--muted); font-size: 16px; margin: 16px 0 0; max-width: 62ch; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; height: 76px; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { display: block; }
.brand-mark { height: 46px; width: auto; }
.word { font-size: 18px; font-weight: 700; letter-spacing: -0.4px; }
.word b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-suffix {
  align-self: center;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 1px;
  color: var(--faint); border: 1px solid var(--line-2); border-radius: 100px; padding: 2px 7px;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 8px 13px; border-radius: var(--r); transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--s2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 12px 22px; border-radius: var(--r); border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--grad); color: #ffffff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(11, 42, 99, .22); }
.btn-ghost { background: var(--s2); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--s3); border-color: var(--faint); }
.nav-cta { padding: 9px 15px; font-size: 13px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 108px 24px 88px; overflow: hidden; }
.hero-in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 6vw, 68px); font-weight: 800; line-height: 1.04;
  letter-spacing: -2px; margin: 0 0 24px;
}
.lede { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 66ch; margin: 0 0 32px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero-glow {
  position: absolute; top: -320px; right: -220px; width: 780px; height: 780px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 110, 253, .10), rgba(11, 42, 99, .04) 45%, transparent 70%);
  pointer-events: none;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--s1); border: 1px solid var(--line); color: var(--muted);
  font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 100px;
}
.pill .pd { width: 6px; height: 6px; border-radius: 50%; flex: none; }

/* ---------- pipeline strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--s1); padding: 44px 24px; }
.strip-in { max-width: var(--wrap); margin: 0 auto; }
.pipeline {
  display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0 0 4px;
  overflow-x: auto; scrollbar-width: thin;
}
.pipeline li {
  position: relative; flex: none;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .3px;
  color: var(--muted); padding: 8px 22px 8px 0; white-space: nowrap;
}
.pipeline li::after {
  content: '→'; color: var(--faint); position: absolute; right: 6px; top: 8px;
}
.pipeline li:last-child { color: var(--brand); padding-right: 0; }
.pipeline li:last-child::after { content: none; }
.strip-note { color: var(--faint); font-size: 13.5px; margin: 10px 0 0; max-width: 70ch; }

/* ---------- capability grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; background: var(--s1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 24px 22px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(11, 42, 99, .07); }
.card .tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: #ffffff;
  background: var(--grad); margin-bottom: 16px;
}
.card h3 { font-size: 16.5px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-size: 11.5px; font-weight: 500; color: var(--faint);
  background: var(--s3); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px;
}
.chips.wide li { font-size: 12.5px; padding: 6px 12px; color: var(--muted); }

/* ---------- focus ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.focus-card {
  position: relative; background: var(--s1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 24px 24px; overflow: hidden;
}
.focus-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .8;
}
.focus-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.status {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; padding: 5px 10px; border-radius: 100px; border: 1px solid;
}
.s-live { color: var(--up); border-color: color-mix(in oklab, var(--up) 40%, transparent); background: color-mix(in oklab, var(--up) 10%, transparent); }
.s-dev { color: var(--brand); border-color: color-mix(in oklab, var(--brand) 40%, transparent); background: color-mix(in oklab, var(--brand) 10%, transparent); }
.s-res { color: var(--violet); border-color: color-mix(in oklab, var(--violet) 40%, transparent); background: color-mix(in oklab, var(--violet) 10%, transparent); }
.focus-card .num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--s3); }
.focus-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.focus-card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--brand); text-decoration: none;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- research two-column ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.fields { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 26px 0 0; padding: 0; }
.fields li {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 13px; background: var(--s1);
}

/* ---------- governance ---------- */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note { border-left: 2px solid var(--brand); padding: 4px 0 4px 20px; }
.note h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.note p { color: var(--muted); font-size: 14px; margin: 0; }

.objects {
  margin-top: 40px; background: var(--s1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 22px;
}
.objects summary {
  cursor: pointer; font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted); list-style: none;
}
.objects summary::-webkit-details-marker { display: none; }
.objects summary::before { content: '+ '; color: var(--brand); }
.objects[open] summary::before { content: '– '; }
.objects p { color: var(--faint); font-size: 13px; line-height: 1.75; margin: 16px 0 0; }

/* ---------- contact ---------- */
.contact { background: linear-gradient(180deg, var(--bg), var(--s1)); }
.contact-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.contact-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.contact-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s ease;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:not(.static):hover { background: var(--s2); }
.contact-row .k { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: .2px; }
.contact-row .v { font-family: var(--mono); font-size: 13.5px; color: var(--text); text-align: right; }
.contact-row address { font-style: normal; line-height: 1.55; }
.contact-row .v.muted { color: var(--muted); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 44px 24px; background: var(--bg); }
.foot-in { max-width: var(--wrap); margin: 0 auto; display: grid; gap: 26px; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-lockup { display: block; width: 300px; max-width: 100%; height: auto; margin-left: -18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { color: var(--muted); font-size: 13px; text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-legal { color: var(--faint); font-size: 12px; margin: 0; max-width: 80ch; }
.foot-copy { display: block; margin-top: 10px; color: var(--faint); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid, .notes { grid-template-columns: repeat(2, 1fr); }
  .focus-grid { grid-template-columns: 1fr; }
  .two-col, .contact-in { grid-template-columns: 1fr; gap: 44px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 68px 20px; }
  .hero { padding: 72px 20px 60px; }
  .grid, .notes { grid-template-columns: 1fr; }
  .nav-in { padding: 0 16px; gap: 12px; }
  .brand-mark { height: 34px; }
  .brand-suffix {
  align-self: center; display: none; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
  .foot { padding: 36px 20px; }
}
