/* =========================================================
   UNOMIA LABS — BIO-GEOMETRIC LAB (v2 — distinctive type stack)
   Design system: dark-mode forward, slate-blue + molten gold + bio-teal
   Type pairing: Newsreader (display, optical-sized editorial serif),
                 Manrope (geometric humanist sans),
                 Space Mono (retro-futuristic instrument readout)
   ========================================================= */

:root {
  /* Core palette — derived from the slate-blue of the logo */
  --bg-0: #07090E;          /* deep void */
  --bg-1: #0E1420;          /* primary canvas */
  --bg-2: #141A28;          /* panel */
  --bg-3: #1A2030;          /* raised panel */
  --line: rgba(202,214,235,.10);
  --line-strong: rgba(202,214,235,.18);

  --slate-100: #eaf0fb;
  --slate-200: #c8d2e6;
  --slate-300: #9aa6bf;
  --slate-400: #6b7891;
  --slate-500: #4a5468;
  --slate-600: #313b4f;
  --slate-700: #1f273a;

  /* Logo-harmonized brand slate */
  --brand-slate: #495876;
  --brand-slate-lift: #6a7896;

  /* Luminous accents:
       gold     — phi/Fibonacci "golden" reference; warm,
                  contrasts the cool slate, signals signal
       teal     — bio-luminescent; secondary state, "life"
       ember    — alarm / important state (rarely used) */
  --accent-gold: #d9b061;
  --accent-gold-hi: #f0c97a;
  --accent-teal: #5cd4c2;
  --accent-teal-hi: #8ef4e1;
  --accent-ember: #e07a5f;

  /* Effective semantic */
  --fg: var(--slate-100);
  --fg-dim: var(--slate-300);
  --fg-faint: var(--slate-400);
  --accent: var(--accent-gold);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;

  --font-sans: 'Manrope', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --font-display: 'Newsreader', 'Manrope', Georgia, serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

/* Optional light mode */
html[data-theme="light"] {
  --bg-0: #ECE6D5;
  --bg-1: #F7F4EF;
  --bg-2: #EFEADD;
  --bg-3: #E6DEC9;
  --line: rgba(40,55,80,.16);
  --line-strong: rgba(40,55,80,.28);
  --fg: #0E1420;
  --fg-dim: #2A3346;     /* deeper for body text — WCAG-friendly on cream */
  --fg-faint: #56607A;   /* stats labels / eyebrows */
  --accent-gold: #B8922A;
  --accent-gold-hi: #D5AC3A;
  --accent-teal: #1e8a78;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-1);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--accent-gold); color: var(--bg-0); }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; letter-spacing: 0; }

/* ===== ambient layers ===== */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  opacity: .35; mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1.5px 1.5px;
}

#spiral-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: .55;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(800px 600px at 75% 12%, rgba(217,176,97,.10), transparent 60%),
    radial-gradient(900px 700px at 15% 90%, rgba(92,212,194,.08), transparent 60%),
    linear-gradient(180deg, rgba(7,9,14,0) 0%, rgba(7,9,14,.4) 100%);
}
/* In light mode, kill the dark bottom-vignette that was bleeding into the
   footer and dim the radial tints so the cream stays readable. */
html[data-theme="light"] body::before {
  background:
    radial-gradient(900px 700px at 80% 8%, rgba(184,146,42,.06), transparent 60%),
    radial-gradient(1000px 800px at 10% 88%, rgba(184,146,42,.04), transparent 60%);
}

/* fine grid hairlines for the whole page */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(202,214,235,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(202,214,235,.025) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.1) 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.1) 60%, transparent);
}

main, .nav, .footer { position: relative; z-index: 3; }

/* ===== cursor ring ===== */
.cursor-ring {
  position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 50; pointer-events: none;
  mix-blend-mode: screen;
}
.cursor-ring span {
  position: absolute; left: -16px; top: -16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(217,176,97,.6);
  transition: transform .35s var(--ease), border-color .25s var(--ease), opacity .35s var(--ease);
}
.cursor-ring.is-hover span { transform: scale(1.9); border-color: rgba(92,212,194,.65); }
@media (hover: none), (max-width: 720px) { .cursor-ring { display: none; } }

/* ===== nav ===== */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter);
  background: var(--nav-bg, linear-gradient(to bottom, rgba(7,9,14,.85), rgba(7,9,14,.55) 70%, rgba(7,9,14,0)));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
html[data-theme="light"] {
  --nav-bg: linear-gradient(to bottom, rgba(247,244,239,.92), rgba(247,244,239,.65) 70%, rgba(247,244,239,0));
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--fg);
  letter-spacing: .12em; font-weight: 600;
}
.nav__mark { width: 28px; height: 28px; color: var(--accent-gold); flex: 0 0 28px; }
.nav__word { font-size: 13px; }
.nav__word em { color: var(--accent-gold); font-style: normal; font-weight: 500; }

.nav__links {
  display: flex; gap: 28px; justify-content: center;
  font-size: 13.5px; color: var(--fg-dim);
}
.nav__links a {
  position: relative; padding: 6px 2px;
  transition: color .25s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent-gold);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s var(--ease-out);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--fg-faint);
}
.nav__meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 0 0 rgba(92,212,194,.6);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(92,212,194,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(92,212,194,0); }
  100% { box-shadow: 0 0 0 0 rgba(92,212,194,0); }
}
.nav__toggle {
  background: transparent; border: 1px solid var(--line);
  color: var(--fg-dim); width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .35s var(--ease);
}
.nav__toggle:hover { color: var(--accent-gold); border-color: var(--accent-gold); transform: rotate(45deg); }

/* mobile nav */
@media (max-width: 880px) {
  .nav { grid-template-columns: auto auto; gap: 16px; }
  .nav__links { display: none; }
}

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line-strong);
  transition: transform .2s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--accent-gold);
  color: #1c1306;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 28px -8px rgba(217,176,97,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:hover { background: var(--accent-gold-hi); }
.btn--ghost {
  background: transparent; color: var(--fg);
  border-color: var(--fg);
  border-width: 1.25px;
}
.btn--ghost:hover {
  background: var(--fg);
  color: var(--bg-1);
}
.btn--full { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .65; cursor: default; transform: none; }

/* ===== eyebrow ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--fg-faint);
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.015);
}
.eyebrow__tick {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(217,176,97,.7);
}

/* ===== HERO ===== */
.hero {
  padding: 80px var(--gutter) 0;
  max-width: var(--maxw); margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  min-height: 78vh;
  padding-top: 24px;
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; max-width: 620px; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  font-variation-settings: "opsz" 72;
}
.hero__title span {
  display: block;
  opacity: 0; transform: translateY(14px);
  animation: rise .9s var(--ease-out) forwards;
}
.hero__title span:nth-child(1) { animation-delay: .15s; }
.hero__title span:nth-child(2) { animation-delay: .35s; color: var(--fg-dim); }
.hero__title span:nth-child(3) { animation-delay: .55s; }
.hero__title em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(90deg, var(--accent-gold-hi), var(--accent-teal-hi));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.hero__lede {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--fg-dim);
  max-width: 56ch;
  line-height: 1.65;
  margin: 0;
}
.hero__lede strong { color: var(--fg); font-weight: 500; }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px; margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero__stats div { display: flex; flex-direction: column; gap: 6px; }
.hero__stats dt {
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--fg-faint);
}
.hero__stats dd {
  margin: 0; font-family: var(--font-display);
  font-size: 28px; font-weight: 400;
  color: var(--fg);
  font-variation-settings: "opsz" 36;
}

/* ===== hero viz ===== */
.hero__viz {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
}
#hero-spiral {
  width: 100%; height: 100%;
  filter: drop-shadow(0 6px 60px rgba(217,176,97,.18));
  animation: floaty 12s ease-in-out infinite alternate;
}
@keyframes floaty {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-8px) rotate(-1.2deg); }
}
#nucleus {
  filter: drop-shadow(0 0 8px var(--accent-gold));
  animation: nucleus 2.4s ease-in-out infinite;
}
@keyframes nucleus {
  0%, 100% { r: 3; opacity: 1; }
  50%      { r: 5; opacity: .7; }
}
.viz__readout {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; gap: 16px;
  padding: 10px 14px;
  background: rgba(11,15,23,.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px; color: var(--fg-dim);
  backdrop-filter: blur(8px);
}
.viz__readout div { display: flex; gap: 6px; align-items: baseline; }
.viz__readout span { color: var(--fg-faint); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.viz__readout b { color: var(--accent-gold); font-weight: 500; }

.hero__marquee {
  margin: 70px calc(var(--gutter) * -1) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(255,255,255,.012), rgba(255,255,255,0));
}
.marquee__track {
  display: inline-flex; gap: 36px; white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px); color: var(--fg-dim);
}
.marquee__track .sep { color: var(--accent-gold); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .hero__viz { max-width: 520px; margin: 0 auto; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== section heads =====
   Layout: eyebrow on top-left, title beneath it on the left, lede paragraph
   to the right of the title (both aligned at the top of the title row).  */
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "index  .   "
    "title  lede";
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: clamp(20px, 3vw, 32px);
  align-items: start;
  padding: 0 var(--gutter);
  max-width: var(--maxw); margin: 0 auto 56px;
}
.section__index {
  grid-area: index;
  font-size: 11.5px;
  color: var(--fg-faint);
  text-transform: uppercase; letter-spacing: .14em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  width: fit-content; min-width: 180px;
}
.section__title {
  grid-area: title;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  font-variation-settings: "opsz" 60;
}
.section__title em {
  font-style: italic; font-weight: 400; color: var(--accent-gold);
}
.section__lede {
  grid-area: lede;
  align-self: start;
  font-size: 16px; color: var(--fg-dim);
  max-width: 64ch; line-height: 1.65; margin: 0;
  padding-top: 6px;       /* small optical adjust so lede top sits at title cap-height */
}
.link-soft {
  border-bottom: 1px dashed var(--accent-gold);
  color: var(--fg); cursor: help;
  position: relative;
}
.link-soft:hover::before {
  content: attr(data-tip);
  position: absolute; left: 0; top: calc(100% + 8px);
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 10px;
  font-size: 12px; color: var(--fg-dim);
  width: 280px; line-height: 1.45; z-index: 5;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,.6);
}
@media (max-width: 760px) {
  .section__head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "index"
      "title"
      "lede";
  }
  .section__lede { padding-top: 0; }
}

/* ===== sections base spacing ===== */
.philosophy, .ventures, .capabilities, .lab, .contact {
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(40px, 8vh, 80px);
}

/* ===== Philosophy ===== */
.principles {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 var(--gutter);
  max-width: var(--maxw); margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.principle {
  position: relative; padding: 30px 28px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0) 60%), var(--bg-1);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 320px;
  transition: background .35s var(--ease);
  overflow: hidden;
}
.principle:hover {
  background: linear-gradient(180deg, rgba(217,176,97,.05), rgba(255,255,255,0) 60%), var(--bg-2);
}
.principle__num {
  font-size: 11px; color: var(--accent-gold);
  letter-spacing: .18em;
}
.principle h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; line-height: 1.15;
  margin: 0; letter-spacing: -0.01em;
}
.principle p { color: var(--fg-dim); font-size: 14.5px; line-height: 1.6; margin: 0; flex-grow: 1; }
.principle__glyph {
  width: 92px; height: 92px;
  color: var(--slate-400);
  margin-top: 8px; align-self: flex-start;
  opacity: .85;
  transition: transform .8s var(--ease-out), opacity .35s var(--ease);
}
.principle:hover .principle__glyph { transform: rotate(8deg) scale(1.05); opacity: 1; color: var(--slate-200); }

@media (max-width: 1100px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .principles { grid-template-columns: 1fr; }
}

/* ===== Ventures ===== */
.ventures__grid {
  display: grid; grid-template-columns: 1.2fr 1.2fr .8fr;
  gap: 18px;
  padding: 0 var(--gutter);
  max-width: var(--maxw); margin: 0 auto;
}
.venture {
  position: relative; padding: 28px 28px 26px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 520px;
  overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .35s var(--ease), background .35s var(--ease);
}
.venture::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 0% 0%, rgba(217,176,97,.08), transparent 60%);
  pointer-events: none; opacity: 0;
  transition: opacity .5s var(--ease);
}
.venture:hover { transform: translateY(-4px); border-color: rgba(217,176,97,.35); }
.venture:hover::before { opacity: 1; }

.venture--mdrm::after, .venture--puente::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(92,212,194,.10), transparent 70%);
  pointer-events: none;
}
.venture--puente::after { background: radial-gradient(closest-side, rgba(217,176,97,.10), transparent 70%); }

.venture__chrome {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; color: var(--fg-faint); letter-spacing: .14em;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.dot-live { color: var(--accent-teal); }
.dot-stealth { color: var(--fg-faint); }

.venture__id { display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.venture__mark { width: 56px; height: 56px; color: var(--slate-300); flex: 0 0 56px; }
.venture h3 {
  font-family: var(--font-display); font-weight: 300;
  font-size: 38px; line-height: 1; margin: 0;
  letter-spacing: -0.02em;
}
.venture h3 em {
  font-style: italic; font-weight: 500;
  color: var(--accent-gold);
}
.venture--puente h3 em { color: var(--accent-teal); }

.venture__line {
  font-size: 14.5px; color: var(--fg);
  margin: 0; font-weight: 500;
}
.venture__body { font-size: 14px; color: var(--fg-dim); line-height: 1.62; margin: 0; flex-grow: 1; }

.venture__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 0;
}
.venture__tags li {
  font-size: 10.5px; color: var(--fg-dim);
  padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255,255,255,.02);
}
.venture__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent-gold);
  align-self: flex-start; padding-top: 6px;
  border-bottom: 1px solid transparent;
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.venture__link:hover { gap: 12px; border-bottom-color: var(--accent-gold); }

.venture--stealth { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }
.venture--stealth h3 { color: var(--fg-faint); font-size: 30px; letter-spacing: .25em; }

@media (max-width: 1100px) { .ventures__grid { grid-template-columns: 1fr 1fr; } .venture--stealth { grid-column: 1 / -1; } }
@media (max-width: 700px) { .ventures__grid { grid-template-columns: 1fr; } .venture--stealth { grid-column: auto; } }

/* ===== Capabilities table ===== */
.cap__table {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; flex-direction: column;
}
.cap__row {
  display: grid;
  grid-template-columns: 60px 1.2fr 2fr 140px;
  gap: 24px; align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease), padding .35s var(--ease);
}
.cap__row--head {
  font-size: 10.5px; color: var(--fg-faint);
  text-transform: uppercase; letter-spacing: .16em;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line-strong);
}
.cap__row:not(.cap__row--head):hover {
  background: rgba(217,176,97,.04);
  padding-left: 14px;
}
.cap__num { color: var(--accent-gold); font-size: 12px; }
.cap__name { font-family: var(--font-display); font-weight: 400; font-size: 19px; letter-spacing: -0.01em; }
.cap__scope { color: var(--fg-dim); font-size: 14.5px; line-height: 1.55; }
.cap__status { color: var(--accent-teal); font-size: 11.5px; letter-spacing: .08em; text-align: right; }

@media (max-width: 820px) {
  .cap__row { grid-template-columns: 50px 1fr; gap: 12px; padding: 18px 4px; }
  .cap__row--head { display: none; }
  .cap__scope { grid-column: 1 / -1; padding-left: 62px; }
  .cap__status { grid-column: 2 / 3; text-align: left; }
}

/* ===== Lab notes ===== */
.lab__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
}
.note {
  position: relative;
  padding: 26px 26px 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 240px;
  transition: transform .35s var(--ease-out), border-color .3s var(--ease), background .3s var(--ease);
}
.note:hover { transform: translateY(-3px); border-color: var(--accent-gold); background: var(--bg-3); }
.note__head {
  font-size: 10.5px; color: var(--fg-faint); letter-spacing: .14em;
  display: flex; justify-content: space-between;
}
.note h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 21px; line-height: 1.18; margin: 0; letter-spacing: -0.01em;
}
.note p { color: var(--fg-dim); font-size: 14px; line-height: 1.55; margin: 0; flex-grow: 1; }
.note__arrow {
  align-self: flex-end; font-size: 22px; color: var(--accent-gold);
  transition: transform .35s var(--ease);
}
.note:hover .note__arrow { transform: translateX(6px); }

@media (max-width: 900px) { .lab__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .lab__grid { grid-template-columns: 1fr; } }

/* ===== Contact ===== */
.contact__inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  align-items: start;
}
.contact__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1; margin: 18px 0;
  letter-spacing: -0.018em;
}
.contact__title em { color: var(--accent-gold); font-style: italic; font-weight: 400; }
.contact__lede { color: var(--fg-dim); font-size: 15px; line-height: 1.65; }
.contact__chan {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-direction: column;
}
.contact__chan li {
  display: grid; grid-template-columns: 96px 1fr;
  gap: 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.contact__chan li:last-child { border-bottom: 1px solid var(--line); }
.contact__chan span { color: var(--fg-faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.contact__chan a { color: var(--fg); transition: color .2s var(--ease); }
.contact__chan a:hover { color: var(--accent-gold); }

.contact__form {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.contact__form::before {
  content: "TRANSMIT / 001"; position: absolute; top: -10px; left: 20px;
  background: var(--bg-1); padding: 2px 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-faint); letter-spacing: .16em;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact__form label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-faint); letter-spacing: .14em; text-transform: uppercase;
}
.contact__form input, .contact__form textarea, .contact__form select {
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--fg); background: var(--bg-1);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px;
  letter-spacing: 0; text-transform: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  outline: none;
}
.contact__form input:focus, .contact__form textarea:focus, .contact__form select:focus {
  border-color: var(--accent-gold);
  background: var(--bg-3);
  box-shadow: 0 0 0 4px rgba(217,176,97,.08);
}
.contact__form textarea { resize: vertical; min-height: 100px; font-family: var(--font-sans); }
.form__fine { color: var(--fg-faint); font-size: 10.5px; letter-spacing: .12em; }

@media (max-width: 880px) {
  .contact__inner { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.footer {
  margin-top: 80px;
  padding: 60px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg, linear-gradient(180deg, rgba(7,9,14,.4), rgba(7,9,14,.9)));
  color: var(--footer-fg, var(--fg));
}
html[data-theme="light"] {
  --footer-bg: #0E1420;       /* solid brand dark ink */
  --footer-fg: #F7F4EF;       /* canonical cream on dark */
}
/* Footer needs its own contrast scale when bg is dark + page is light. */
html[data-theme="light"] .footer { border-top: none; }
html[data-theme="light"] .footer__tag,
html[data-theme="light"] .footer__cols a,
html[data-theme="light"] .footer__bottom a { color: rgba(247,244,239,.78); }
html[data-theme="light"] .footer__cols h4,
html[data-theme="light"] .footer__bottom { color: rgba(247,244,239,.55); }
html[data-theme="light"] .footer__cols a:hover,
html[data-theme="light"] .footer__bottom a:hover { color: var(--accent-gold-hi); }
html[data-theme="light"] .footer .footer__top { border-bottom-color: rgba(247,244,239,.14); }
.footer__top {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 2fr;
  gap: clamp(28px, 5vw, 60px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__logo {
  width: 200px; height: auto;
  filter: invert(.94) hue-rotate(180deg) brightness(1.05) saturate(.6);
  opacity: .85;
}
.footer__tag { color: var(--fg-dim); font-size: 13.5px; line-height: 1.55; max-width: 38ch; }

.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 {
  font-size: 10.5px; color: var(--fg-faint);
  letter-spacing: .16em; text-transform: uppercase;
  margin: 0 0 14px;
}
.footer__cols ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__cols a { color: var(--fg-dim); font-size: 13.5px; transition: color .2s var(--ease); }
.footer__cols a:hover { color: var(--accent-gold); }

.footer__bottom {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 22px;
  font-size: 11px; color: var(--fg-faint); letter-spacing: .12em;
  flex-wrap: wrap; gap: 12px;
}
.footer__phi { color: var(--accent-gold); }
.footer__bottom a { color: var(--fg-dim); transition: color .2s var(--ease); }
.footer__bottom a:hover { color: var(--accent-gold); }

@media (max-width: 800px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

/* ===== reveal ===== */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── AGAVE OVERRIDES ── */
.nav__mark-img {
  width: 28px; height: 28px; object-fit: contain; flex: 0 0 28px;
  filter: brightness(0) saturate(100%); opacity: 0.8;
}
/* nav mark: invert in dark mode so the dark-on-cream PNG shows light on dark */
html[data-theme="dark"] .nav__mark-img {
  filter: brightness(0) invert(1); opacity: 0.85;
}
.hero__agave-wrap {
  position: relative; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 36px;
}
.hero__agave-stack {
  position: relative; width: 100%;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.hero__agave-img {
  position: absolute;
  width: 100%; height: 100%; object-fit: contain;
  animation: floaty 12s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 60px rgba(184,146,42,.18));
  transition: opacity .4s var(--ease);
}
/* Theme-aware swap between the cream and accent versions */
html[data-theme="light"] .hero__agave-img--dark { opacity: 0; pointer-events: none; }
html[data-theme="dark"]  .hero__agave-img--light { opacity: 0; pointer-events: none; }
.hero__agave-readout {
  display: flex; gap: 16px; padding: 10px 16px;
  background: rgba(244,241,234,.92); border: 1px solid var(--line);
  border-radius: 8px; font-size: 11px; color: var(--fg-dim);
  backdrop-filter: blur(8px); font-family: var(--font-mono);
  align-self: flex-end;
}
html[data-theme="dark"] .hero__agave-readout { background: rgba(11,15,23,.78); }
.hero__agave-readout div { display: flex; gap: 6px; align-items: baseline; }
.hero__agave-readout span { color: var(--fg-faint); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; }
.hero__agave-readout b { color: var(--accent-gold); font-weight: 500; }
.hero__brand-line {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(15px, 1.2vw, 18px); color: var(--accent-gold);
  margin-top: -12px; font-variation-settings: "opsz" 18;
  letter-spacing: 0.01em;
}
/* Footer logo uses the gold-on-navy accent agave PNG — no filter needed */
.footer__logo-img {
  width: 36px; height: 36px; object-fit: contain;
  margin-bottom: 10px;
  border-radius: 4px;
}

/* nav mark sizing for the new PNG */
.nav__mark-img {
  width: 32px; height: 32px; object-fit: contain;
  flex-shrink: 0;
}
