/* mussa.tech — carta técnica de rede logística */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens: carta diurna ---------- */
:root {
  --paper: #E4E8E3;
  --paper-2: #D8DFD9;
  --land: #CDD6CF;
  --land-faint: #D6DDD7;
  --ink: #14253D;
  --ink-2: #3B4F67;
  --ink-3: #6A7B8E;
  --rule: rgba(20, 37, 61, .2);
  --rule-strong: rgba(20, 37, 61, .45);
  --lane: #F26B1D;
  --lane-ink: #A8420A;
  --lane-soft: rgba(242, 107, 29, .16);
  --lane-type: #C95010;      /* laranja para texto sobre papel (≥3:1) */
  --alert: #B83A20;
  --node: #13867F;
  --node-ink: #0D615C;
  --ball: #2350E8;
  --ball-seam: #DCE5FF;
  --field: #14253D;          /* campo invertido (rota de carreira, rodapé) */
  --field-ink: #E4E8E3;
  --field-ink-2: #AEBBC8;
  --field-rule: rgba(228, 232, 227, .18);
  --hatch: rgba(20, 37, 61, .085);
  --stipple: rgba(20, 37, 61, .5);
  --shadow: 0 1px 2px rgba(20, 37, 61, .08), 0 8px 24px -12px rgba(20, 37, 61, .25);

  /* escala tipográfica: oito passos */
  --fs-label: .7rem;
  --fs-small: .85rem;
  --fs-ui: .9rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1rem, 1.5vw, 1.35rem);
  --fs-title: clamp(1.35rem, 2.2vw, 1.9rem);
  --fs-headline: clamp(2rem, 4.4vw, 3.6rem);
  --fs-display: clamp(3rem, 6.6vw, 6rem);
  --on-ball: #FFFFFF;

  --f-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --bar-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* ---------- tokens: carta noturna ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1A28;
    --paper-2: #132234;
    --land: #1B2D43;
    --land-faint: #15253A;
    --ink: #E2E8E4;
    --ink-2: #A9B7C6;
    --ink-3: #7C8DA0;
    --rule: rgba(226, 232, 228, .16);
    --rule-strong: rgba(226, 232, 228, .4);
    --lane: #FF7A2E;
    --lane-ink: #FF9C5E;
    --lane-soft: rgba(255, 122, 46, .16);
    --lane-type: #FF7A2E;
    --alert: #FF8B7B;
    --node: #34C3B4;
    --node-ink: #5BD6C8;
    --ball: #4C74FF;
    --ball-seam: #DDE5FF;
    --on-ball: #08111C;
    --field: #08111C;
    --field-ink: #E2E8E4;
    --field-ink-2: #A9B7C6;
    --field-rule: rgba(226, 232, 228, .14);
    --hatch: rgba(226, 232, 228, .05);
    --stipple: rgba(226, 232, 228, .42);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1A28;
  --paper-2: #132234;
  --land: #1B2D43;
  --land-faint: #15253A;
  --ink: #E2E8E4;
  --ink-2: #A9B7C6;
  --ink-3: #7C8DA0;
  --rule: rgba(226, 232, 228, .16);
  --rule-strong: rgba(226, 232, 228, .4);
  --lane: #FF7A2E;
  --lane-ink: #FF9C5E;
  --lane-soft: rgba(255, 122, 46, .16);
  --lane-type: #FF7A2E;
  --alert: #FF8B7B;
  --node: #34C3B4;
  --node-ink: #5BD6C8;
  --ball: #4C74FF;
  --ball-seam: #DDE5FF;
  --on-ball: #08111C;
  --field: #08111C;
  --field-ink: #E2E8E4;
  --field-ink-2: #A9B7C6;
  --field-rule: rgba(226, 232, 228, .14);
  --hatch: rgba(226, 232, 228, .05);
  --stipple: rgba(226, 232, 228, .42);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--lane);
  overflow-x: hidden;
}
::selection { background: var(--lane); color: #14253D; }
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lane); outline-offset: 3px; }
.mono { font-family: var(--f-mono); font-size: .8em; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

html { scrollbar-color: var(--ink-3) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--paper); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--lane); color: #14253D; padding: 10px 14px; font-weight: 650;
}
.skip:focus { top: 12px; }

.tag {
  font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  font-size: var(--fs-label); color: var(--node-ink);
}

/* ---------- barra ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.bar.is-scrolled { border-bottom-color: var(--rule); }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-stretch: 125%; font-weight: 800; font-size: var(--fs-body); letter-spacing: -.01em;
}
.wordmark__hub { width: 22px; height: 22px; color: var(--lane); }
.wordmark__dot { color: var(--lane); }
.bar__nav { display: flex; gap: 22px; margin-left: auto; }
.bar__nav a {
  text-decoration: none; font-stretch: 85%; font-weight: 600; font-size: var(--fs-ui); color: var(--ink-2);
  padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s;
}
.bar__nav a:hover, .bar__nav a.is-current { color: var(--ink); border-bottom-color: var(--lane); }
.bar__tools { display: flex; align-items: center; gap: 10px; }
.bar__nav + .bar__tools { margin-left: 18px; }
.lang { display: inline-flex; border: 1px solid var(--rule-strong); }
.lang__btn {
  border: 0; background: transparent; cursor: pointer; padding: 5px 9px;
  font-stretch: 75%; font-weight: 700; letter-spacing: .08em; font-size: var(--fs-label); color: var(--ink-2);
}
.lang__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--ink); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
.enter-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  text-decoration: none; font-weight: 650; font-size: var(--fs-small);
  background: var(--ink); color: var(--paper);
  transition: background-color .2s, color .2s;
}
.enter-btn svg { width: 16px; height: 16px; --paper: var(--ink); }
.enter-btn:hover { background: var(--lane); color: #14253D; }
.enter-btn:hover svg { --paper: var(--lane); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border: 1.5px solid var(--ink); background: transparent; cursor: pointer; text-decoration: none;
  font-weight: 650; font-size: var(--fs-body); letter-spacing: .005em;
  transition: background-color .2s var(--ease-out), color .2s, transform .15s var(--ease-out), box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn__arrow { transition: transform .25s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lane); border-color: var(--lane); color: #14253D; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--block { width: 100%; justify-content: space-between; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "text map";
  gap: 0 clamp(16px, 3vw, 40px);
  min-height: calc(100svh - var(--bar-h));
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) var(--gutter) clamp(24px, 4vh, 40px);
}
.lanes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.hero__text { grid-area: text; position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.hero__name {
  font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: var(--fs-display); line-height: .86; letter-spacing: -.015em;
  margin-bottom: 26px;
}
.hero__name span { display: block; }
.hero__name span + span { color: var(--lane-type); font-size: clamp(1.8rem, 4vw, 3.4rem); font-stretch: 100%; }
.hero__lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 30ch; color: var(--ink); margin-bottom: 14px; font-weight: 450; }
.hero__role { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--fs-ui); color: var(--ink-2); margin-bottom: 30px; }
.hero__co { font-weight: 700; color: var(--ink); }

.legend { border-top: 1.5px solid var(--ink); margin-bottom: 26px; max-width: 460px; }
.legend__title {
  margin: 0; padding: 8px 0 6px; font-stretch: 75%; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; font-size: var(--fs-label); color: var(--ink-2);
}
.legend__list { list-style: none; margin: 0; padding: 0; }
.legend__item {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 16px;
  padding: 10px 0; text-decoration: none; border-top: 1px solid var(--rule);
}
.legend__name { font-stretch: 112%; font-weight: 700; font-size: var(--fs-body); line-height: 1.25; transition: color .2s; }
.legend__meta { grid-row: 2; font-size: var(--fs-small); color: var(--ink-2); }
.legend__dock {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  width: 28px; height: 28px; color: var(--ink); transition: transform .3s var(--ease-out), color .2s;
}
.dock--lane { color: var(--lane); }
.dock--node { color: var(--node); }
.legend__item:hover .legend__name, .legend__item:focus-visible .legend__name { color: var(--lane-ink); }
.legend__item:hover .legend__dock, .legend__item:focus-visible .legend__dock { transform: scale(1.18); }

.hero__map { grid-area: map; position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.map { width: 100%; height: auto; max-height: calc(100svh - var(--bar-h) - 110px); overflow: visible; touch-action: pan-y; }
.map__grat line, .map__grat path { stroke: var(--rule); stroke-width: .7; vector-effect: non-scaling-stroke; fill: none; stroke-dasharray: 2 4; }
.map__grat .is-special { stroke: var(--rule-strong); stroke-dasharray: 6 4; }
.map__neighbors { fill: var(--land-faint); stroke: var(--ink-3); stroke-width: .6; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: .9; }
.map__brazil-fill { fill: url(#stipple); }
.stipple-dot { fill: var(--stipple); }
.map__brazil { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .map__brazil { stroke-dashoffset: 1; }
.js .is-drawn .map__brazil { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease-out); }
.map__labels text { font-family: var(--f-sans); fill: var(--ink-2); font-stretch: 75%; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.map__labels .lbl-mono { font-family: var(--f-mono); letter-spacing: 0; text-transform: none; font-weight: 400; }
.map__labels .lbl-hub { fill: var(--ink); font-stretch: 112%; font-weight: 800; letter-spacing: .04em; }
.map__labels .lbl-country { fill: var(--ink-2); font-stretch: 112%; font-weight: 700; letter-spacing: .5em; }
.map__labels .lbl-sea { fill: var(--ink-2); font-style: normal; letter-spacing: .4em; }
.map__labels .frame { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map__labels .tick { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map__labels .scale-a { fill: var(--ink); }
.map__labels .scale-b { fill: var(--paper); stroke: var(--ink); stroke-width: .8; vector-effect: non-scaling-stroke; }
.map__hub .hub-core { fill: var(--lane); }
.map__hub .hub-ring { fill: none; stroke: var(--lane); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.map__hub .hub-pulse { fill: none; stroke: var(--lane); stroke-width: 1.2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: pulse 2.8s var(--ease-out) infinite; }
.map__hub .hub-pulse:nth-child(2) { animation-delay: 1.4s; }
@keyframes pulse { from { transform: scale(.4); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }

.instrument {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--rule); font-family: var(--f-mono); font-size: var(--fs-label); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.instrument b { font-family: var(--f-sans); font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--ink-2); margin-right: 6px; }
.instrument output { color: var(--ink); }
.instrument__solver output { font-family: var(--f-sans); font-variant-numeric: tabular-nums; font-size: var(--fs-small); }
.instrument__cursor output { display: inline-block; min-width: 15ch; }

/* lanes (SVG overlays) */
.lane { fill: none; stroke: var(--lane); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 6 7; animation: flow 1.6s linear infinite; opacity: .85; transition: opacity .25s; }
.lane--quiet { stroke: var(--ink-3); opacity: .55; stroke-dasharray: 3 6; }
.lane.is-hot { stroke-width: 3; opacity: 1; }
.lane-end { fill: var(--lane); }
.packet { fill: var(--lane); }
.packet-ring { fill: none; stroke: var(--lane); stroke-width: 1.5; }
@keyframes flow { to { stroke-dashoffset: -26; } }

/* ---------- seções ---------- */
section { position: relative; }
.h2 {
  font-stretch: 118%; font-weight: 800; text-transform: uppercase; letter-spacing: -.005em;
  font-size: var(--fs-headline); line-height: .95; margin-bottom: 22px;
}
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head__lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 46ch; margin: 0; }
.sec-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }

/* CONSULTORIA */
.services { padding: clamp(80px, 10vw, 140px) 0; border-top: 1.5px solid var(--ink); }
.services__head { max-width: 900px; margin-bottom: clamp(35px, 5vw, 64px); }
.services__eyebrow { font-family: var(--mono, monospace); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.services__grid article { border-top: 1px solid var(--rule-strong); padding-top: 20px; }
.services__grid h3 { font-size: var(--fs-lead); line-height: 1.15; margin: 0 0 14px; }
.services__grid p, .services__closing { font-size: var(--fs-body); color: var(--ink-2); }
.services__closing { max-width: 70ch; margin: 38px 0 24px; }
.services__detail { display: block; width: fit-content; margin-top: 20px; color: var(--ink); text-underline-offset: .2em; font-weight: 650; }
@media (max-width: 700px) { .services__grid { grid-template-columns: 1fr; } }

/* QUEM */
.who { padding: clamp(80px, 11vw, 150px) 0 clamp(70px, 9vw, 120px); border-top: 1.5px solid var(--ink); }
.who__grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px);
  grid-template-areas: "plate body" "plate ledger";
  align-items: start;
}
.plate { grid-area: plate; margin: 0; position: sticky; top: calc(var(--bar-h) + 24px); }
.plate__frame { position: relative; padding: 14px; border: 1px solid var(--rule-strong); background: var(--paper-2); }
.plate__frame img { width: 100%; height: auto; filter: url(#duotone) contrast(1.04); }
.plate figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.plate-code, .gate__code { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.reg { position: absolute; width: 12px; height: 12px; border: 0 solid var(--ink); }
.reg--tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.reg--tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.reg--bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.reg--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.who__body { grid-area: body; max-width: 66ch; }
.who__body p { font-size: var(--fs-body); }
.who__body p:first-of-type { font-size: var(--fs-lead); line-height: 1.5; }
.who__langs { display: flex; gap: 10px; align-items: baseline; font-size: var(--fs-ui) !important; color: var(--ink-2); padding-top: 6px; }

.ledger-wrap { grid-area: ledger; overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger caption {
  text-align: left; caption-side: top; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink);
  font-stretch: 112%; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: var(--fs-body);
}
.ledger th, .ledger td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.ledger thead th { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--ink-2); padding-top: 10px; padding-bottom: 8px; }
.ledger tbody th { font-weight: 450; font-size: var(--fs-body); }
.ledger td { font-size: var(--fs-ui); color: var(--ink-2); }
.ledger .num { text-align: right; font-family: var(--f-mono); font-size: var(--fs-body); color: var(--ink); white-space: nowrap; padding-right: 24px; }
.ledger thead .num { font-family: var(--f-sans); font-size: var(--fs-label); color: var(--ink-2); }
.ledger tbody tr { transition: background-color .2s; }
.ledger tbody tr:hover { background: var(--lane-soft); }

/* CARREIRA */
.career {
  background: var(--field); color: var(--field-ink);
  padding: clamp(80px, 11vw, 150px) 0;
  --ink: var(--field-ink); --ink-2: var(--field-ink-2); --rule: var(--field-rule); --paper: var(--field);
}
.career ::selection { background: var(--lane); color: #14253D; }
.route-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .5fr); gap: 0 clamp(24px, 4vw, 64px); }
.odo { position: relative; }
.odo__inner { position: sticky; top: calc(50vh - 110px); padding: 6px 0 6px clamp(20px, 3vw, 40px); border-left: 1px solid var(--field-rule); }
.odo__meta { display: block; color: var(--field-ink-2); font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); }
.odo__meta b { font-weight: 400; color: var(--field-ink); letter-spacing: 0; font-size: var(--fs-small); }
.odo__year {
  display: block; margin-top: 6px; color: var(--lane);
  font-stretch: 125%; font-weight: 800; font-size: var(--fs-display); line-height: .92; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.odo__co { display: block; margin-top: 10px; font-stretch: 112%; font-weight: 700; text-transform: uppercase; font-size: var(--fs-body); letter-spacing: .02em; min-height: 1.4em; }
.odo__ticks { display: flex; gap: 5px; margin-top: 18px; }
.odo__ticks i { width: 20px; height: 4px; background: var(--field-rule); transition: background-color .3s; }
.odo__ticks i.on { background: var(--node); }
.odo__ticks i.cur { background: var(--lane); }
.route { list-style: none; margin: 0; padding: 0; }
.route__line { position: absolute; top: 6px; bottom: 6px; left: calc(8.5rem + 15px); width: 2px; }
.route__svg { position: absolute; left: -10px; top: 0; width: 22px; height: 100%; overflow: visible; }
.lane--route { stroke: var(--field-ink-2); stroke-width: 1.4; stroke-dasharray: 3 7; opacity: .55; animation-duration: 2.4s; }
.lane--progress { stroke: var(--lane); stroke-width: 2.4; opacity: 1; }
.route__vehicle {
  position: absolute; left: 50%; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  background: var(--lane); border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(242, 107, 29, .22), 0 0 0 11px rgba(242, 107, 29, .1);
}
.stop {
  position: relative;
  display: grid; grid-template-columns: 8.5rem 32px minmax(0, 1fr); gap: 0 28px;
  padding: 0 0 clamp(36px, 5vw, 56px);
}
.stop:last-child { padding-bottom: 0; }
.stop__years { padding-top: .35em; color: var(--field-ink-2); font-size: var(--fs-ui); text-align: right; }
.stop__node {
  width: 16px; height: 16px; margin: .45em 0 0 8px; border-radius: 50%;
  background: var(--field); border: 2px solid var(--field-ink-2); position: relative; z-index: 1;
  transition: background-color .4s var(--ease-out), border-color .4s, transform .4s var(--ease-out);
}
.stop.is-passed .stop__node { background: var(--node); border-color: var(--node); }
.stop--now .stop__node { border-color: var(--lane); background: var(--lane); }
.stop.is-near .stop__node { transform: scale(1.25); }
.stop__body { max-width: 62ch; }
.stop__co { font-stretch: 118%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-title); line-height: 1.05; margin-bottom: 4px; }
.stop__role { color: var(--lane); font-weight: 600; margin-bottom: 8px; font-size: var(--fs-body); }
.stop__body p:not(.stop__role):not(.transfer) { color: var(--field-ink-2); margin-bottom: 0; }
.stop.is-passed .stop__body p:not(.stop__role):not(.transfer) { color: var(--field-ink); }
.stop__body p { transition: color .5s; }
.transfer { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: var(--fs-ui); color: var(--field-ink-2); }
.transfer__glyph { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--node); box-shadow: inset 0 0 0 3px var(--field), inset 0 0 0 5px var(--node); flex: none; }

/* PROJETOS */
.projects { padding: clamp(80px, 11vw, 150px) 0; }
.projects__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); }
.projects__head { align-self: stretch; display: flex; flex-direction: column; }
.workshop { margin-top: auto; margin-bottom: auto; padding-top: 40px; display: inline-flex; align-items: center; gap: 14px; }
@media (min-width: 1100px) {
  .workshop { flex-direction: row-reverse; align-self: flex-end; text-align: right; }
}
.workshop__glyph { width: 46px; height: 46px; color: var(--lane); flex: none; }
.workshop b { display: block; font-stretch: 118%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-lead); line-height: 1.1; }
.workshop .mono { color: var(--ink-2); }
.facilities { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.facility { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--rule); transition: border-color .25s; }
.facility:hover { border-bottom-color: var(--lane); }
.facility__dock { width: 30px; height: 30px; color: var(--node); margin-top: 3px; transition: transform .3s var(--ease-out), color .2s; }
.facility:hover .facility__dock { color: var(--lane); transform: rotate(45deg); }
.facility__type { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--node-ink); margin-right: 4px; white-space: nowrap; }
.facility__type::after { content: "·"; margin-left: 4px; letter-spacing: 0; color: var(--ink-2); font-weight: 400; }
.facility__name { font-stretch: 118%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-title); line-height: 1.05; margin-bottom: 8px; }
.facility p { max-width: 58ch; margin-bottom: 8px; }
.facility__stack { color: var(--ink-2); margin: 0 !important; font-size: var(--fs-ui); }
.facility--lead .facility__name { font-size: var(--fs-headline); }
.facility--lead p:not(.facility__type):not(.facility__stack) { font-size: var(--fs-lead); }

/* MIA & LOKI */
.dogs { padding: clamp(80px, 11vw, 150px) 0; background: var(--paper-2); border-top: 1.5px solid var(--ink); }
.dog-head { margin: 0; display: flex; align-items: center; gap: 16px; max-width: 360px; }
.dog-head svg { width: 92px; height: 92px; flex: none; overflow: visible; }
.dog-head__br { fill: var(--land); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dog-head__ring { fill: var(--lane-soft); stroke: var(--lane); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.dog-head figcaption { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.45; }
.kennel {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .78fr);
  grid-template-areas: "mia loki reel" "toss toss reel";
  gap: clamp(24px, 3vw, 44px) clamp(20px, 3vw, 44px);
  align-items: start;
}
#dogMia { grid-area: mia; }
#dogLoki { grid-area: loki; margin-top: clamp(40px, 6vw, 90px); }
.reel { grid-area: reel; margin: 0; }
.toss { grid-area: toss; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; position: relative; z-index: 2; }
.dog { position: relative; z-index: 1; }
.dog__photo { position: relative; padding: 10px; background: var(--paper); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); }
.dog__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.dog__pin {
  position: absolute; top: -11px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--lane); z-index: 2;
}
.dog__pin::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--lane); }
.dog__name { font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-headline); line-height: 1; margin: 18px 0 10px; }
.dog__data { margin: 0; border-top: 1.5px solid var(--ink); }
.dog__data div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.dog__data dt { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--ink-2); padding-top: .3em; }
.dog__data dd { margin: 0; font-size: var(--fs-ui); }
.reel__frame { position: relative; border: 1px solid var(--rule-strong); padding: 8px; background: var(--paper); box-shadow: var(--shadow); }
.reel video { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: var(--land); }
.reel__toggle {
  position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: var(--shadow);
}
.reel__toggle svg { width: 20px; height: 20px; }
.reel__toggle .i-pause { display: none; }
.reel.is-playing .reel__toggle .i-pause { display: block; }
.reel.is-playing .reel__toggle .i-play { display: none; }
.reel figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-2); line-height: 1.45; }
.reel figcaption b { display: block; color: var(--ink); font-stretch: 112%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-ui); }
.btn--ball { border-color: var(--ball); color: var(--ink); }
.btn--ball:hover { background: var(--ball); color: var(--on-ball); }
.btn--ball svg { width: 22px; height: 22px; }
.toss__log { margin: 0; color: var(--ink-2); font-size: var(--fs-ui); }
.toss__log output { color: var(--ink); }
.ball-sprite { position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 3; pointer-events: none; will-change: transform; }
.ball-sprite svg { width: 30px; height: 30px; transform-origin: 50% 50%; filter: drop-shadow(0 3px 3px rgba(20, 37, 61, .3)); }
.lane--ball { stroke: var(--ball); opacity: .7; }

/* ACESSO */
.access {
  padding: clamp(80px, 11vw, 150px) 0;
  background:
    repeating-linear-gradient(-45deg, var(--hatch) 0 1.5px, transparent 1.5px 13px),
    var(--paper);
  border-top: 1.5px solid var(--ink);
}
.access__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.access__text p { font-size: var(--fs-lead); max-width: 44ch; }
.access__note { font-size: var(--fs-ui) !important; color: var(--ink-2); }
.gate { background: var(--paper); border: 1.5px solid var(--ink); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); position: relative; }
.gate__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.gate__lock { width: 34px; height: 34px; color: var(--ink); }
.gate__lock .shackle { transition: transform .45s var(--ease-out); transform-origin: 16px 11px; }
.gate[data-state="ok"] .gate__lock .shackle { transform: translateY(-3px) rotate(-18deg); }
.gate[data-state="ok"] .gate__lock { color: var(--node); }
.gate__code { color: var(--ink-2); }
.gate__form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--ink-2); }
.field input {
  font: inherit; font-size: var(--fs-body); color: var(--ink); background: var(--paper-2);
  border: 0; border-bottom: 1.5px solid var(--ink); padding: 11px 12px; border-radius: 0; outline: none;
  transition: border-color .2s, background-color .2s;
}
.field input:focus { border-bottom-color: var(--lane); background: var(--paper); box-shadow: inset 0 -1.5px 0 var(--lane); }
.field input[aria-invalid="true"] { border-bottom-color: var(--alert); }
#totp { font-family: var(--f-mono); letter-spacing: .4em; font-size: var(--fs-title); }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-ui); color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--lane); margin: 0; }
.gate__alt { font-size: var(--fs-ui); color: var(--ink-2); justify-self: start; }
.gate__session p { margin-bottom: 14px; }
.gate__status { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--fs-small); }
.gate__status > span:first-child { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); }
.gate__status output { color: var(--ink); }
.gate[data-state="error"] .gate__status output { color: var(--alert); }
.gate[data-state="ok"] .gate__status output { color: var(--node-ink); }
.gate.is-shaking { animation: shake .42s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }

/* RODAPÉ */
.colophon { background: var(--field); color: var(--field-ink); padding: 56px 0 40px; --ink: var(--field-ink); --ink-2: var(--field-ink-2); --rule: var(--field-rule); }
.colophon__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px 64px; }
.colophon__name { font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: var(--fs-title); margin-bottom: 4px; }
.colophon p { color: var(--field-ink-2); }
.colophon__link { display: inline-flex; align-items: center; gap: 8px; color: var(--field-ink); text-decoration: none; border-bottom: 1px solid var(--lane); padding-bottom: 2px; }
.colophon__link svg { width: 18px; height: 18px; }
.colophon__link:hover { color: var(--lane); }
.colophon__notes { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.colophon__notes div { padding: 10px 0; border-top: 1px solid var(--field-rule); }
.colophon__notes dt { font-stretch: 75%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: var(--fs-label); color: var(--field-ink-2); }
.colophon__notes dd { margin: 2px 0 0; font-size: var(--fs-ui); }
.colophon__copy { grid-column: 1 / -1; margin: 0; color: var(--field-ink-2); padding-top: 18px; border-top: 1px solid var(--field-rule); font-size: var(--fs-small); }

/* ---------- responsivo ---------- */
@media (max-width: 1099px) {
  .bar__nav { display: none; }
  .bar__tools { margin-left: auto; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 28px;
  }
  .hero__text { display: contents; }
  .hero { grid-template-areas: none; }
  .hero__name { grid-row: 1; }
  .hero__lead { grid-row: 2; max-width: 36ch; }
  .hero__role { grid-row: 3; margin-bottom: 10px; }
  .hero__map { grid-area: auto; grid-row: 4; margin: 8px 30px 18px 0; }
  .legend { grid-row: 5; max-width: none; position: relative; z-index: 1; }
  .hero .btn { grid-row: 6; justify-self: start; position: relative; z-index: 1; }
  .map { max-height: 62svh; }
  .who__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "plate" "ledger"; }
  .plate { position: relative; top: 0; max-width: 420px; }
  .projects__grid { grid-template-columns: minmax(0, 1fr); }
  .route-wrap { grid-template-columns: minmax(0, 1fr); }
  .odo {
    order: -1; position: sticky; top: var(--bar-h); z-index: 3;
    margin: 0 calc(var(--gutter) * -1) 28px; padding: 10px var(--gutter);
    background: var(--field); border-bottom: 1px solid var(--field-rule);
  }
  .odo__inner { position: static; border: 0; padding: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
  .odo__year { order: 1; margin: 0; font-size: var(--fs-title); }
  .odo__co { order: 2; margin: 0; font-size: var(--fs-ui); min-height: 0; }
  .odo__meta { order: 3; margin-left: auto; }
  .odo__ticks { display: none; }
  .workshop { margin: 0; padding-top: 24px; }
  .kennel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "mia loki" "toss toss" "reel reel"; }
  .reel { max-width: 360px; }
  .access__grid { grid-template-columns: minmax(0, 1fr); }
  .colophon__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --bar-h: 58px; }
  :root { --fs-body: 1rem; --fs-display: clamp(2.6rem, 13.5vw, 4rem); }
  .wordmark span { font-size: var(--fs-ui); }
  .enter-btn span { display: none; }
  .enter-btn { padding: 0 9px; }
  .hero__name { margin-bottom: 18px; }
  .instrument__cursor { display: none; }
  .stop { grid-template-columns: 22px minmax(0, 1fr); gap: 0 16px; }
  .stop__years { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 4px; }
  .stop__node { grid-column: 1; grid-row: 1 / span 2; margin: .25em 0 0 3px; }
  .stop__body { grid-column: 2; grid-row: 2; }
  .route__line { left: 13px; }
  .sec-head--split { flex-direction: column; align-items: flex-start; }
  .kennel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "mia loki" "toss toss" "reel reel"; gap: 28px 14px; }
  #dogLoki { margin-top: 36px; }
  .dog__photo { padding: 6px; }
  .dog__name { font-size: var(--fs-title); margin: 14px 0 8px; }
  .dog__data div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 7px 0; }
  .dog__data dd { font-size: var(--fs-ui); }
  .reel { max-width: none; }
  .colophon__notes { grid-template-columns: minmax(0, 1fr); }
  .ledger tbody th { font-size: var(--fs-ui); }
  .ledger td:last-child { display: none; }
  .ledger thead th:last-child { display: none; }
  .ledger .num { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .map__brazil { stroke-dashoffset: 0; }
  .map__hub .hub-pulse { display: none; }
}
