/* =====================================================================
   CIIN Co. Cosmos: styles
   1. Fonts   2. Tokens   3. Base   4. Stage & loader   5. Chrome (header,
   system map, telemetry, cursor, labels)   6. Chapters & typography
   7. Components   8. Contact & form   9. Footer   10. Reveal motion
   11. Responsive   12. Reduced motion / no-WebGL
   ===================================================================== */

/* 1. Fonts (self-hosted, SIL Open Font License; see assets/fonts) ----- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2-variations"), url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* 2. Tokens ------------------------------------------------------------ */
:root {
  --bg: #03040a;
  --bg-2: #080b18;
  --ink: #eef1f8;
  --ink-2: rgba(232, 236, 248, 0.74);
  --ink-3: rgba(232, 236, 248, 0.5);
  --line: rgba(232, 236, 248, 0.14);
  --line-2: rgba(232, 236, 248, 0.26);
  --accent: #8fb6ff;        /* CIIN Co. blue, lifted for dark backgrounds */
  --accent-deep: #447fc1;   /* logo blue */
  --gold: #ecd1a4;
  --glass: rgba(8, 11, 24, 0.52);
  --danger: #ff9a8a;

  --f-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --header-h: 76px;
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.6;
  font-weight: 380;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(143, 182, 255, 0.5); text-underline-offset: 0.2em; }
a:hover { color: #fff; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(143, 182, 255, 0.35); color: #fff; }
.mono { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 999px; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 16px; color: var(--bg); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
main:focus { outline: none; }
/* Headings receive focus when a menu or Next button jumps to a chapter (so screen readers read
   from there); they are not controls, so no outline is drawn around them. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, .chapter[tabindex="-1"]:focus { outline: none; }

/* 4. Stage & loader ---------------------------------------------------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: auto; touch-action: pan-y; }
.stage-fallback { position: absolute; inset: 0; display: none; background: radial-gradient(ellipse at 70% 40%, rgba(76, 60, 200, 0.25), transparent 60%), url("../images/night-map.jpg") center / cover no-repeat, var(--bg); }
/* Edge shading so text always has something dark under it. */
/* Shade behind whichever side holds the text, so it reads over a lit city. */
.scrim { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s var(--ease-io); }
.scrim-left { background: linear-gradient(90deg, rgba(3, 4, 10, 0.42) 0%, rgba(3, 4, 10, 0.5) 30%, rgba(3, 4, 10, 0.22) 50%, rgba(3, 4, 10, 0) 66%); }
.scrim-right { background: linear-gradient(270deg, rgba(3, 4, 10, 0.42) 0%, rgba(3, 4, 10, 0.5) 30%, rgba(3, 4, 10, 0.22) 50%, rgba(3, 4, 10, 0) 66%); }
.scrim-center { background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(3, 4, 10, 0.78), rgba(3, 4, 10, 0.45) 55%, rgba(3, 4, 10, 0) 85%); }
body[data-side="left"] .scrim-left, body[data-side="right"] .scrim-right, body[data-side="center"] .scrim-center { opacity: 1; }
@media (max-width: 860px) {
  .scrim-left, .scrim-right, .scrim-center { background: linear-gradient(0deg, rgba(3, 4, 10, 0.9) 0%, rgba(3, 4, 10, 0.7) 45%, rgba(3, 4, 10, 0.15) 75%, rgba(3, 4, 10, 0) 90%); }
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 4, 10, 0.55) 0%, rgba(3, 4, 10, 0) 18%),
    linear-gradient(0deg, rgba(3, 4, 10, 0.5) 0%, rgba(3, 4, 10, 0) 22%);
}

.loader {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 1.2s var(--ease-io), visibility 0s linear 1.2s;
}
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; }
.loader-inner { width: min(320px, 72vw); display: grid; gap: 18px; justify-items: center; }
.loader-mark { width: 72px; height: 40px; animation: mark-breathe 2.4s var(--ease-io) infinite; }
.loader-label { width: 100%; display: flex; justify-content: space-between; color: var(--ink-3); margin: 0; }
.loader-pct { color: var(--ink); }
.loader-bar { width: 100%; height: 1px; background: var(--line); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent), #fff); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.4s var(--ease); }
@keyframes mark-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* 5. Chrome -------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  transition: transform 0.6s var(--ease), background-color 0.4s;
}
.site-header::before { content: ""; position: absolute; inset: 0 0 -36px; z-index: -1; background: linear-gradient(180deg, rgba(3, 4, 10, 0.94) 0%, rgba(3, 4, 10, 0.82) 62%, rgba(3, 4, 10, 0)); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
/* once scrolled, the header is a frosted dark bar so the menu reads over any text or map */
/* (drawn on ::before: a blur on the header itself would trap the phone menu inside the bar) */
.site-header.is-scrolled::before { opacity: 1; inset: 0; background: rgba(4, 6, 13, 0.82); -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 50px; height: 28px; flex: none; }
/* The full name beside the mark, in the logo's own lettering (assets/images/ciinco-wordmark-on-dark.svg). */
.brand-word { display: block; height: 34px; width: auto; }
@media (max-width: 520px) {
  .brand { gap: 9px; }
  .brand .brand-mark { width: 40px; height: 22px; }
  .brand-word { height: 28px; }
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 2.2vw, 34px); align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-size: 0.82rem; letter-spacing: 0.04em; position: relative; padding-block: 6px; transition: color 0.3s; }
.site-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="true"] { color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); border: 1px solid var(--line-2); padding: 8px 18px; border-radius: 999px; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.site-nav .nav-cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-toggle { display: none; }

.system-map { position: fixed; right: clamp(16px, 2.4vw, 36px); top: 50%; transform: translateY(-50%); z-index: 50; display: flex; gap: 14px; }
.system-map ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.system-map a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 5px 0; text-decoration: none; color: var(--ink-3); }
.sm-num { font-size: 0.64rem; min-width: 2.4ch; text-align: right; transition: color 0.3s; }
/* names sit left of the numbers, so the numbers line up in one straight column */
.sm-name { order: -1; font-size: 0.74rem; letter-spacing: 0.04em; opacity: 0; transform: translateX(8px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); white-space: nowrap; }
.system-map:hover .sm-name, .system-map a:focus-visible .sm-name, .system-map a.is-active .sm-name { opacity: 1; transform: none; }
.system-map:not(:hover) a:not(.is-active) .sm-name { opacity: 0; }
.system-map a.is-active { color: var(--ink); }
.system-map a.is-active .sm-num { color: var(--accent); }
.sm-track { width: 1px; background: var(--line); position: relative; }
.sm-fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(var(--accent), #fff); transform-origin: 50% 0; transform: scaleY(0); }

.telemetry { position: fixed; left: var(--gutter); bottom: 22px; z-index: 50; display: flex; gap: 22px; color: var(--ink-3); font-size: 0.62rem; pointer-events: none; transition: opacity 0.5s; }
.telemetry span:first-child { color: var(--ink-2); }
body.at-footer .telemetry, body.at-footer .system-map, body.at-footer .stepper { opacity: 0; pointer-events: none; }

/* Previous / next chapter buttons: under the chapter list on wide screens, bottom corner on phones. */
.stepper { position: fixed; right: clamp(16px, 2.4vw, 36px); top: calc(50% + 160px); z-index: 50; display: grid; justify-items: end; gap: 8px; transition: opacity 0.5s; }
.step-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 40px; height: 40px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(3, 4, 10, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); font: 400 0.95rem/1 var(--f-sans); cursor: pointer; transition: border-color 0.3s, background-color 0.3s, opacity 0.3s, transform 0.4s var(--ease); }
.step-btn:hover, .step-btn:focus-visible { border-color: var(--ink); background: rgba(238, 241, 248, 0.08); }
.step-btn[hidden] { display: none; }
.step-name { font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.step-next:hover .step-name { color: var(--ink); }

.next-row { margin: 34px 0 0; }
.next-center { text-align: center; }
.next-label { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; }
.next-link:hover .btn-arrow { transform: translateX(4px); }
.next-link[href="#main"]:hover .btn-arrow { transform: translateY(-3px); }

.cursor { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; display: none; }
.cursor-ring { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border: 1px solid rgba(238, 241, 248, 0.55); border-radius: 50%; transition: transform 0.45s var(--ease), border-color 0.3s, background-color 0.3s, opacity 0.3s; }
.cursor-label { position: absolute; left: 30px; top: -8px; white-space: nowrap; color: var(--ink); opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.4s var(--ease); font-size: 0.64rem; }
.cursor.is-link .cursor-ring { transform: scale(0.45); background: var(--ink); border-color: transparent; }
.cursor.is-world .cursor-ring { transform: scale(2.1); border-color: var(--accent); background: rgba(143, 182, 255, 0.06); }
.cursor.is-world .cursor-label { opacity: 1; transform: none; left: 42px; }
.cursor.is-hidden .cursor-ring { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor .cursor { display: block; }
}

.labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.label { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 0.5s; will-change: transform, opacity; }
.label.is-on { opacity: 1; }
.label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px 2px rgba(143, 182, 255, 0.7); flex: none; }
.label .stem { width: 26px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.label small { color: var(--ink-3); letter-spacing: 0.08em; }
.label.is-hot { color: #fff; }
.label.is-hot .dot { background: var(--gold); box-shadow: 0 0 14px 4px rgba(236, 209, 164, 0.8); }
.label-office .dot { width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 14px 4px rgba(236, 209, 164, 0.75); }
.label-office .stem { background: linear-gradient(90deg, var(--gold), transparent); width: 40px; }
.label-office span.txt { display: grid; gap: 2px; line-height: 1.25; }
.label-office b { font-weight: 400; font-size: 0.72rem; }
.label-node { gap: 6px; color: var(--ink-2); }
.label-node .dot { display: none; }
.label-node.is-hot { color: var(--gold); }
.label-node .name { max-width: 0; overflow: hidden; opacity: 0; transition: max-width 0.6s var(--ease), opacity 0.4s; }
.label-node.is-hot .name { max-width: 22em; opacity: 1; }

/* 6. Chapters & typography --------------------------------------------- */
main { position: relative; z-index: 2; overflow-x: clip; }
.chapter { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: clamp(110px, 22vh, 260px); }
.chapter .wrap { position: relative; }
.chapter-right .panel { margin-left: auto; }
.chapter-center { text-align: center; }
.panel { max-width: 600px; position: relative; }
.panel-wide { max-width: 640px; }
/* Soft dark halo behind the text, so it reads over bright parts of the scene. */
.panel::before, .chapter-center .wrap::before, .contact-intro::before {
  content: ""; position: absolute; inset: -14% -22%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(3, 4, 10, 0.62), rgba(3, 4, 10, 0.32) 55%, transparent);
  filter: blur(8px);
}
.chapter-center .wrap::before { inset: 0 10%; }

.hero { align-items: flex-end; padding-block: calc(var(--header-h) + 8vh) clamp(110px, 18vh, 200px); }
.hero .wrap { max-width: var(--max); }
.eyebrow { color: var(--ink-2); margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 0.6em; }
.eyebrow .sep { color: var(--accent); }
.display {
  margin: 0;
  font-weight: 300;
  font-stretch: 112%;
  font-size: clamp(2.9rem, 8.4vw, 8.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.display em, .display-2 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; letter-spacing: -0.01em; color: #fff; }
.display em { font-size: 1.08em; background: linear-gradient(100deg, #fff 20%, #cfdcff 55%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.lede { max-width: 34rem; margin: 34px 0 0; font-size: clamp(1.02rem, 0.5vw + 0.9rem, 1.2rem); color: var(--ink-2); line-height: 1.55; }
.cta-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.scroll-cue { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: grid; justify-items: center; gap: 12px; color: var(--ink-3); text-decoration: none; font-size: 0.6rem; }
.scroll-cue-line { width: 1px; height: 46px; background: linear-gradient(transparent, var(--ink-2)); position: relative; overflow: hidden; }
.scroll-cue-line::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: #fff; animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { top: -40%; } 70%, 100% { top: 110%; } }

.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; color: var(--ink-2); }
.chapter-center .kicker { justify-content: center; }
.kicker-num { color: var(--accent); }
.kicker::after { content: ""; width: 48px; height: 1px; background: var(--line-2); }
.chapter-center .kicker::before { content: ""; width: 48px; height: 1px; background: var(--line-2); }
.display-2 {
  margin: 0;
  font-weight: 300;
  font-stretch: 108%;
  font-size: clamp(2.1rem, 4vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.display-2 em { font-size: 1.06em; }
.body { margin: 22px 0 0; color: var(--ink-2); max-width: 36rem; }
.body-center { margin-inline: auto; }
.note { margin: 28px 0 0; padding: 14px 18px; border-left: 1px solid var(--gold); color: var(--ink-2); font-size: 0.9rem; background: linear-gradient(90deg, rgba(236, 209, 164, 0.07), transparent); }

/* A faint dark halo keeps small text crisp over bright windows. */
.eyebrow, .kicker, .lede, .body, .note, .services, .types-label, .consulting, .stats, .listing-links, .lg-title, .crexi-note, .agent, .hours, .office-coords {
  text-shadow: 0 1px 2px rgba(3, 4, 10, 0.75), 0 0 14px rgba(3, 4, 10, 0.85), 0 0 28px rgba(3, 4, 10, 0.6);
}
.display, .display-2 { text-shadow: 0 2px 30px rgba(3, 4, 10, 0.55); }
.display em { text-shadow: none; filter: drop-shadow(0 2px 18px rgba(3, 4, 10, 0.6)); }

/* 7. Components ---------------------------------------------------------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; gap: 12px; height: var(--h); padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: 500 0.88rem/1 var(--f-sans); letter-spacing: 0.02em; text-decoration: none;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}
.btn-sm { --h: 42px; padding: 0 20px; font-size: 0.8rem; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { color: var(--bg); background: #fff; box-shadow: 0 0 0 6px rgba(143, 182, 255, 0.12), 0 10px 50px -8px rgba(143, 182, 255, 0.65); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: rgba(3, 4, 10, 0.25); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(238, 241, 248, 0.06); }
.btn-arrow { display: inline-block; transition: transform 0.5s var(--ease); }
.btn:hover .btn-arrow { transform: translateY(3px); }
.contact-form .btn:hover .btn-arrow { transform: translateX(4px); }

.offices { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.office { padding: 24px 22px 22px; background: rgba(6, 8, 18, 0.72); transition: background-color 0.4s; }
.office:hover, .office.is-hot { background: rgba(14, 18, 38, 0.85); }
.office-coords { margin: 0 0 18px; color: var(--gold); font-size: 0.6rem; }
.office h3 { margin: 0; font-weight: 400; font-stretch: 110%; font-size: 1.5rem; letter-spacing: -0.01em; }
.office-tag { margin: 2px 0 14px; color: var(--accent); font-size: 0.82rem; }
.office address { font-style: normal; color: var(--ink-2); font-size: 0.86rem; line-height: 1.5; }
.office-phone { display: inline-block; margin-top: 12px; font-size: 0.9rem; text-decoration: none; border-bottom: 1px solid var(--line-2); }

.services { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.services li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.svc-num { color: var(--accent); font-size: 0.64rem; padding-top: 0.35em; }
.services h3 { margin: 0 0 6px; font-weight: 500; font-size: 1rem; letter-spacing: 0.005em; }
.services p { margin: 0; color: var(--ink-2); font-size: 0.83rem; line-height: 1.5; }

.types { margin-top: 28px; }
.types-label { margin: 0 0 14px; color: var(--ink-3); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; color: var(--ink-2); cursor: default; transition: border-color 0.3s, color 0.3s, background-color 0.3s; background: rgba(3, 4, 10, 0.35); }
.chips li:hover, .chips li.is-hot { border-color: var(--gold); color: #fff; background: rgba(236, 209, 164, 0.08); }

.consulting { list-style: none; counter-reset: c; margin: 36px 0 0; padding: 0; columns: 2; column-gap: 34px; }
.consulting li { counter-increment: c; break-inside: avoid; display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-2); cursor: default; transition: color 0.3s, padding-left 0.5s var(--ease); }
.consulting li::before { content: counter(c, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--accent); transition: color 0.3s; }
.consulting li:hover, .consulting li.is-hot { color: #fff; padding-left: 6px; }
.consulting li:hover::before, .consulting li.is-hot::before { color: var(--gold); }

.stats { margin: 64px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1080px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 16px; display: flex; flex-direction: column-reverse; gap: 10px; align-items: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.stat dd { margin: 0; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 2px; }
.stat-num { font-weight: 200; font-stretch: 118%; font-size: clamp(2.6rem, 5.2vw, 4.8rem); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
/* the $ sits on the number's baseline, in the gold serif used for 'years' and 'offices' */
.stat-pre { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(1.7rem, 2.35vw, 2.5rem); line-height: 1; color: var(--gold); align-self: baseline; margin: 0 3px 0 0; }
/* full dollar figures ($197,000,000) are long: smaller and narrower so they fit their column */
.stat-num.stat-long { font-size: clamp(1.7rem, 2.35vw, 2.5rem); font-stretch: 100%; letter-spacing: -0.02em; }
.stat-unit { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.5rem); color: var(--gold); margin-left: 6px; }

.listing-groups { margin-top: 32px; display: grid; gap: 30px; }
.listing-group .listing-links { margin-top: 12px; }
.lg-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 2.3vw, 1.9rem); line-height: 1.1; color: var(--ink); }
.lg-sub { font-family: var(--f-mono); font-style: normal; font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.listing-links { list-style: none; margin: 36px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.listing-links a { position: relative; display: grid; gap: 4px; padding: 22px 56px 22px 0; border-top: 1px solid var(--line); text-decoration: none; transition: padding-left 0.5s var(--ease); }
.listing-links a:hover { padding-left: 10px; }
.ll-kicker { color: var(--accent); font-size: 0.6rem; }
.ll-title { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 350; font-stretch: 108%; letter-spacing: -0.01em; }
.ll-sub { color: var(--ink-3); font-size: 0.86rem; }
.ll-arrow { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease); }
.listing-links a:hover .ll-arrow { background: var(--ink); color: var(--bg); transform: rotate(-8deg) scale(1.06); }
.listing-links li.has-search { border-top: 1px solid var(--line); }
.listing-links li.has-search > a:first-child { border-top: 0; padding-bottom: 14px; }
.listing-links a.ll-search { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: 0 8px 22px 0; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.8rem; color: var(--ink-2); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.listing-links a.ll-search:hover { padding-left: 16px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.crexi { margin-top: 28px; }
.crexi-note { margin: 10px 0 0; color: var(--ink-3); font-size: 0.78rem; }
.crexi-frame { width: 100%; height: min(70vh, 640px); margin-top: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; display: block; }

/* 8. Contact & form ------------------------------------------------------ */
.chapter-contact { padding-bottom: clamp(100px, 16vh, 180px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 110px); align-items: start; }
.contact-intro { position: relative; }
.agent { margin-top: 36px; display: flex; gap: 18px; align-items: center; }
.agent img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 6px rgba(143, 182, 255, 0.07); }
.agent-name { margin: 0; font-size: 1.12rem; font-weight: 450; }
.agent-title { margin: 2px 0 8px; color: var(--accent); font-size: 0.6rem; }
.agent-links { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.88rem; }
.agent-links a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
.hours { margin: 26px 0 0; color: var(--ink-3); font-size: 0.6rem; }

.contact-form {
  position: relative; padding: clamp(24px, 3vw, 40px); border-radius: 24px;
  background: linear-gradient(160deg, rgba(20, 26, 54, 0.62), rgba(6, 8, 18, 0.72));
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 6px; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.req { color: var(--gold); }
.opt { text-transform: none; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0 11px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 1rem/1.4 var(--f-sans);
  transition: border-color 0.3s;
}
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-2); color: var(--ink); }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.field [aria-invalid="true"] { border-bottom-color: var(--danger); }
.field-error { margin: 6px 0 0; min-height: 0; color: var(--danger); font-size: 0.78rem; }
.field-error:empty { display: none; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented legend { width: 100%; float: left; }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.82rem; color: var(--ink-2); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.segmented input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 8px; }
.form-privacy { margin: 0; flex: 1 1 200px; font-size: 0.76rem; color: var(--ink-3); }
.form-status { margin: 16px 0 0; font-size: 0.88rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--gold); }

/* 9. Footer -------------------------------------------------------------- */
.site-footer { position: relative; z-index: 3; background: linear-gradient(180deg, rgba(3, 4, 10, 0) 0, rgba(3, 4, 10, 0.92) 90px, var(--bg) 200px); padding-top: 160px; color: var(--ink-3); font-size: 0.8rem; line-height: 1.6; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(30px, 6vw, 90px); padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-logo { display: block; width: 240px; height: auto; margin-bottom: 22px; }
.footer-legal-name { color: var(--ink); font-size: 0.9rem; }
.site-footer p { margin: 0 0 12px; }
.footer-eho { display: grid; grid-template-columns: 56px 1fr; gap: 0 22px; align-content: start; }
.footer-eho img { grid-row: span 3; width: 56px; height: auto; filter: invert(1) brightness(0.9); opacity: 0.75; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 30px; padding-block: 24px 40px; }
.footer-base p { margin: 0; }
.footer-base .credit { flex-basis: 100%; font-size: 0.7rem; color: rgba(232, 236, 248, 0.36); }
/* Social links: company accounts as a row of icons, Rafael's own LinkedIn beside his broker line.
   Icons come from assets/images/social-icons.svg and take their colour from the link. */
.social-icon { display: block; width: 18px; height: 18px; }
.site-footer .footer-social-label { margin: 22px 0 8px; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.footer-social a:hover, .footer-social a:focus-visible { color: var(--ink); border-color: var(--accent); background-color: rgba(143, 182, 255, 0.1); }
.footer-social a:focus-visible { outline-offset: 2px; border-radius: 50%; }
.inline-social { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px 0 -6px 2px; vertical-align: middle; color: var(--ink-2); border-radius: 4px; transition: color 0.2s; }
.inline-social .social-icon { width: 15px; height: 15px; }
.inline-social:hover, .inline-social:focus-visible { color: var(--accent); }
.doc-footer .footer-social { gap: 8px; }
.doc-footer .footer-social a { width: 34px; height: 34px; }
.doc-footer .footer-social .social-icon { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .footer-social a, .inline-social { transition: none; } }

/* 10. Reveal motion (only once JS has started; content is visible without it) */
.js .reveal { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); }
.js .reveal-lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js .reveal-lines .line > span { display: inline-block; transform: translate3d(0, 108%, 0) rotate(2deg); transform-origin: 0 100%; transition: transform 1.4s var(--ease); }
.js .reveal-lines .line:nth-child(2) > span { transition-delay: 0.1s; }
.js .reveal-stagger > * { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 250ms); }
.js .is-in .reveal, .js .is-in.reveal { opacity: 1; transform: none; transition-delay: 0.25s; }
.js .is-in .reveal-lines .line > span { transform: none; }
.js .is-in .reveal-stagger > * { opacity: 1; transform: none; }
.js .is-in .body.reveal { transition-delay: 0.35s; }
.js .is-in .cta-row.reveal { transition-delay: 0.5s; }
.reveal-lines .line { display: block; }

/* 11. Responsive -------------------------------------------------------- */
@media (max-width: 1100px) {
  .system-map { display: none; }
  .telemetry { display: none; }
  .stepper { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px; grid-auto-flow: column; }
  .map-credit { left: 16px; right: auto; bottom: calc(6px + env(safe-area-inset-bottom)); max-width: 55vw; text-align: left; font-size: 0.56rem; }
  .step-btn { height: 44px; min-width: 44px; }
  body.next-visible .stepper { opacity: 0; pointer-events: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header { background: linear-gradient(180deg, rgba(3, 4, 10, 0.85), rgba(3, 4, 10, 0)); }
  .nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(3, 4, 10, 0.4); color: var(--ink); cursor: pointer; position: relative; z-index: 2; }
  .nav-toggle-lines, .nav-toggle-lines::before { display: block; width: 16px; height: 1px; background: currentColor; position: relative; transition: transform 0.4s var(--ease); }
  .nav-toggle-lines::before { content: ""; position: absolute; top: 5px; }
  .nav-toggle-lines { transform: translateY(-2.5px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-lines { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-lines::before { transform: translateY(-5px) rotate(-90deg); }
  .site-nav ul { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 22px; background: rgba(3, 4, 10, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s linear 0.4s; }
  .site-nav ul.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s; }
  .site-nav a { font-size: 1.6rem; font-stretch: 110%; font-weight: 300; color: var(--ink); }
  .site-nav .nav-cta { font-size: 1.1rem; padding: 12px 28px; }

  .chapter { padding-block: 34vh 20vh; align-items: flex-end; }
  .chapter-center { align-items: center; }
  .panel, .panel-wide { max-width: none; padding: 26px 22px; border-radius: 22px; background: rgba(5, 7, 16, 0.66); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .panel::before { display: none; }
  .chapter-right .panel { margin-left: 0; }
  .hero { padding-bottom: 120px; }
  .display { font-size: clamp(2.7rem, 13vw, 4.6rem); }
  .eyebrow { display: grid; gap: 6px; }
  .eyebrow .sep { display: none; }
  .hero .wrap::before { content: ""; position: absolute; inset: -10% -6% -12%; z-index: -1; background: radial-gradient(closest-side, rgba(3, 4, 10, 0.6), transparent); pointer-events: none; }
  .offices { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; gap: 18px; }
  .consulting { columns: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-intro::before { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
}
@media (max-width: 420px) {
  .footer-eho { grid-template-columns: 1fr; }
  .footer-eho img { grid-row: auto; margin-bottom: 14px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
}

/* 12. Reduced motion / no-WebGL --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
.no-webgl .stage-fallback { display: block; }
.no-webgl .stage canvas { display: none; }
.no-webgl .telemetry, .no-webgl .cursor { display: none; }

/* 13. Document pages (privacy, accessibility, procedures, 404, thanks) -- */
.doc-page { background: radial-gradient(ellipse 80% 50% at 80% -10%, rgba(76, 60, 200, 0.22), transparent 70%), radial-gradient(ellipse 60% 40% at 0% 0%, rgba(17, 156, 181, 0.12), transparent 70%), var(--bg); background-attachment: fixed; }
.doc-page .site-header { position: sticky; background: rgba(3, 4, 10, 0.75); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.doc-page .site-header:not(.is-scrolled)::before { display: none; }
.doc-back { font-size: 0.84rem; color: var(--ink-2); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.doc-back:hover { color: var(--ink); }
.doc { padding: clamp(56px, 10vh, 120px) var(--gutter) 80px; }
.doc-inner { max-width: 760px; margin: 0 auto; }
.doc .eyebrow { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.doc h1 { font-weight: 300; font-stretch: 108%; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 18px; }
.doc h2 { font-weight: 450; font-stretch: 104%; font-size: 1.25rem; margin: 46px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 16px; }
.doc ul { padding-left: 1.2em; margin: 0 0 18px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: var(--ink); font-weight: 550; }
.doc .updated { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 0.9rem; display: block; overflow-x: auto; }
.doc caption { text-align: left; color: var(--ink-3); font-size: 0.8rem; padding-bottom: 8px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 500; background: rgba(238, 241, 248, 0.04); }
.doc .sop-states { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.doc .sop-states li { margin: 0; }
.doc .btn-primary { color: var(--bg); text-decoration: none; }
.doc-footer { padding-top: 0; background: none; }
.doc-footer .footer-base { border-top: 1px solid var(--line); }
.doc-center { min-height: calc(100vh - 160px); min-height: calc(100svh - 160px); display: grid; place-items: center; text-align: center; }
.doc-center .doc-inner { display: grid; justify-items: center; gap: 4px; }
.doc-center .big { font-weight: 200; font-stretch: 120%; font-size: clamp(5rem, 18vw, 11rem); line-height: 0.9; letter-spacing: -0.05em; background: linear-gradient(180deg, #fff, rgba(143, 182, 255, 0.35)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 12px; }
.doc-center h1 em { font-family: var(--f-serif); font-style: italic; font-stretch: 100%; }
.doc-center .cta-row { justify-content: center; }
.doc-mark { width: 108px; height: 60px; margin-bottom: 26px; filter: drop-shadow(0 0 24px rgba(143, 182, 255, 0.45)); }
.doc-orbit { width: 120px; height: 120px; margin-bottom: 28px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 35%, #9fd8e6, #1d6f86 45%, #06233d 70%); box-shadow: inset -18px -14px 30px rgba(0, 0, 0, 0.75), 0 0 60px rgba(83, 214, 230, 0.25); }
.doc-orbit::after { content: ""; position: absolute; inset: -26px; border-radius: 50%; border: 1px solid var(--line-2); transform: rotateX(72deg); animation: spin 14s linear infinite; }
.doc-orbit::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); top: 50%; left: -30px; animation: orbit 6s linear infinite; transform-origin: 90px 0; }
@keyframes spin { to { transform: rotateX(72deg) rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }

/* Photographed cities: hide hints that refer to the drawn 3D extras. */

/* Photographed Earth: no drawn labels over the photographs */

/* ---- Network maps (chapters 02-08) ------------------------------------------------- */
.stage .netmap { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.netmap .maplibregl-canvas { outline: none; }
.netmap .maplibregl-ctrl-bottom-right { pointer-events: auto; right: 8px; bottom: 6px; }
.netmap .maplibregl-ctrl-attrib { background: rgba(3, 4, 10, 0.55) !important; color: rgba(238, 241, 248, 0.55); font: 10px/1.4 var(--f-sans); }
.netmap .maplibregl-ctrl-attrib a { color: rgba(238, 241, 248, 0.7); }
.netmap .maplibregl-ctrl-attrib-button { filter: invert(1) opacity(0.6); }
.nm-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nm-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(214, 226, 255, 0.86); opacity: 0; transition: opacity 0.35s, color 0.3s; will-change: transform, opacity; }
.nm-label span { display: inline-block; transform: translate(12px, -50%); text-shadow: 0 0 6px rgba(3, 4, 10, 0.9), 0 0 2px rgba(3, 4, 10, 1); }
.nm-label.nm-hub { color: var(--ink); font-size: 0.7rem; letter-spacing: 0.12em; }
.nm-label.nm-hub span { padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(3, 4, 10, 0.8); text-shadow: none; }
.nm-label.nm-hub span { transform: translate(16px, -50%); }
.nm-label.is-on { opacity: 1; }
.nm-label.is-hot { color: var(--gold); }
body.netmap-on #labels, body.netmap-on #map-credit { display: none; }
.nm-label.is-left span { transform: translate(calc(-100% - 12px), -50%); }
.nm-label.nm-hub.is-left span { transform: translate(calc(-100% - 16px), -50%); }

/* ---- Agents ----------------------------------------------------------------------- */
.agents { margin-top: 36px; display: grid; gap: 20px; }
.agents .agent { margin-top: 0; }
.agent-mini { margin-top: 28px; display: inline-flex; gap: 16px; align-items: center; padding: 12px 22px 12px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); color: inherit; text-decoration: none; transition: border-color 0.3s, background 0.3s; }
.agent-mini:hover { border-color: var(--line-2); background: rgba(14, 18, 36, 0.7); }
.agent-mini img { width: 58px; height: 58px; }
.agent-kicker { margin: 0 0 2px; font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.agent-mini .agent-title { margin-bottom: 0; }
.agent-more { margin-left: 6px; color: var(--accent); font-size: 0.88rem; white-space: nowrap; }

/* ---- Agent bio page --------------------------------------------------------------- */
.doc-bio .doc-inner { max-width: 1120px; }
.bio-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.bio-photo { margin: 0; position: sticky; top: 110px; }
.bio-photo img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.bio-tagline { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.6rem); color: var(--gold) !important; margin: 0 0 22px !important; }
.bio-facts { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.bio-facts li { border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-family: var(--f-sans); font-size: 0.875rem; font-weight: 450; line-height: 1.2; color: var(--ink); }
.bio-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px !important; }
.bio-brokerage { margin-top: 28px !important; font-size: 0.8rem; color: var(--ink-3) !important; }
.nowrap { white-space: nowrap; }
@media (max-width: 860px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo { position: static; max-width: 440px; }
}
.agent-mini > span:not(.agent-more) > span { display: block; }
.doc .bio-facts { padding: 0; margin-left: 0; } .doc .bio-facts li { margin: 0; list-style: none; }

/* ---- Language switch (EN / ES) --------------------------------------------------- */
.header-end { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.header-end .lang-switch { order: 2; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(3, 4, 10, 0.35); font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.12em; }
.lang-switch a { min-width: 30px; text-align: center; padding: 5px 8px; border-radius: 999px; color: var(--ink-2); text-decoration: none; transition: color 0.3s, background-color 0.3s; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 860px) {
  .header-end .lang-switch { order: 0; }
  .lang-switch a { padding: 8px 9px; }
}
.bio-email { margin-top: 18px !important; font-size: 0.95rem; } .bio-email a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.nm-measure .reveal, .nm-measure .reveal-lines .line > span, .nm-measure .reveal-stagger > * { transform: none !important; transition: none !important; }
.nm-label.is-below span { transform: translate(-50%, 10px); }
.nm-label.is-above span { transform: translate(-50%, calc(-100% - 10px)); }
@media (max-width: 420px) {
  .site-header { padding-inline: 16px; }
  .brand { gap: 7px; }
  .brand .brand-mark { width: 34px; height: 19px; }
  .brand-word { height: 25px; }
  .header-end { gap: 8px; }
  .lang-switch a { min-width: 26px; padding: 7px 6px; }
  .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 359px) {
  .lang-switch a[aria-current="true"] { display: none; }   /* very small phones: just the other language */
}

/* ---- Bio page sections (Rafael: real estate / healthcare / due diligence) ---------- */
.bio-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 8px; }
.bio-nav a { text-decoration: none; color: var(--ink); font-size: 0.86rem; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.bio-nav a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bio-section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.doc .bio-section h2 { border-top: 0; padding-top: 0; margin-top: 0; font-weight: 400; font-stretch: 106%; font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 16px; color: var(--ink); display: flex; gap: 14px; align-items: baseline; }
.bio-num { font-size: 0.66rem; letter-spacing: 0.14em; color: var(--accent); }
.doc .bio-list { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; }
.doc .bio-list li { position: relative; padding-left: 22px; margin: 0; line-height: 1.55; }
.doc .bio-list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--accent); }
.bio-list strong { color: var(--ink); font-weight: 500; }
.doc .bio-creds h2 { font-size: 1.05rem; }
.doc-bio .bio-photo img[width="480"] { max-width: 440px; }
.svc-link { display: inline-block; margin-top: 6px; color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(143, 182, 255, 0.35); font-size: 0.92em; }
.svc-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
/* A service heading that links out to a partner site (Due diligence → Rising Solutions Group). */
.svc-ext { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(143, 182, 255, 0.35); transition: color 0.2s, border-color 0.2s; }
.svc-ext:hover, .svc-ext:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.svc-ext-arrow { display: inline-block; margin-left: 0.3em; font-size: 0.8em; color: var(--accent); transition: transform 0.2s; }
.svc-ext:hover .svc-ext-arrow { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) { .svc-ext, .svc-ext-arrow { transition: none; } }
.panel-wide .agent-mini { margin-top: 22px; }
.agent-title { line-height: 1.6; }
@media (max-width: 520px) {
  .agent-mini { padding-right: 18px; }
  .agent-mini .agent-more { display: none; }   /* the whole card is the link on phones */
}
.stat dd:has(.stat-long) { flex-wrap: nowrap; }
@media (max-width: 520px) {
  .stat-num.stat-long { font-size: 1.32rem; letter-spacing: -0.01em; }
  .stat dd:has(.stat-long) .stat-pre { font-size: 1.32rem; margin: 0 2px 0 0; }
}

/* ---- Advisory services page --------------------------------------------------------- */
.doc-advisory .doc-inner { max-width: 1120px; }
.doc-advisory h1 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }
.adv-intro { max-width: 760px; font-size: 1.05rem; line-height: 1.65; }
.adv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 36px; }
.adv-card { padding: 26px 0 24px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.doc .adv-card h2 { border-top: 0; padding-top: 0; margin: 0 0 10px; font-weight: 400; font-stretch: 104%; font-size: 1.2rem; color: var(--ink); display: flex; gap: 12px; align-items: baseline; }
.doc .adv-card p { margin: 0; line-height: 1.6; }
.adv-card .svc-link { margin-top: 10px; }
.adv-card:target { background: linear-gradient(90deg, rgba(143, 182, 255, 0.07), transparent 70%); }
.adv-cta { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc .adv-cta h2 { border-top: 0; padding-top: 0; margin: 0 0 6px; font-weight: 400; font-size: 1.5rem; color: var(--ink); }
@media (max-width: 860px) { .adv-grid { grid-template-columns: 1fr; } }
/* the homepage list links to each service */
.consulting li a { color: inherit; text-decoration: none; }
.consulting li a:hover { color: #fff; }
.adv-all { margin: 18px 0 0; }
@media (max-width: 860px) { .site-header.is-scrolled::before { background: rgba(4, 6, 13, 0.88); } }
