/* =========================================================
   Guilherme Assis · portfólio
   Editorial: tipografia Apple (SF Pro), neutros, azul-marinho, escuro por padrão
   ========================================================= */

:root {
  /* tema claro */
  --bg: #F4F3EF;
  --bg-2: #ECEBE6;
  --bg-3: #E2E1DB;
  --fg: #111112;
  --fg-2: #4A4A47;
  --fg-3: #6B6A65;
  --line: #DBDAD3;
  --line-2: #C8C7C0;

  --navy: #1C3A5E;
  --signal: #1C3A5E;        /* ícones e realces em azul-marinho */
  --btn-bg: #1C3A5E;
  --btn-fg: #FFFFFF;
  --live: #2F8F69;
  --grain: .035;

  /* etapas dos fluxogramas: tons suaves */
  --src-bg: #F4ECDD; --src-bd: #E2D2B4; --src-ink: #8A6732;
  --ing-bg: #E5EDF7; --ing-bd: #C6D6EC; --ing-ink: #2E5A8F;
  --trf-bg: #E3F0EA; --trf-bd: #C1DED1; --trf-ink: #2F7058;
  --sem-bg: #ECE9F6; --sem-bd: #D5CEEC; --sem-ink: #574C99;
  --srv-bg: #1C3A5E; --srv-bd: #1C3A5E; --srv-ink: #FFFFFF;
  --alr-bg: #F6E7E4; --alr-bd: #EACBC5; --alr-ink: #94473C;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A0A0B;
  --bg-2: #111113;
  --bg-3: #19191C;
  --fg: #EDEDEA;
  --fg-2: #A3A39E;
  --fg-3: #7D7D78;
  --line: #1F1F22;
  --line-2: #2E2E33;

  --navy: #1C3A5E;
  --signal: #8DB0E3;
  --btn-bg: #EDEDEA;
  --btn-fg: #0A0A0B;
  --live: #5FC39B;
  --grain: .05;

  --src-bg: rgb(214 178 120 / .08); --src-bd: rgb(214 178 120 / .26); --src-ink: #DDBF8C;
  --ing-bg: rgb(120 160 220 / .09); --ing-bd: rgb(120 160 220 / .28); --ing-ink: #A6C3EA;
  --trf-bg: rgb(110 190 160 / .08); --trf-bd: rgb(110 190 160 / .26); --trf-ink: #96D2BA;
  --sem-bg: rgb(160 150 230 / .09); --sem-bd: rgb(160 150 230 / .28); --sem-ink: #BFB6EE;
  --srv-bg: #1C3A5E;                 --srv-bd: #2D5687;                 --srv-ink: #E4EDF9;
  --alr-bg: rgb(230 140 130 / .08); --alr-bd: rgb(230 140 130 / .26); --alr-ink: #E8A59B;

  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* granulação sutil sobre a página inteira */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
strong { color: var(--fg); font-weight: 600; }
button { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--bg); }

.i {
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: 10px 16px; border-radius: 999px; font-size: 14px;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.accent { color: var(--signal); }

.live {
  position: relative;
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}
.live::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--live);
  opacity: 0;
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid var(--line-2);
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .3s var(--ease), background-color .2s ease, border-color .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost .i { color: var(--signal); transition: transform .3s var(--ease); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-ghost:hover .i { transform: translateX(3px); }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--signal);
  cursor: pointer;
  transition: background-color .2s ease;
}
.icon-btn:hover { background: var(--bg-2); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- navegação ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: transform .45s var(--ease), background-color .3s ease, border-color .3s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav-inner {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.brand-org { color: var(--fg-3); }
.brand-sep { color: var(--signal); font-weight: 600; margin: 0 1px; }
.brand-name { color: var(--fg); font-weight: 600; }

.nav-links { margin-left: auto; display: flex; gap: 30px; }
.nav-links a {
  position: relative;
  font-size: 14.5px;
  color: var(--fg-2);
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--fg); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.kbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color .2s ease;
}
.kbd-btn .i { width: 15px; height: 15px; color: var(--signal); }
.kbd-btn:hover { background: var(--bg-2); }

.menu-btn { display: none; }

/* ---------- topo ---------- */
.hero { padding-top: 96px; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--fg-2);
}
.hero-meta p { display: flex; align-items: center; gap: 10px; }
.who { color: var(--fg); font-weight: 500; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.clock { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); }

.hero-main {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(0, 36fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 88px) 0 clamp(28px, 4vw, 48px);
}

.display {
  font-size: clamp(44px, 6.6vw, 108px);
  font-size: min(7.2cqi, 116px);
  font-weight: 600;
  letter-spacing: -0.052em;
  line-height: .96;
}
.display .line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.display .line > span { display: inline-block; }
.js .display .line > span { transform: translateY(108%); transition: transform 1.1s var(--ease); }
.is-loaded .display .line > span { transform: none; }
.is-loaded .display .line:nth-child(2) > span { transition-delay: .09s; }
.is-loaded .display .line:nth-child(3) > span { transition-delay: .18s; }

/* star schema */
.schema { margin: 0; }
.schema svg { display: block; width: 100%; height: auto; overflow: visible; }

.orbits circle { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 7; }

.edge {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke .3s ease, stroke-width .3s ease;
}
.js .edge { stroke-dashoffset: 1; }
.is-loaded .edge {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease) calc(.55s + var(--i) * .12s), stroke .3s ease, stroke-width .3s ease;
}

.dim .box rect { fill: var(--bg-2); stroke: var(--st-bd); stroke-width: 1; transition: stroke .3s ease; }
.js .dim .box { opacity: 0; transition: opacity .7s ease calc(.9s + var(--i) * .12s); }
.is-loaded .dim .box { opacity: 1; }
.dim:hover .edge { stroke: var(--st-ink); stroke-width: 1.8; }
.dim:hover rect { stroke: var(--st-ink); }

.d-src { --st-bd: var(--src-bd); --st-ink: var(--src-ink); }
.d-ing { --st-bd: var(--ing-bd); --st-ink: var(--ing-ink); }
.d-trf { --st-bd: var(--trf-bd); --st-ink: var(--trf-ink); }
.d-sem { --st-bd: var(--sem-bd); --st-ink: var(--sem-ink); }
.d-alr { --st-bd: var(--alr-bd); --st-ink: var(--alr-ink); }

.t-head { font-family: var(--font-mono); font-size: 12px; font-weight: 500; fill: var(--st-ink, #fff); }
.t-sub { font-family: var(--font-sans); font-size: 10.5px; fill: var(--fg-3); }

.fact rect { fill: #1C3A5E; stroke: #2D5687; stroke-width: 1; }
.fact .t-head { fill: #FFFFFF; }
.fact .sep { stroke: rgb(255 255 255 / .16); }
.t-row { font-family: var(--font-mono); font-size: 11.5px; fill: rgb(255 255 255 / .88); }
.t-type { font-family: var(--font-mono); font-size: 11px; fill: rgb(255 255 255 / .5); }
.js .fact { opacity: 0; transition: opacity .8s ease .4s; }
.is-loaded .fact { opacity: 1; }

.pulses circle { fill: var(--signal); }

.schema figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-3);
  max-width: 40ch;
}
.schema figcaption span { font-family: var(--font-mono); color: var(--fg-2); margin-right: 10px; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px 40px;
  padding-bottom: clamp(48px, 6vw, 88px);
}
.lede {
  max-width: 46ch;
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.5;
  color: var(--fg-2);
}
.lede a { color: var(--fg); border-bottom: 1px solid var(--line-2); transition: border-color .2s ease; }
.lede a:hover { border-color: var(--fg); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

.js .hero-meta, .js .hero-foot, .js .schema figcaption, .js .logos {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .9s ease, transform .9s var(--ease);
}
.is-loaded .hero-meta { opacity: 1; transform: none; }
.is-loaded .hero-foot { opacity: 1; transform: none; transition-delay: .35s; }
.is-loaded .schema figcaption { opacity: 1; transform: none; transition-delay: 1.4s; }
.is-loaded .logos { opacity: 1; transform: none; transition-delay: .5s; }

.logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.logos ul { display: flex; flex-wrap: wrap; gap: 12px clamp(24px, 4vw, 56px); }
.logos li {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-3);
}

/* ---------- seções ---------- */
main > section:not(.hero) {
  position: relative;
  padding-block: clamp(88px, 11vw, 168px);
}
/* linha entre seções alinhada às margens do conteúdo */
main > section:not(.hero):not(.numbers)::before {
  content: "";
  position: absolute;
  top: 0; left: var(--pad); right: var(--pad);
  height: 1px;
  background: var(--line);
}
main > section.numbers { padding-top: clamp(64px, 8vw, 112px); }

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.sec-idx {
  grid-column: 1 / 4;
  padding-top: .9em;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-3);
}
.sec-title {
  grid-column: 4 / 13;
  font-size: clamp(36px, 5.2vw, 78px);
  letter-spacing: -0.045em;
  line-height: 1;
  max-width: 16ch;
}

/* ---------- números ---------- */
.num-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.num-grid li {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px) clamp(24px, 3vw, 36px);
}
.num-grid li:first-child { padding-left: 0; }
.num-val {
  display: flex;
  align-items: baseline;
  gap: .14em;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.num-val small {
  font-size: .3em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-2);
}
.num-cap { margin-top: 18px; font-size: 15.5px; line-height: 1.45; color: var(--fg-2); max-width: 22ch; }
.num-src {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ---------- trabalhos ---------- */
.work-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: 24px;
}
.work-intro { font-size: 17px; color: var(--fg-2); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg-2);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.filter span { font-family: var(--font-mono); font-size: 11px; opacity: .6; }
.filter:hover { color: var(--fg); }
.filter[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.tdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tdot.eng { background: var(--trf-ink); }
.tdot.ana { background: var(--sem-ink); }

.work-list { border-top: 1px solid var(--line); }
.work-item { position: relative; z-index: 0; }
.work-item[hidden] { display: none; }

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 150px 136px 80px 28px;
  align-items: center;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--line);
}
.work-row::before {
  content: "";
  position: absolute;
  inset: -1px calc(var(--pad) * -.5);
  z-index: -1;
  border-radius: 14px;
  background: var(--bg-2);
  opacity: 0;
  transform: scaleY(.92);
  transition: opacity .35s ease, transform .45s var(--ease);
}
.work-row:hover::before, .work-row:focus-visible::before { opacity: 1; transform: none; }

.w-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); }
.w-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.7vw, 40px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  transition: transform .5s var(--ease);
}
.work-row:hover .w-title { transform: translateX(10px); }
.w-client, .w-year { font-size: 14.5px; color: var(--fg-2); }
.w-year { font-family: var(--font-mono); font-size: 12.5px; }
.w-type { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--fg-2); }
.w-go {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--fg-3);
  transition: transform .45s var(--ease), color .2s ease;
}
.w-go .i { width: 18px; height: 18px; }
.work-row:hover .w-go { color: var(--signal); transform: rotate(45deg); }

/* ---------- sobre ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 112px);
  align-items: start;
}

.portrait { position: sticky; top: 96px; margin: 0; }
.portrait picture, .portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 949;
  object-fit: cover;
  border-radius: 22px;
}
.portrait picture { overflow: hidden; background: #1a1a1c; }
.portrait figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}

.about-text .big {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.7vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 22px;
}
.about-text p:not(.big) { font-size: 18px; line-height: 1.6; color: var(--fg-2); max-width: 58ch; }

.sub-label { margin: 64px 0 6px; }

.principles li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.principles li:first-child { border-top: 1px solid var(--line); }
.p-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--signal); padding-top: 4px; }
.principles h4 { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.principles p { font-size: 15.5px; color: var(--fg-2); margin-top: 2px; }

.xp li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
}
.xp li:first-child { border-top: 1px solid var(--line); }
.xp-year { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); }
.xp-org { color: var(--fg-2); text-align: right; }

.facts {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.facts dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.facts dd { margin-top: 8px; font-size: 15.5px; color: var(--fg-2); }

/* ---------- stack ---------- */
/* cada linha é uma etapa do dado e usa a mesma cor suave dos fluxogramas (classes s-*) */
.k-lang, .k-biz { --st-bg: var(--bg-3); --st-bd: var(--line-2); --st-ink: var(--signal); }

.sk { border-top: 1px solid var(--line); }
.sk-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px clamp(24px, 4vw, 64px);
  padding: clamp(22px, 2.6vw, 32px) 0;
  border-bottom: 1px solid var(--line);
}
.sk-head { display: flex; gap: 18px; }
.sk-num { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); padding-top: 6px; }
.sk-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(19px, 1.8vw, 23px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.sk-head h3::before {
  content: "";
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--st-dot, var(--st-ink));
}
.sk-head p { margin-top: 4px; font-size: 15px; color: var(--fg-2); }

.sk-tools {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}
.sk-tools li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 15px;
  line-height: 1.3;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, opacity .3s ease;
}
.sk-tools li:hover,
.sk:not([data-eco="all"]) .sk-tools li.is-match {
  background: var(--st-bg);
  border-color: var(--st-bd);
  color: var(--st-text, var(--fg));
}
.sk:not([data-eco="all"]) .sk-tools li:not(.is-match) { opacity: .28; }

/* ---------- contato ---------- */
.contact .sec-idx { padding: 0; }
.contact-title {
  margin: 22px 0 clamp(40px, 5vw, 64px);
  font-size: clamp(44px, 7.4vw, 120px);
  letter-spacing: -0.055em;
  line-height: .96;
  max-width: 13ch;
}

.mail-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.mail {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .6s var(--ease);
}
.mail:hover { background-size: 100% 1.5px; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg-2);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.copy-btn .i { color: var(--signal); }
.copy-btn:hover { background: var(--bg-2); color: var(--fg); }
.copy-btn .i-check { display: none; color: var(--live); }
.copy-btn.is-copied .i-copy { display: none; }
.copy-btn.is-copied .i-check { display: block; }

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
}
.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.contact-links .i { color: var(--signal); }
.contact-links .arr { margin-left: auto; color: var(--fg-3); transition: transform .4s var(--ease), color .2s ease; }
.contact-links a:hover .arr { color: var(--signal); transform: translate(3px, -3px); }

/* ---------- rodapé ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 28px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg-3);
}
.footer a:hover { color: var(--fg); }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
.to-top .i { width: 14px; height: 14px; }

/* ---------- painel do caso ---------- */
dialog { color: var(--fg); }
html:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.sheet {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(1000px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line-2);
  background: var(--bg-2);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .55s var(--ease); }
.sheet[open]::backdrop { animation: fade .35s ease; }
@keyframes sheet-in { from { transform: translateX(48px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.sheet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
}
.sheet-idx { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); }
.sheet-ctrls { display: flex; gap: 8px; }

.sheet-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(28px, 4vw, 56px) var(--pad) 0;
}
.sheet-scroll:focus { outline: none; }

.case[hidden] { display: none; }
.case { animation: fade .4s ease; }
.case-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.case-title {
  margin: 16px 0 32px;
  font-size: clamp(32px, 4.6vw, 62px);
  letter-spacing: -0.045em;
  line-height: 1.02;
  max-width: 17ch;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 36px;
}
.case-meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.case-meta dd { margin-top: 6px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.case-meta dd .i { width: 14px; height: 14px; color: var(--signal); }
.case-meta dd a { display: inline-flex; align-items: center; gap: 4px; color: var(--signal); }

.shot { margin: 0 0 32px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg); }
.shot:not(.has-img) { display: none; }
.shot a { display: block; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 10px 14px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }

/* fluxograma */
.flow {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.flow-row { display: flex; align-items: flex-end; gap: 8px; }
.stage { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.stage-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--st-label, var(--st-ink));
}
.stage-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-dot, var(--st-ink)); }
.node {
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--st-bg);
  border: 1px solid var(--st-bd);
  color: var(--st-text, var(--fg));
  line-height: 1.35;
}
.node b { font-weight: 500; }
.node span { margin-top: 2px; font-size: 11px; color: var(--st-ink); }

.s-src { --st-bg: var(--src-bg); --st-bd: var(--src-bd); --st-ink: var(--src-ink); }
.s-ing { --st-bg: var(--ing-bg); --st-bd: var(--ing-bd); --st-ink: var(--ing-ink); }
.s-trf { --st-bg: var(--trf-bg); --st-bd: var(--trf-bd); --st-ink: var(--trf-ink); }
.s-sem { --st-bg: var(--sem-bg); --st-bd: var(--sem-bd); --st-ink: var(--sem-ink); }
.s-alr { --st-bg: var(--alr-bg); --st-bd: var(--alr-bd); --st-ink: var(--alr-ink); }
.s-srv { --st-bg: var(--srv-bg); --st-bd: var(--srv-bd); --st-ink: rgb(255 255 255 / .72); --st-text: #FFFFFF; --st-label: var(--signal); --st-dot: var(--signal); }

.arrow {
  position: relative;
  flex: none;
  width: 22px;
  height: 1.5px;
  margin-bottom: 31px;
  background: var(--line-2);
}
.arrow::after {
  content: "";
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--line-2);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.flow-branch { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-left: calc(50% + 4px); }
.flow-branch .node { height: 54px; border-style: dashed; padding: 6px 18px; }
.branch-arrow {
  position: relative;
  flex: none;
  width: 22px; height: 24px;
  border-left: 1.5px dashed var(--st-ink);
  border-bottom: 1.5px dashed var(--st-ink);
  border-bottom-left-radius: 7px;
  transform: translateY(-12px);
}
.branch-arrow::after {
  content: "";
  position: absolute;
  right: -2px; bottom: -5px;
  border-left: 6px solid var(--st-ink);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.case-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 40px 0 36px;
}
.case-cols h3 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.case-cols p { margin-top: 10px; font-size: 16.5px; line-height: 1.55; color: var(--fg-2); }

.case-nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.case-nums li { background: var(--bg-2); padding: 22px 16px 22px 0; }
.case-nums li + li { padding-left: 18px; }
.case-nums b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
  white-space: nowrap;
}
.case-nums span { display: block; margin-top: 6px; font-size: 14px; color: var(--fg-2); }

.case-quote { margin: 40px 0 32px; padding: 4px 0 4px 22px; border-left: 2px solid var(--signal); }
.case-quote .label { color: var(--signal); margin-bottom: 10px; }
.case-quote p:not(.label) {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
  max-width: 30ch;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
}

.sheet-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 16px;
  margin: 56px calc(var(--pad) * -1) 0;
  padding: 36px var(--pad) 40px;
  border-top: 1px solid var(--line);
  transition: background-color .3s ease;
}
.sheet-next:hover { background: var(--bg-3); }
.sheet-next .label { grid-column: 1; }
.sheet-next-title {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.sheet-next .i { grid-column: 2; grid-row: 1 / 3; width: 30px; height: 30px; color: var(--signal); transition: transform .45s var(--ease); }
.sheet-next:hover .i { transform: translateX(6px); }

/* ---------- menu (celular) ---------- */
.menu {
  width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
}
.menu[open] { display: flex; flex-direction: column; animation: fade .3s ease; }
.menu > .wrap { width: 100%; }
.menu-bar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.menu-links { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(40px, 12vw, 64px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.15;
}
.menu-links span { font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--fg-3); }
.menu-foot { display: flex; flex-direction: column; gap: 10px; padding-block: 28px 36px; border-top: 1px solid var(--line); color: var(--fg-2); }

/* ---------- busca e atalhos ---------- */
.palette {
  width: min(620px, calc(100vw - 32px));
  max-height: min(560px, 76vh);
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--bg-2);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .6);
  overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; animation: pal-in .25s var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }

.pal-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pal-search .i { width: 18px; height: 18px; color: var(--signal); }
.pal-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  color: var(--fg);
  font: 17px var(--font-sans);
}
.pal-search input::placeholder { color: var(--fg-3); }

.pal-list { flex: 1; overflow-y: auto; padding: 8px; }
.pal-group { padding: 12px 10px 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.pal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 15px;
  color: var(--fg-2);
  cursor: pointer;
}
.pal-item .i { color: var(--signal); }
.pal-item[aria-selected="true"] { background: var(--bg-3); color: var(--fg); }
.pal-hint { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3); }
.pal-empty { padding: 28px 12px; text-align: center; color: var(--fg-3); font-size: 14.5px; }
.pal-foot { display: flex; gap: 18px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }
.pal-foot kbd { margin-right: 4px; }

/* ---------- aviso ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 120;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .3s ease, transform .4s var(--ease);
  pointer-events: none;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- entrada ao rolar ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-group > .reveal:nth-child(2) { transition-delay: .08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal, .js .hero-meta, .js .hero-foot, .js .schema figcaption, .js .logos,
  .js .display .line > span { opacity: 1; transform: none; transition: none; }
  /* sem "transform" aqui: as caixas do diagrama são posicionadas pelo atributo transform do SVG */
  .js .dim .box, .js .fact { opacity: 1; transition: none; }
  .js .edge { stroke-dashoffset: 0; transition: none; }
  .pulses { display: none; }
}

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .w-type { display: none; }
  .work-row { grid-template-columns: 48px minmax(0, 1fr) 130px 76px 28px; }
}

@media (max-width: 960px) {
  .hero { display: flex; flex-direction: column; }
  .hero-main { display: contents; }
  .hero-meta { order: 1; }
  .display { order: 2; margin: clamp(36px, 8vw, 64px) 0 28px; font-size: clamp(40px, 11vw, 96px); }
  .hero-foot { order: 3; padding-bottom: 48px; }
  .schema { order: 4; max-width: 460px; width: 100%; margin: 0 auto 48px; }
  .logos { order: 5; }

  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .num-grid li:nth-child(odd) { padding-left: 0; }

  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; max-width: 460px; }

  .contact-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-cols { grid-template-columns: 1fr; gap: 22px; }

  .flow-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .flow-row .arrow { align-self: center; width: 1.5px; height: 16px; margin: 0; }
  .flow-row .arrow::after {
    right: auto; top: auto;
    left: 50%; bottom: -1px;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--line-2);
    border-bottom: 0;
  }
  .node { height: auto; min-height: 56px; }
  .flow-branch { padding-left: 0; margin-top: 14px; }
  .flow-branch .node { flex: 1; }
  .branch-arrow { transform: translateY(-10px); }
}

@media (max-width: 860px) {
  .nav-links, .kbd-btn { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }

  .sec-head { display: block; }
  .sec-idx { padding-top: 0; margin-bottom: 14px; }

  .sk-row { grid-template-columns: 1fr; }
  .sk-tools li { font-size: 14px; padding: 7px 12px; }
}

@media (max-width: 600px) {
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-meta p:nth-child(even) { justify-self: end; }
  .cta { width: 100%; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }

  .num-val { font-size: clamp(40px, 13vw, 56px); }
  .num-grid li { padding-inline: 14px; }

  .work-row {
    grid-template-columns: 34px auto 1fr 24px;
    grid-template-rows: auto auto;
    row-gap: 6px;
    column-gap: 10px;
  }
  .w-num { grid-row: 1 / 3; align-self: start; padding-top: 6px; }
  .w-title { grid-column: 2 / 4; }
  .w-client { grid-column: 2; grid-row: 2; font-size: 13.5px; }
  .w-year { grid-column: 3; grid-row: 2; }
  .w-go { grid-column: 4; grid-row: 1 / 3; }
  .work-row:hover .w-title { transform: none; }

  .xp li { grid-template-columns: 74px minmax(0, 1fr); }
  .xp-org { grid-column: 2; text-align: left; margin-top: -10px; font-size: 14.5px; }
  .facts { grid-template-columns: 1fr; }

  .contact-links { grid-template-columns: 1fr; }
  .case-meta { gap: 14px 12px; }
  .case-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-nums li { padding-left: 0 !important; padding-right: 10px; }
}

@media (max-width: 400px) {
  .nav-inner { gap: 12px; }
  .brand { font-size: 13px; }
}
