/* ==========================================================================
   Jonas Carvalho — página inicial
   Conceito: o site é uma linha de metrô de arquitetura. Sai do "legado",
   chega na "arquitetura", e pacotes de luz percorrem o caminho.
   Uma família tipográfica (Archivo, eixo de largura), fundo azul-tinta,
   e âmbar reservado ao que se move e à ação principal.
   ========================================================================== */

:root {
  --bg: #0a1424;
  --raised: #111f36;
  --line: #263655;
  --line-strong: #3a4f7a;
  --text: #e9eef8;
  --muted: #93a1bc;
  --signal: #ffb224;
  --signal-hover: #ffc54f;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(26px, 5vw, 48px);
  --spine: clamp(8px, 2.2vw, 36px);
  --radius: 6px;
  --header: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--signal);
  color: var(--bg);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: #fff;
  line-height: 1.15;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

abbr[title] {
  text-decoration: none;
}

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

.wrap {
  position: relative;
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--signal);
  color: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Pontos de fundo que descem mais devagar que a página */
.bg-grid {
  position: fixed;
  inset: -48px 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(147, 161, 188, 0.2) 1px, transparent 1.4px);
  background-size: 48px 48px;
  will-change: transform;
}

/* ---------- Botões e links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.button-primary {
  background: var(--signal);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--signal-hover);
}

.button-secondary,
.button-on-dark {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--bg);
}

.button-secondary:hover,
.button-on-dark:hover {
  border-color: #fff;
  color: #fff;
}

.text-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: var(--signal);
}

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 20, 36, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header);
}

.brand {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.main-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-btn {
  min-width: 38px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--text);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Apresentação ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header));
  padding: clamp(40px, 6vw, 80px) 0 40px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 72%, transparent);
  mask-image: linear-gradient(#000 72%, transparent);
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.layer path,
.layer circle,
.layer text {
  vector-effect: non-scaling-stroke;
}

.line-back {
  fill: none;
  stroke: #17253f;
  stroke-width: 1.5;
}

.line-mid {
  fill: none;
  stroke: #243553;
  stroke-width: 2;
}

.line-main {
  fill: none;
  stroke: #7f90b2;
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.line-legacy {
  fill: none;
  stroke: #56658a;
  stroke-width: 2.5;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
}

.station-dot {
  fill: var(--bg);
  stroke: #7f90b2;
  stroke-width: 2;
}

.station-dot.dim {
  stroke: #34476b;
}

.node-legacy {
  fill: var(--bg);
  stroke: #56658a;
  stroke-width: 2;
  stroke-dasharray: 2 3;
}

.node-target {
  fill: var(--signal);
}

.node-halo {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 3.2s ease-out 2.2s infinite;
}

.pkt-core {
  fill: var(--signal);
}

.pkt-glow {
  fill: var(--signal);
  opacity: 0.22;
}

.map-label {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
}

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2s cubic-bezier(0.5, 0, 0.2, 1) forwards;
  animation-delay: var(--d, 0s);
}

.hero-copy,
.hero-photo {
  position: relative;
  z-index: 1;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  flex: 1;
}

.hero-role {
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 18px;
}

.hero-name {
  font-size: clamp(52px, 9.2vw, 124px);
  font-weight: 850;
  font-variation-settings: "wdth" 118;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: #fff;
}

.hero-tagline {
  margin-top: 24px;
  max-width: 26ch;
  text-wrap: balance;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 18px;
  color: #c3cde0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 36px;
}

.hero-actions .text-link {
  margin-left: 4px;
}

.hero-photo {
  will-change: transform;
}

.hero-photo img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius);
  background: var(--raised);
}

.photo-frame {
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  will-change: transform;
}

.facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 28px 0 0;
  border-top: 1px solid var(--line-strong);
}

.facts dt {
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  font-variation-settings: "wdth" 110;
  letter-spacing: -0.01em;
}

.facts dt a {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.facts dt a:hover {
  color: var(--signal);
}

.facts dd {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  max-width: 26ch;
}

/* Entrada: um único momento orquestrado */
.hero-role,
.hero-name,
.hero-tagline,
.hero-lede,
.hero-actions,
.hero-photo,
.facts {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-role { animation-delay: 0.1s; }
.hero-name { animation-delay: 0.2s; }
.hero-tagline { animation-delay: 0.45s; }
.hero-lede { animation-delay: 0.55s; }
.hero-actions { animation-delay: 0.65s; }
.hero-photo { animation-delay: 0.5s; }
.facts { animation-delay: 0.8s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes halo {
  0% {
    opacity: 0.8;
    transform: scale(0.8);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

/* ---------- Jornada: linha que acompanha a rolagem ---------- */

.journey {
  position: relative;
}

.spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--spine);
  width: 2px;
  margin-left: -1px;
  background: var(--line);
  pointer-events: none;
}

.spine-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 178, 36, 0.15), var(--signal));
  transform-origin: top;
  transform: scaleY(0);
  will-change: transform;
}

.station {
  position: absolute;
  top: clamp(72px, 9.6vw, 128px);
  left: var(--spine);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.station.passed {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 0 5px rgba(255, 178, 36, 0.16);
}

/* ---------- Seções ---------- */

.section {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
}

.rail {
  align-self: start;
  position: sticky;
  top: 100px;
}

.rail h2 {
  text-wrap: balance;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
}

.rail p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 34ch;
}

/* Atuação */

.areas {
  display: grid;
}

.area {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.area:first-child {
  padding-top: 0;
  border-top: 0;
}

.area h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.area > p {
  margin-top: 10px;
  max-width: 62ch;
  color: #c3cde0;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px 28px;
  margin-top: 22px;
}

.tools li {
  display: grid;
  grid-template-columns: 26px auto;
  column-gap: 12px;
  align-items: center;
  font-size: 15px;
  line-height: 1.3;
}

.tools img {
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  padding: 4px;
  object-fit: contain;
  background: #eef2fa;
  border-radius: 6px;
}

.tools strong {
  color: #fff;
  font-weight: 600;
}

.tools span {
  grid-column: 2;
  color: var(--muted);
  font-size: 14px;
}

/* Projetos */

.project {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.project:first-child {
  padding-top: 0;
  border-top: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.project-meta span:first-child {
  color: var(--signal);
  font-weight: 600;
}

.project h3 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project > p:not(.project-meta) {
  margin-top: 8px;
  max-width: 64ch;
  color: #c3cde0;
}

.project-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 18px;
}

.project-stack {
  color: var(--muted);
  font-size: 14px;
}

.btn-inspect {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.btn-inspect:hover {
  color: var(--signal);
}

/* Diagrama animado de cada projeto */

.flow {
  margin-top: 26px;
}

.flow-track {
  position: relative;
}

.flow-track::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--line);
}

.flow-track ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 8px;
}

.flow-track li {
  position: relative;
  padding-top: 24px;
  text-align: center;
}

.flow-track li i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  animation: ping 7s linear infinite;
  animation-delay: calc(0.42s + var(--i) * 1.155s);
}

.flow-track b {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.flow-track small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.packet-rail {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 12px;
  pointer-events: none;
}

.packet {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 178, 36, 0.18), 0 0 16px rgba(255, 178, 36, 0.55);
  opacity: 0;
  animation: packet 7s linear infinite;
}

.flow:not(.live) .packet,
.flow:not(.live) li i {
  animation-play-state: paused;
}

@keyframes packet {
  0% { left: 0; opacity: 0; }
  6% { left: 0; opacity: 1; }
  72% { left: 100%; opacity: 1; }
  80% { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}

@keyframes ping {
  0% {
    background: var(--signal);
    border-color: var(--signal);
    box-shadow: 0 0 0 5px rgba(255, 178, 36, 0.2);
  }
  12% {
    background: var(--signal);
    border-color: var(--signal);
    box-shadow: 0 0 0 5px rgba(255, 178, 36, 0.2);
  }
  30%,
  100% {
    background: var(--bg);
    border-color: var(--line-strong);
    box-shadow: 0 0 0 0 rgba(255, 178, 36, 0);
  }
}

/* Experiência */

.role {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.role:first-child {
  padding-top: 0;
  border-top: 0;
}

.role-date {
  color: var(--signal);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.role h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.role-org {
  margin-top: 4px;
  color: #fff;
  font-weight: 500;
}

.role-org + p {
  margin-top: 10px;
  max-width: 64ch;
  color: #c3cde0;
}

/* Formação e credenciais */

.creds {
  display: grid;
  gap: 40px;
}

.cred-group h3 {
  font-size: 20px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.cred-group li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.cred-group strong {
  color: #fff;
  font-weight: 600;
}

.cred-group span {
  color: var(--muted);
}

/* Abordagem técnica */

.glossary {
  display: grid;
  gap: 24px;
}

.glossary dt {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.glossary dfn {
  font-style: normal;
}

.glossary dd {
  margin-top: 6px;
  max-width: 66ch;
  color: #c3cde0;
}

.disclosure {
  border-top: 1px solid var(--line);
}

.disclosure:last-child {
  border-bottom: 1px solid var(--line);
}

.approach > .disclosure {
  margin-top: 40px;
  border-bottom: 1px solid var(--line);
}

.disclosure summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 0;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-right: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.disclosure[open] summary::after {
  transform: translateY(4px) rotate(-135deg);
}

.disclosure summary:hover {
  color: var(--signal);
}

.faq-answer {
  padding: 0 0 22px;
  max-width: 70ch;
  color: #c3cde0;
}

.faq-heading {
  margin: 48px 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 24px;
}

.arch-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
  color: #c3cde0;
}

.arch-table caption {
  caption-side: top;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 12px;
}

.arch-table th,
.arch-table td {
  padding: 12px 14px 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.arch-table thead th {
  border-top: 0;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.arch-table tbody th {
  color: #fff;
  font-weight: 600;
  width: 18%;
}

/* ---------- Contato: fim da linha ---------- */

.contact {
  position: relative;
  margin-top: clamp(72px, 10vw, 136px);
  padding: clamp(72px, 9vw, 112px) 0;
  background: linear-gradient(to bottom, var(--bg), var(--raised) 24%);
  border-bottom: 1px solid var(--line);
}

.contact .station {
  top: clamp(72px, 9.6vw, 128px);
}

.channels > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 6px 24px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line-strong);
}

.channels > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.channels dt {
  color: var(--muted);
  font-size: 15px;
}

.channels dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
}

.channels dd a:not(.button) {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

.channels dd a:not(.button):hover {
  color: var(--signal);
}

.resume-links {
  font-size: 17px !important;
}

/* ---------- Rodapé ---------- */

.site-footer {
  background: var(--raised);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer-nap {
  font-style: normal;
}

.footer-nap strong {
  color: #fff;
  font-weight: 600;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--signal);
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* ---------- Detalhe de arquitetura (modal) ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px;
  background: rgba(4, 9, 18, 0.78);
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 820px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.modal-kicker {
  color: var(--signal);
  font-size: 14px;
  font-weight: 500;
}

.modal-head h3 {
  margin-top: 6px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.015em;
}

.modal-client {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.modal-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.modal-close:hover {
  border-color: #fff;
}

.modal-block {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.modal-block h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
}

.modal-block p,
.modal-list {
  font-size: 16px;
  color: #c3cde0;
}

.modal-list li {
  position: relative;
  padding-left: 18px;
  margin-top: 8px;
}

.modal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-tags .tag {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
}

.arch-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.arch-node {
  padding: 14px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.arch-node-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.arch-node-arrow {
  color: var(--signal);
}

.arch-node-title {
  margin-top: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.arch-node-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* ---------- Responsivo ---------- */

@media (max-width: 1040px) {
  .main-nav {
    gap: 20px;
  }

  .header-cv {
    display: none;
  }
}

@media (max-width: 880px) {
  .header-inner {
    gap: 12px;
  }

  .header-cv {
    display: inline-flex;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 0;
    font-size: 17px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 200px;
    align-items: start;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
  }

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

@media (max-width: 700px) {
  /* Diagrama vira lista vertical; as estações acendem em sequência */
  .flow-track::before,
  .packet-rail {
    display: none;
  }

  .flow-track ol {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-left: 2px;
  }

  .flow-track ol::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 7px;
    width: 2px;
    background: var(--line);
  }

  .flow-track li {
    padding: 0 0 0 30px;
    text-align: left;
  }

  .flow-track li i {
    top: 4px;
    left: 2px;
    margin-left: 0;
    z-index: 1;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .brand {
    font-size: 16px;
  }

  .header-cv {
    display: none;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .hero-photo {
    order: -1;
    width: 132px;
  }

  .hero-photo img {
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .photo-frame {
    display: none;
  }

  .hero-lede {
    font-size: 17px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .hero-actions .text-link {
    margin-left: 0;
  }

  .facts dt {
    font-size: 19px;
  }

  .facts dd {
    font-size: 14px;
  }

  .role {
    grid-template-columns: minmax(0, 1fr);
  }

  .cred-group li {
    grid-template-columns: minmax(0, 1fr);
  }

  .channels > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .channels dd {
    font-size: 17px;
  }

  .arch-flow {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .draw {
    stroke-dashoffset: 0;
  }

  .pkt,
  .packet,
  .node-halo {
    display: none;
  }
}

@media print {
  .site-header,
  .modal-backdrop,
  .lang-switch,
  .hero-bg,
  .bg-grid,
  .spine {
    display: none !important;
  }

  body,
  .contact,
  .site-footer {
    background: #fff;
    color: #000;
  }
}
