/* ============================================================
   Varys Consulting Group — Design System
   Anchored to brand marks: slate/navy authority (#0F172A),
   electric blue (#3B82F6), Varys Labs teal (#11AAA6) & mint (#20D397).
   Display: Space Grotesk · Body: Inter
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Core palette */
  --blue-900: #0F172A;   /* darkest — dark sections, footer, near-black headings */
  --blue-800: #16213A;
  --blue-700: #3B82F6;   /* PRIMARY — electric blue, authority, buttons/links */
  --blue-600: #60A5FA;
  --teal-500: #11AAA6;   /* ACCENT 1 — signifies "IA / tecnología" */
  --teal-400: #3EC9C5;
  --green-600: #16A34A;
  --green-500: #20D397;  /* ACCENT 2 — signifies "ESG / sostenibilidad" (uso puntual) */

  /* Neutrals */
  --ink-900: #0F172A;    /* near-black, technical text */
  --ink-700: #1E293B;    /* graphite body */
  --ink-500: #64748B;
  --ink-300: #94A3B8;
  --line: #E2E8F0;
  --sand-50: #F8FAFC;    /* cool document ground */
  --sand-100: #EEF2F6;
  --paper: #ffffff;

  /* Functional */
  --bg: var(--paper);
  --bg-alt: var(--sand-50);

  /* Type */
  --display: "Fraunces", "Iowan Old Style", "Georgia", serif;  /* editorial headline face — institutional gravitas */
  --label: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;  /* UI chrome: nav, buttons, labels, numerals */
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.85rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);
  --step-5: clamp(3.2rem, 2.2rem + 5vw, 6rem);

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;
  --radius-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
h3, h4 { font-weight: 600; }
.eyebrow {
  font-family: var(--display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-500);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--teal-500);
  display: inline-block;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 8vw, 7.5rem); }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--blue-900); color: #cfdde6; }
.section--ink h2, .section--ink h3 { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.04em;
  padding: 0.95em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn svg { width: 1em; height: 1em; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--teal-500); color: #fff; }
.btn--primary:hover { background: var(--teal-400); }
.btn--solidblue { background: var(--blue-700); color: #fff; }
.btn--solidblue:hover { background: var(--blue-600); }
.btn--ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--outline { border-color: var(--line); color: var(--ink-900); }
.btn--outline:hover { border-color: var(--blue-700); color: var(--blue-700); }

/* ============================================================
   HEADER  (injected by site.js)
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
  padding-block: 1.1rem;
}
.site-header.scrolled {
  background: rgba(5, 36, 56, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  padding-block: 0.7rem;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { height: 38px; width: auto; }
.brand-word {
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.01em; color: #fff; line-height: 1;
}
.brand-word .v { color: var(--green-500); }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--display); font-size: 0.9rem; font-weight: 500;
  color: rgba(255,255,255,0.82); letter-spacing: 0.01em;
  position: relative; padding-block: 0.3rem;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--teal-400); transition: width 0.3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav .nav-cta {
  padding: 0.6em 1.1em; border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius);
  color: #fff;
}
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: var(--teal-500); border-color: var(--teal-500); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px; z-index: 110; }
.burger span { width: 26px; height: 2px; background: #fff; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; overflow-y: auto;
    background: var(--blue-900); flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 1.6rem; padding: 2rem var(--gutter);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
  }
  .nav.open { transform: translateX(0); }
  .nav a { font-size: 1.1rem; color: #fff; }
}

/* ============================================================
   FOOTER  (injected by site.js)
   ============================================================ */
.site-footer { background: var(--blue-900); color: #aebecb; font-size: var(--step--1); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-block: clamp(3rem, 6vw, 5rem); }
.footer-brand .brand-word { color: #fff; font-size: 1.4rem; }
.footer-brand p { margin-top: 1rem; max-width: 38ch; color: #8ba0b0; line-height: 1.6; }
.footer-col h4 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-400); margin-bottom: 1rem; }
.footer-col a { display: block; padding-block: 0.35rem; color: #aebecb; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-block: 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: #6f8494; }
.footer-bottom .disclaimer { max-width: 70ch; line-height: 1.5; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ============================================================
   HERO  — signature value-chain
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(0,172,172,0.2), transparent 60%),
    radial-gradient(70% 60% at 12% 92%, rgba(32,211,151,0.14), transparent 65%),
    linear-gradient(160deg, var(--blue-900) 0%, var(--blue-800) 55%, #062f48 100%);
  background-size: 140% 140%, 140% 140%, 100% 100%;
  animation: heroDrift 26s ease-in-out infinite alternate;
  color: #fff; overflow: hidden;
  padding-top: 6rem;
}
@keyframes heroDrift {
  0% { background-position: 0% 0%, 0% 100%, 0 0; }
  100% { background-position: 20% 12%, 15% 82%, 0 0; }
}
/* Photo-backed hero */
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(5,36,56,0.94) 0%, rgba(5,36,56,0.82) 38%, rgba(5,36,56,0.45) 70%, rgba(5,36,56,0.30) 100%),
    linear-gradient(180deg, rgba(5,36,56,0.55) 0%, transparent 25%, transparent 55%, rgba(5,36,56,0.75) 100%);
}
.hero--photo .wrap { position: relative; z-index: 2; }
.hero--photo .scroll-cue { z-index: 2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  opacity: 0.5;
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 44ch; }
.hero h1 {
  font-size: var(--step-5); color: #fff; margin-top: 1.5rem;
}
.hero h1 .accent { color: var(--teal-400); }
.hero-lede { margin-top: 1.5rem; font-size: var(--step-1); color: #c4d6e2; line-height: 1.45; max-width: 42ch; }
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  position: relative; z-index: 2; margin-top: clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  overflow: hidden; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  max-width: 940px;
}
.hero-stat { background: rgba(5,36,56,0.55); padding: 1.4rem 1.5rem; }
.hero-stat .num { font-family: var(--display); font-size: var(--step-2); font-weight: 600; color: #fff; }
.hero-stat .num .unit { color: var(--teal-400); }
.hero-stat .lbl { font-size: var(--step--1); color: #c4d2dc; margin-top: 0.3rem; letter-spacing: 0.02em; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 2.5rem; }
  .hero { padding-top: 6rem; padding-bottom: 3rem; min-height: 92svh; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
  .hero-stat { padding: 1.1rem 1.2rem; }
  .hero-stat .num { font-size: var(--step-1); }
}
@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr; }
}

/* ---------- Scroll cue ---------- */
.scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.5); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; font-family: var(--display); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.scroll-cue::after { content: ""; width: 1px; height: 36px; background: linear-gradient(rgba(255,255,255,0.5), transparent); animation: cue 2s var(--ease) infinite; }
@media (max-width: 900px) { .scroll-cue { display: none; } }
@keyframes cue { 0% { opacity: 0; transform: scaleY(0.3); transform-origin: top; } 50% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; } }

/* ============================================================
   THESIS  — single-line proposition + supporting
   ============================================================ */
.thesis-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.thesis-statement { font-family: var(--display); font-size: var(--step-3); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink-900); }
.thesis-statement .hl { color: var(--blue-700); }
.thesis-body p { color: var(--ink-500); margin-bottom: 1.1rem; }
.thesis-body p:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .thesis-grid { grid-template-columns: 1fr; gap: 1.8rem; } .thesis-statement { font-size: var(--step-2); } }

/* General mobile rhythm */
@media (max-width: 820px) {
  .section { padding-block: clamp(3rem, 11vw, 4.5rem); }
  .proof-grid { gap: 2rem 1.5rem; }
  .proof-num { font-size: var(--step-2); }
  .certs { gap: 0.8rem 1.6rem; }
}

/* ============================================================
   VALUE CHAIN  — signature element
   ============================================================ */
.chain { position: relative; margin-top: 3.5rem; }
.chain-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.chain-line { position: absolute; top: 46px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--teal-500), var(--green-500)); z-index: 0; }
.chain-line::after { content: ""; position: absolute; inset: 0; background: var(--blue-900); transform-origin: left; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { transform: scaleX(0); } }
.chain-node { position: relative; z-index: 1; text-align: center; padding-inline: 0.8rem; }
.chain-dot { width: 92px; height: 92px; margin: 0 auto 1.4rem; border-radius: 50%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.16); display: grid; place-items: center; color: var(--teal-400); }
.chain-dot svg { width: 38px; height: 38px; }
.chain-node:last-child .chain-dot { color: var(--green-500); border-color: rgba(61,169,61,0.4); }
.chain-step { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-400); }
.chain-title { font-family: var(--display); font-size: var(--step-1); font-weight: 600; color: #fff; margin-top: 0.4rem; }
.chain-desc { color: #9fb4c2; font-size: var(--step--1); margin-top: 0.5rem; line-height: 1.5; }
.chain-trace { margin-top: 2.5rem; text-align: center; font-family: var(--display); font-size: var(--step--1); letter-spacing: 0.06em; color: #7f96a6; }
.chain-trace span { color: var(--teal-400); }
@media (max-width: 820px) {
  .chain-track { grid-template-columns: 1fr; gap: 0; }
  .chain-line { display: none; }
  .chain-node {
    display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem;
    text-align: left; align-items: start; padding: 1.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .chain-node:last-child { border-bottom: 0; }
  .chain-dot {
    margin: 0; width: 64px; height: 64px; grid-row: span 3;
    align-self: center;
  }
  .chain-dot svg { width: 28px; height: 28px; }
  .chain-step { grid-column: 2; }
  .chain-title { grid-column: 2; margin-top: 0.1rem; }
  .chain-desc { grid-column: 2; margin-top: 0.4rem; max-width: 38ch; }
  .chain { margin-top: 2rem; }
  .chain-trace { margin-top: 1.8rem; text-align: left; }
}

/* ============================================================
   NODES PREVIEW  cards
   ============================================================ */
.nodes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.node-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem 1.8rem; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); position: relative; overflow: hidden; }
.node-card::before { content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 100%; background: var(--teal-500); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.node-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(5,36,56,0.1); border-color: transparent; }
.node-card:hover::before { transform: scaleX(1); }
.node-tag { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-300); }
.node-card h3 { font-size: var(--step-1); margin-top: 0.5rem; }
.node-loc { font-size: var(--step--1); color: var(--teal-500); font-family: var(--display); margin-top: 0.2rem; }
.node-card p { color: var(--ink-500); font-size: var(--step--1); margin-top: 1rem; }
.node-role { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--display); font-size: 0.8rem; font-weight: 500; color: var(--blue-700); }
@media (max-width: 820px) { .nodes-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PROOF  — credibility band
   ============================================================ */
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.proof-item { text-align: left; }
.proof-num { font-family: var(--display); font-size: var(--step-3); font-weight: 600; color: #fff; line-height: 1; }
.proof-num .unit { color: var(--teal-400); font-size: 0.55em; }
.proof-lbl { color: #9fb4c2; margin-top: 0.7rem; font-size: var(--step--1); line-height: 1.45; }
@media (max-width: 820px) { .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; } }

/* ---------- Certifications strip ---------- */
.certs { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.certs .certs-label { font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: #6f8494; }
.cert-pill { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: #fff; letter-spacing: 0.04em; opacity: 0.9; }

/* ============================================================
   ESG teaser
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-copy h2 { font-size: var(--step-3); }
.split-copy p { color: var(--ink-500); margin-top: 1.2rem; }
.esg-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.esg-kpi { background: var(--paper); padding: 1.6rem; }
.esg-kpi .k-num { font-family: var(--display); font-size: var(--step-2); font-weight: 600; color: var(--blue-700); }
.esg-kpi .k-lbl { font-size: var(--step--1); color: var(--ink-500); margin-top: 0.3rem; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band { background: linear-gradient(135deg, var(--blue-700), var(--teal-500)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.cta-band h2 { color: #fff; font-size: var(--step-3); max-width: 20ch; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,0.85); margin-top: 1rem; max-width: 52ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ============================================================
   Scroll reveal
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }

/* ============================================================
   INTERNAL PAGE HERO  (compact, for sub-pages)
   ============================================================ */
.page-hero {
  position: relative; background:
    radial-gradient(110% 120% at 85% 0%, rgba(0,172,172,0.16), transparent 55%),
    linear-gradient(160deg, var(--blue-900) 0%, var(--blue-800) 100%);
  color: #fff; padding-top: clamp(8rem, 14vw, 11rem); padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  opacity: 0.5;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1, .page-hero h2 { color: #fff; }
.page-hero h1 { font-size: var(--step-4); max-width: 18ch; margin-top: 1.2rem; }
.page-hero .page-lede { margin-top: 1.4rem; font-size: var(--step-1); color: #c4d6e2; max-width: 56ch; line-height: 1.5; }

/* Breadcrumb-ish position indicator */
.page-index { font-family: var(--display); font-size: var(--step--1); color: var(--teal-400); letter-spacing: 0.06em; }

/* ============================================================
   STAT ROW (reusable band of figures)
   ============================================================ */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat-cell { background: var(--paper); padding: 1.8rem; }
.stat-cell .s-num { font-family: var(--display); font-size: var(--step-3); font-weight: 600; color: var(--blue-700); line-height: 1; }
.stat-cell .s-num .unit { color: var(--teal-500); font-size: 0.5em; }
.stat-cell .s-lbl { color: var(--ink-500); margin-top: 0.6rem; font-size: var(--step--1); line-height: 1.45; }
.stat-cell .s-src { color: var(--ink-300); margin-top: 0.5rem; font-size: 0.72rem; font-family: var(--display); letter-spacing: 0.02em; }
.section--ink .stat-row { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.12); }
.section--ink .stat-cell { background: rgba(255,255,255,0.03); }
.section--ink .stat-cell .s-num { color: #fff; }
.section--ink .stat-cell .s-lbl { color: #aebecb; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }

/* ============================================================
   PROSE BLOCK (lede + columns)
   ============================================================ */
.lead-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.lead-grid h2 { font-size: var(--step-3); }
.lead-body p { color: var(--ink-500); margin-bottom: 1.1rem; }
.lead-body p:last-child { margin-bottom: 0; }
.lead-body strong { color: var(--ink-900); font-weight: 600; }
@media (max-width: 820px) { .lead-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ============================================================
   FEATURE LIST (advantages)
   ============================================================ */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.feature { padding: 1.8rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.feature .f-icon { width: 46px; height: 46px; border-radius: 10px; background: rgba(0,172,172,0.1); display: grid; place-items: center; color: var(--teal-500); margin-bottom: 1.2rem; }
.feature .f-icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: var(--step-1); }
.feature p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.6rem; }
@media (max-width: 820px) { .feature-list { grid-template-columns: 1fr; } }

/* ============================================================
   COMPARISON TABLE (moat)
   ============================================================ */
.compare { width: 100%; border-collapse: collapse; margin-top: 2.5rem; font-size: var(--step--1); }
.compare th, .compare td { text-align: left; padding: 1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.1); vertical-align: top; }
.compare thead th { font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8ba0b0; font-weight: 500; }
.compare thead th:last-child { color: var(--teal-400); }
.compare tbody th { font-weight: 500; color: #cfdde6; }
.compare td { color: #9fb4c2; }
.compare td:last-child { color: #fff; }
.compare tbody tr:hover { background: rgba(255,255,255,0.03); }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) { .compare { min-width: 560px; } }

/* ============================================================
   HORIZONTAL FLOW DIAGRAM (Platform) — production-chain style
   ============================================================ */
.flowx { margin-top: 3rem; }

/* Station rail */
.flowx-rail { display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; position: relative; gap: 0; }
.flowx-station {
  position: relative; text-align: center; padding: 1.6rem 1rem 1.8rem;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 1;
}
.flowx-station + .flowx-station { margin-left: 26px; }
.flowx-station:hover { background: rgba(0,172,172,0.06); border-color: rgba(0,172,172,0.3); }
.flowx-station.active { background: rgba(0,172,172,0.1); border-color: var(--teal-400); transform: translateY(-3px); }
.flowx-station:last-child.active { border-color: var(--green-500); background: rgba(61,169,61,0.1); }

/* Arrow between stations */
.flowx-station:not(:last-child)::after {
  content: ""; position: absolute; right: -26px; top: 50%; width: 26px; height: 2px;
  background: rgba(0,172,172,0.35); z-index: 0;
}
.flowx-station:not(:last-child)::before {
  content: ""; position: absolute; right: -12px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 8px; height: 8px; border-top: 2px solid var(--teal-400); border-right: 2px solid var(--teal-400);
  z-index: 2;
}

.flowx-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.16);
  display: grid; place-items: center; color: var(--teal-400);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.flowx-icon svg { width: 30px; height: 30px; }
.flowx-station.active .flowx-icon { transform: scale(1.06); border-color: var(--teal-400); }
.flowx-station:last-child.active .flowx-icon { color: var(--green-500); border-color: var(--green-500); }
.flowx-id { font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-400); }
.flowx-name { font-family: var(--display); font-size: var(--step-1); font-weight: 600; color: #fff; margin-top: 0.5rem; line-height: 1.1; }
.flowx-loc { font-size: var(--step--1); color: #8ba0b0; margin-top: 0.25rem; }

/* Animated pulse travelling the rail */
.flowx-pulse-track { position: relative; height: 2px; margin: 1.6rem 6% 0; background: linear-gradient(90deg, var(--teal-500), var(--green-500)); border-radius: 2px; overflow: hidden; }
.flowx-pulse-track::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent); animation: pulseflow 3.2s linear infinite; }
@keyframes pulseflow { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

/* Detail panel — always visible, swaps with active station */
.flowx-detail {
  margin-top: 2rem; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  background: rgba(5,36,56,0.5); overflow: hidden;
}
.flowx-detail-head { padding: 1.5rem 1.8rem 0; }
.flowx-detail-summary { color: #c4d6e2; font-size: var(--step-0); line-height: 1.55; max-width: 70ch; padding: 0 1.8rem 1.5rem; }
.flowx-io { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1); }
.flowx-io-cell { background: rgba(5,36,56,0.7); padding: 1.4rem 1.8rem; }
.flowx-io-cell h4 { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-400); margin-bottom: 0.6rem; font-weight: 500; }
.flowx-io-cell p { color: #aebecb; font-size: var(--step--1); line-height: 1.5; }
.flowx-detail.is-market .flowx-io-cell h4 { color: var(--green-500); }

/* Panels: only the active one shows */
.flowx-panel { display: none; }
.flowx-panel.show { display: block; animation: fadeUp 0.4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .flowx-rail { grid-template-columns: 1fr; gap: 2.2rem; }
  .flowx-station { display: grid; grid-template-columns: 64px 1fr; text-align: left; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; }
  .flowx-station + .flowx-station { margin-left: 0; }
  .flowx-icon { margin: 0; }
  .flowx-id { grid-column: 2; }
  .flowx-name { grid-column: 2; margin-top: 0.1rem; }
  .flowx-loc { grid-column: 2; }
  /* vertical arrow */
  .flowx-station:not(:last-child)::after { right: auto; left: 32px; top: auto; bottom: -2.2rem; width: 2px; height: 2.2rem; transform: none; }
  .flowx-station:not(:last-child)::before { right: auto; left: 28px; top: auto; bottom: -1rem; transform: rotate(135deg); }
  .flowx-pulse-track { display: none; }
  .flowx-io { grid-template-columns: 1fr; }
}

/* ============================================================
   LOGIC CARDS (why three nodes)
   ============================================================ */
.logic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 3rem; }
.logic-card { padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.logic-card .l-num { font-family: var(--display); font-size: var(--step-2); font-weight: 600; color: var(--teal-500); line-height: 1; }
.logic-card h3 { font-size: var(--step-1); margin-top: 0.8rem; }
.logic-card p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.7rem; }
@media (max-width: 760px) { .logic-grid { grid-template-columns: 1fr; } }

/* ============================================================
   TRACE BAND (blockchain transversal)
   ============================================================ */
.trace-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 3rem; position: relative; }
.trace-line { position: absolute; top: 18px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--teal-500), var(--green-500)); }
.trace-step { text-align: center; position: relative; z-index: 1; padding-inline: 0.5rem; }
.trace-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-900); border: 2px solid var(--teal-400); display: grid; place-items: center; margin: 0 auto 1rem; color: var(--teal-400); font-family: var(--display); font-weight: 600; font-size: 0.85rem; }
.trace-step p { font-size: var(--step--1); color: #aebecb; line-height: 1.4; }
.trace-step strong { display: block; color: #fff; font-family: var(--display); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.3rem; }
@media (max-width: 760px) {
  .trace-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .trace-line { display: none; }
  .trace-step { display: flex; align-items: center; gap: 1rem; text-align: left; }
  .trace-dot { margin: 0; flex-shrink: 0; }
}

/* ============================================================
   NODE DETAIL BLOCKS (Nodes page)
   ============================================================ */
.node-block { padding-block: clamp(4rem, 8vw, 7rem); scroll-margin-top: 90px; }
.node-block + .node-block { border-top: 1px solid var(--line); }
.section--ink.node-block + .node-block, .node-block + .section--ink.node-block { border-top: 0; }

.node-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; margin-bottom: 2.5rem; }
.node-emblem {
  width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center;
  background: rgba(0,172,172,0.1); color: var(--teal-500); border: 1px solid rgba(0,172,172,0.25);
}
.node-emblem svg { width: 38px; height: 38px; }
.section--ink .node-emblem { background: rgba(0,172,172,0.12); border-color: rgba(0,172,172,0.3); color: var(--teal-400); }
.node-kicker { font-family: var(--display); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-500); }
.section--ink .node-kicker { color: var(--teal-400); }
.node-h { font-size: var(--step-3); margin-top: 0.3rem; }
.node-place { font-family: var(--display); color: var(--ink-500); margin-top: 0.3rem; font-size: var(--step-0); }
.section--ink .node-place { color: #9fb4c2; }

.node-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.node-role-tag { display: inline-block; font-family: var(--display); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; color: var(--blue-700); background: rgba(0,83,141,0.08); padding: 0.4em 0.9em; border-radius: 100px; margin-bottom: 1.2rem; }
.section--ink .node-role-tag { color: var(--teal-400); background: rgba(0,172,172,0.1); }
.node-lead { font-size: var(--step-1); line-height: 1.4; color: var(--ink-700); }
.section--ink .node-lead { color: #e3ecf2; }
.node-desc { margin-top: 1.2rem; }
.node-desc p { color: var(--ink-500); margin-bottom: 1rem; }
.section--ink .node-desc p { color: #aebecb; }

/* Spec list (right column) */
.node-specs { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.section--ink .node-specs { border-color: rgba(255,255,255,0.12); }
.spec-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.section--ink .spec-row { border-color: rgba(255,255,255,0.08); }
.spec-row:last-child { border-bottom: 0; }
.spec-row .sk { color: var(--ink-500); font-size: var(--step--1); }
.section--ink .spec-row .sk { color: #8ba0b0; }
.spec-row .sv { font-family: var(--display); font-weight: 500; color: var(--ink-900); font-size: var(--step--1); text-align: right; }
.section--ink .spec-row .sv { color: #fff; }
.spec-head { background: var(--bg-alt); padding: 0.9rem 1.3rem; font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-500); }
.section--ink .spec-head { background: rgba(255,255,255,0.04); color: #9fb4c2; }

/* Capability chips */
.node-caps { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.cap-chip { font-family: var(--display); font-size: 0.8rem; color: var(--ink-700); border: 1px solid var(--line); padding: 0.45em 0.9em; border-radius: 6px; background: var(--paper); }
.section--ink .cap-chip { color: #cfdde6; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); }

/* Cert pills inline (for INZUALCA) */
.node-certs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.node-cert { font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.03em; color: #fff; background: rgba(0,172,172,0.18); border: 1px solid rgba(0,172,172,0.4); padding: 0.45em 1em; border-radius: 6px; }

@media (max-width: 860px) {
  .node-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  .node-head { grid-template-columns: 1fr; gap: 1rem; }
  .node-emblem { width: 64px; height: 64px; }
}

/* Sub-nav for jumping to nodes */
.node-jump { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.node-jump a { font-family: var(--display); font-size: var(--step--1); color: #c4d6e2; border: 1px solid rgba(255,255,255,0.2); padding: 0.55em 1.1em; border-radius: 100px; transition: all 0.25s var(--ease); }
.node-jump a:hover { border-color: var(--teal-400); color: #fff; background: rgba(0,172,172,0.1); }

/* ============================================================
   ESG PAGE COMPONENTS (Sustainability)
   ============================================================ */
/* Three pillars (TBL) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.pillar { padding: 2rem 1.8rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); position: relative; overflow: hidden; }
.pillar::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; }
.pillar.env::before { background: var(--green-500); }
.pillar.soc::before { background: var(--teal-500); }
.pillar.gov::before { background: var(--blue-700); }
.pillar-label { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-300); }
.pillar h3 { font-size: var(--step-1); margin-top: 0.3rem; }
.pillar-list { margin-top: 1.4rem; display: grid; gap: 1rem; }
.pillar-item { display: grid; gap: 0.2rem; }
.pillar-item .pi-k { font-family: var(--display); font-weight: 500; color: var(--ink-900); font-size: var(--step--1); }
.pillar-item .pi-v { color: var(--ink-500); font-size: var(--step--1); line-height: 1.45; }
.pillar-item .pi-kpi { color: var(--green-600); font-family: var(--display); font-weight: 600; font-size: var(--step--1); }
.pillar.soc .pi-kpi { color: var(--teal-500); }
.pillar.gov .pi-kpi { color: var(--blue-700); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* Climate metrics band */
.climate-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg); overflow: hidden; margin-top: 3rem; }
.climate-cell { background: rgba(255,255,255,0.03); padding: 1.8rem 1.5rem; }
.climate-cell .c-num { font-family: var(--display); font-size: var(--step-2); font-weight: 600; color: #fff; line-height: 1; }
.climate-cell .c-num .unit { color: var(--green-500); font-size: 0.55em; }
.climate-cell .c-lbl { color: #aebecb; font-size: var(--step--1); margin-top: 0.5rem; line-height: 1.4; }
@media (max-width: 860px) { .climate-band { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .climate-band { grid-template-columns: 1fr; } }

/* PS mapping rows */
.ps-list { margin-top: 3rem; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ps-row { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; background: var(--paper); padding: 1.5rem 1.8rem; align-items: start; }
.ps-code { font-family: var(--display); font-weight: 600; color: var(--blue-700); font-size: var(--step-0); }
.ps-row h4 { font-family: var(--display); font-size: var(--step-0); font-weight: 600; color: var(--ink-900); margin-bottom: 0.3rem; }
.ps-row p { color: var(--ink-500); font-size: var(--step--1); line-height: 1.5; }
@media (max-width: 620px) { .ps-row { grid-template-columns: 1fr; gap: 0.5rem; } }

/* Cert table for ESG */
.esg-cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 3rem; }
.esg-cert { padding: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.esg-cert .ec-name { font-family: var(--display); font-weight: 600; font-size: var(--step-1); color: var(--ink-900); }
.esg-cert .ec-status { display: inline-block; font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-600); background: rgba(61,169,61,0.1); padding: 0.3em 0.7em; border-radius: 100px; margin-left: 0.6rem; vertical-align: middle; }
.esg-cert p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.8rem; line-height: 1.5; }
@media (max-width: 620px) { .esg-cert-grid { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-aside h2 { font-size: var(--step-3); }
.contact-aside p { color: var(--ink-500); margin-top: 1.2rem; }
.contact-points { margin-top: 2rem; display: grid; gap: 1.4rem; }
.contact-point { display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-items: start; }
.contact-point .cp-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,172,172,0.1); display: grid; place-items: center; color: var(--teal-500); }
.contact-point .cp-icon svg { width: 20px; height: 20px; }
.contact-point h4 { font-family: var(--display); font-size: var(--step-0); color: var(--ink-900); font-weight: 600; }
.contact-point p { margin-top: 0.2rem; color: var(--ink-500); font-size: var(--step--1); }
.contact-point a { color: var(--blue-700); }
.contact-point a:hover { color: var(--teal-500); }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-family: var(--display); font-size: var(--step--1); font-weight: 500; color: var(--ink-900); margin-bottom: 0.5rem; }
.field label .req { color: var(--teal-500); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--step-0); color: var(--ink-900);
  padding: 0.85em 1em; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-500); background: var(--paper);
  box-shadow: 0 0 0 3px rgba(0,172,172,0.12);
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%234a5b66' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1em center; padding-right: 2.6em; }
/* Honeypot — hidden from humans */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.form-note { font-size: 0.78rem; color: var(--ink-300); margin-top: 1.2rem; line-height: 1.5; }
.form-status { padding: 1rem 1.2rem; border-radius: var(--radius); font-size: var(--step--1); margin-bottom: 1.4rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(61,169,61,0.1); border: 1px solid rgba(61,169,61,0.3); color: var(--green-600); }
.form-status.err { background: rgba(200,60,60,0.08); border: 1px solid rgba(200,60,60,0.25); color: #b34141; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

/* ============================================================
   INVESTORS PAGE
   ============================================================ */
/* Pillars of the thesis */
.thesis-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.thesis-pillar { padding: 2rem 1.8rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.thesis-pillar .tp-num { font-family: var(--display); font-size: var(--step-2); font-weight: 700; color: var(--teal-500); line-height: 1; }
.thesis-pillar h3 { font-size: var(--step-1); margin-top: 0.9rem; }
.thesis-pillar p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.7rem; }
@media (max-width: 860px) { .thesis-pillars { grid-template-columns: 1fr; } }

/* Moat comparison table */
.moat-wrap { margin-top: 3rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.moat-table { width: 100%; border-collapse: collapse; }
.moat-table th, .moat-table td { text-align: left; padding: 1.1rem 1.3rem; vertical-align: top; font-size: var(--step--1); }
.moat-table thead th { font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: #8ba0b0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.moat-table thead th.col-av { color: var(--teal-400); }
.moat-table tbody th { font-weight: 500; color: #cfdde6; border-bottom: 1px solid rgba(255,255,255,0.08); }
.moat-table tbody td { color: #9fb4c2; border-bottom: 1px solid rgba(255,255,255,0.08); }
.moat-table td.col-av { color: #fff; background: rgba(0,172,172,0.06); }
.moat-table tbody tr:last-child th, .moat-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 720px) { .moat-table { min-width: 620px; } }

/* Two instruments (debt / equity) */
.instruments { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.instrument { padding: 2.2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.instrument .in-tag { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-500); }
.instrument h3 { font-size: var(--step-2); margin-top: 0.5rem; }
.instrument p { color: var(--ink-500); margin-top: 1rem; font-size: var(--step--1); }
.instrument ul { margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.instrument li { display: grid; grid-template-columns: 20px 1fr; gap: 0.7rem; color: var(--ink-700); font-size: var(--step--1); align-items: start; }
.instrument li svg { width: 16px; height: 16px; color: var(--teal-500); margin-top: 0.25em; }
@media (max-width: 760px) { .instruments { grid-template-columns: 1fr; } }

/* Process steps */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; counter-reset: step; }
.process-step { position: relative; padding-top: 2.5rem; }
.process-step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,172,172,0.12); color: var(--teal-500); font-family: var(--display); font-weight: 600; display: grid; place-items: center; }
.section--ink .process-step::before { background: rgba(0,172,172,0.18); color: var(--teal-400); }
.process-step h4 { font-family: var(--display); font-size: var(--step-0); color: var(--ink-900); }
.section--ink .process-step h4 { color: #fff; }
.process-step p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.4rem; }
.section--ink .process-step p { color: #aebecb; }
@media (max-width: 760px) { .process { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; } }
@media (max-width: 440px) { .process { grid-template-columns: 1fr; } }

/* ---------- Skip link & focus ---------- */
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--blue-900); padding: 0.8rem 1.2rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 3px; }

/* ============================================================
   LANGUAGE SWITCH  (ES / EN pills in header)
   ============================================================ */
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 100px;
  padding: 3px; margin-left: 0.4rem;
}
.lang-switch button {
  font-family: var(--display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65); background: none; border: 0; border-radius: 100px;
  padding: 0.35em 0.75em; cursor: pointer; transition: all 0.2s var(--ease);
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: var(--teal-500); color: #fff; }
@media (max-width: 860px) {
  .lang-switch { margin-left: 0; margin-top: 0.6rem; border-color: rgba(255,255,255,0.3); }
  .lang-switch button { color: rgba(255,255,255,0.75); }
}

/* ============================================================
   BENTO GRID  — services (homepage signature element)
   Asymmetric grid: one lead card + two stacked cards.
   ============================================================ */
.bento-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: repeat(2, minmax(220px, auto));
  gap: 1.25rem;
  margin-top: 3rem;
}
.bento-card {
  position: relative; overflow: hidden;
  grid-row: 1 / 3;
  background: var(--blue-900);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.bento-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(17,170,166,0.35), transparent 60%),
    linear-gradient(160deg, var(--blue-900) 0%, var(--blue-800) 100%);
  z-index: 0;
}
.bento-card > * { position: relative; z-index: 1; }
.bento-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(15,23,42,0.28); }
.bento-card .b-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  display: grid; place-items: center; color: var(--teal-400); margin-bottom: 1.4rem;
}
.bento-card .b-icon svg { width: 26px; height: 26px; }
.bento-card h3 { font-size: var(--step-2); color: #fff; line-height: 1.15; }
.bento-card p { color: #c4d2dc; margin-top: 0.9rem; font-size: var(--step-0); line-height: 1.55; max-width: 46ch; }

.bento-card--sm {
  grid-row: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-900);
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
}
.bento-card--sm::before { display: none; }
.bento-card--sm .b-icon { background: rgba(17,170,166,0.1); border: 1px solid rgba(17,170,166,0.2); color: var(--teal-500); }
.bento-card--sm h3 { font-size: var(--step-1); color: var(--ink-900); }
.bento-card--sm p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.7rem; }
.bento-card--sm:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,23,42,0.1); border-color: transparent; }

@media (max-width: 860px) {
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .bento-card, .bento-card--sm { grid-row: auto; min-height: 0; }
}

/* ============================================================
   VARYS LABS  — portfolio project cards
   ============================================================ */
.labs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
  margin-top: 3rem;
}
@media (min-width: 1000px) {
  .labs-grid { grid-template-columns: repeat(3, 1fr); }
}
.labs-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3vw, 2.4rem); position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  display: flex; flex-direction: column;
}
.labs-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--teal-500), var(--green-500));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.labs-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,23,42,0.1); border-color: transparent; }
.labs-card:hover::before { transform: scaleX(1); }
.labs-mark {
  width: 44px; height: 44px; border-radius: 10px; background: var(--sand-50);
  border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; color: var(--blue-700); margin-bottom: 1.3rem;
}
.labs-tag { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-500); }
.labs-card h3 { font-size: var(--step-1); margin-top: 0.5rem; color: var(--ink-900); }
.labs-card p { color: var(--ink-500); font-size: var(--step--1); margin-top: 0.9rem; line-height: 1.6; flex-grow: 1; }
.labs-link {
  margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--display); font-size: 0.85rem; font-weight: 500; color: var(--blue-700);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.labs-link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.labs-card:hover .labs-link svg { transform: translate(2px, -2px); }
.labs-link.is-soon { color: var(--ink-300); pointer-events: none; }
@media (max-width: 760px) { .labs-grid { grid-template-columns: 1fr; } }

/* ============================================================
   TYPE DISCIPLINE OVERRIDES
   Fraunces (--display) is reserved for genuine headline moments.
   Everything that is UI chrome — nav, buttons, eyebrows, tags,
   table headers, small labels — reverts to Inter (--label) so the
   serif never appears at small sizes, where it would read as noise
   rather than authority.
   ============================================================ */
.eyebrow,
.btn,
.brand-word,
.nav a,
.page-index,
.node-tag, .node-loc, .node-role,
.certs .certs-label, .cert-pill,
.stat-cell .s-src,
.compare thead th,
.node-kicker, .node-place, .node-role-tag,
.spec-row .sv, .spec-head, .cap-chip, .node-cert,
.node-jump a,
.pillar-label, .pillar-item .pi-k, .pillar-item .pi-kpi,
.moat-table thead th,
.instrument .in-tag,
.ps-code,
.esg-cert .ec-status,
.field label,
.chain-step,
.flowx-id, .flowx-name,
.labs-tag, .labs-link,
.footer-col h4, .footer-bottom,
.form-note,
.lang-switch button {
  font-family: var(--label);
}
.chain-title { font-family: var(--label); font-weight: 600; }
.esg-cert .ec-name { font-family: var(--label); font-weight: 700; }

/* Large numerals read better in the label face at any size — a serif
   numeral set looks inconsistent next to sans body copy in a stat row. */
.proof-num, .stat-cell .s-num, .esg-kpi .k-num, .logic-card .l-num,
.climate-cell .c-num, .thesis-pillar .tp-num, .hero-stat .num {
  font-family: var(--label);
}

/* italic accent utility — Fraunces' italic is the one ornamental move
   we allow ourselves; use sparingly, on a single word or short phrase */
.accent-italic { font-style: italic; font-weight: 400; }

/* ============================================================
   DATELINE  — editorial "LONDON / LONDRES" kicker used above the
   hero headline, echoing the masthead convention of institutional
   publications. Reused on page-heroes for consistency.
   ============================================================ */
.dateline {
  font-family: var(--label); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--teal-400); display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.dateline::after { content: ""; flex: 1; max-width: 64px; height: 1px; background: currentColor; opacity: 0.5; }
.section--ink .dateline, .hero .dateline, .page-hero .dateline { color: var(--teal-400); }

/* ============================================================
   HERO SIGNATURE  — abstract orbit motif (homepage signature element)
   Echoes the Varys mark: overlapping translucent circles + a dashed
   satellite connector, set inside two slow-rotating orbit rings.
   ============================================================ */
@media (min-width: 901px) {
  .hero-grid--split { grid-template-columns: 1.15fr 0.95fr; }
}
.hero-signature { position: relative; }
.hero-signature svg { width: 100%; height: auto; overflow: visible; }
.hero-orbit { transform-origin: 300px 300px; animation: heroSpin 46s linear infinite; }
@keyframes heroSpin { to { transform: rotate(360deg); } }
.hero-node-pulse { transform-origin: center; transform-box: fill-box; animation: heroPulse 2.6s ease-in-out infinite; }
.hero-node-pulse--b { animation-delay: 0.9s; }
.hero-node-pulse--c { animation-delay: 1.7s; }
@keyframes heroPulse { 0%, 100% { opacity: 0.65; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }
.hero-core { transform-origin: 300px 300px; animation: heroBreathe 7s ease-in-out infinite; }
@keyframes heroBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@media (max-width: 900px) {
  .hero-signature { max-width: 300px; margin: 1rem auto 0; opacity: 0.9; }
}
@media (max-width: 480px) {
  .hero-signature { max-width: 220px; }
}

/* ============================================================
   PILLARS STRIP  — 4-column transversal differentiators band
   ============================================================ */
.pillars-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg);
  overflow: hidden; margin-top: clamp(2.5rem, 5vw, 4rem);
}
.pillars-strip-item {
  background: rgba(5, 20, 35, 0.55); padding: 1.8rem 1.6rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  position: relative; overflow: hidden;
  transition: background 0.3s var(--ease);
}
.pillars-strip-item::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: var(--ps-accent, var(--teal-400)); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.pillars-strip-item:hover { background: rgba(5, 20, 35, 0.8); }
.pillars-strip-item:hover::before { transform: scaleX(1); }
.pillars-strip-item:nth-child(1) { --ps-accent: var(--blue-600); }
.pillars-strip-item:nth-child(2) { --ps-accent: var(--teal-400); }
.pillars-strip-item:nth-child(3) { --ps-accent: var(--green-500); }
.pillars-strip-item:nth-child(4) { --ps-accent: var(--blue-600); }
.pillars-strip-item .ps-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--ps-accent, var(--teal-400)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--ps-accent, var(--teal-400)) 45%, transparent);
  display: grid; place-items: center; color: var(--ps-accent, var(--teal-400));
}
.pillars-strip-item .ps-icon svg { width: 21px; height: 21px; }
.pillars-strip-item h4 {
  font-family: var(--label); font-size: 0.95rem; font-weight: 600; color: #fff; letter-spacing: 0.01em;
}
.pillars-strip-item p { font-size: var(--step--1); color: #a9bccb; line-height: 1.5; }
@media (max-width: 900px) {
  .pillars-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pillars-strip { grid-template-columns: 1fr; }
}

/* ============================================================
   FEE STRIP  — honorarios alineados a resultados (editorial 2-col)
   ============================================================ */
.fee-strip-wrap {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--blue-900) 0%, var(--blue-800) 60%, #062f48 100%);
  padding: clamp(2.6rem, 6vw, 4.5rem);
}
.fee-strip-wrap::before {
  content: "%"; position: absolute; right: clamp(-1rem, 2vw, 2rem); top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-style: italic; font-size: clamp(9rem, 20vw, 15rem);
  color: rgba(255,255,255,0.05); line-height: 1; pointer-events: none; user-select: none;
}
.fee-strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 0.6fr 1.4fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.fee-strip .fee-label {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: var(--step-3); color: var(--teal-400); line-height: 1.1;
}
.fee-strip .fee-body p { color: #c4d6e2; }
.fee-strip .fee-body p + p { margin-top: 0.8rem; }
.fee-strip .fee-body strong { color: #fff; font-weight: 600; }
@media (max-width: 760px) {
  .fee-strip { grid-template-columns: 1fr; text-align: left; }
  .fee-strip-wrap::before { display: none; }
}

/* ============================================================
   TRACK RECORD BAND  — "nuestros consultores han trabajado en..."
   ============================================================ */
.track-lede { max-width: 62ch; }
.track-lede p { color: #c4d2dc; font-size: var(--step-1); line-height: 1.55; }
.track-sectors {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem;
}
.track-sectors span {
  font-family: var(--label); font-size: 0.78rem; color: #c4d2dc;
  border: 1px solid rgba(255,255,255,0.16); border-radius: 100px;
  padding: 0.5em 1em; background: rgba(255,255,255,0.03);
}

/* Split hero (with signature graphic) gets a narrower text column —
   drop to step-4 so the headline wraps to 3-4 lines instead of 6+,
   keeping the CTA buttons close to the first viewport. */
@media (min-width: 901px) {
  .hero-grid--split .hero-copy h1 { font-size: var(--step-4); }
}
