/* =============================================================================
   GLOBAL — tema, reset, tipografia, header/footer, botões e componentes comuns
   Tema escuro tecnológico: fundo grafite azulado, tinta clara, acento ciano-menta.
   Tipografia: Onest (texto e títulos) + JetBrains Mono (rótulos técnicos).
   ============================================================================= */

/* ---------- 1. Variáveis de tema ---------- */
:root {
  /* Cores */
  --bg: #06080b;                  /* preto profundo, o mesmo do contato: base do site todo */
  --surface: #0f141b;
  --paper: #141b24;
  --paper-2: #1a222d;
  --ink: #e8edf3;
  --text-2: #d4dbe4;
  --muted: #aab5c2;
  --line: rgba(160, 190, 220, 0.14);
  --line-strong: rgba(160, 190, 220, 0.27);
  --hover: rgba(150, 180, 210, 0.08);
  --accent: #2ec4b0;
  --accent-hover: #52d3c1;
  --accent-ink: #03140f;
  --accent-soft: rgba(46, 196, 176, 0.16);
  --accent-line: rgba(46, 196, 176, 0.45);
  --glow: 0 0 0 1px var(--accent-line), 0 0 32px -6px rgba(46, 196, 176, 0.45);
  --grid-line: rgba(150, 180, 210, 0.07);
  /* Textura do site: pontos discretos + brilho verde num canto (cada seção escolhe o canto) */
  --dots: radial-gradient(circle, rgba(150, 180, 210, 0.16) 1px, transparent 1.5px) 0 0 / 32px 32px;
  --corner-glow: rgba(46, 196, 176, 0.15), rgba(46, 196, 176, 0.055) 35%, rgba(46, 196, 176, 0.014) 60%, transparent 80%;
  --blue: #3b8fd4;                /* 2ª luz, discreta: só em brilhos (anel, véu) */

  --dark: #06080b;
  --dark-2: #0d1117;
  --on-dark: #e8edf3;
  --on-dark-muted: #9aa6b4;
  --line-dark: rgba(150, 180, 210, 0.12);

  --danger: #ff8a7a;
  --danger-soft: rgba(255, 138, 122, 0.12);
  --success: #6fe0a0;
  --success-soft: rgba(111, 224, 160, 0.12);
  --info: #7cc4ff;
  --star: #f2c14e;

  /* Tipografia */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: "Unbounded", "Onest", system-ui, sans-serif;   /* títulos largos */
  --t-h1: clamp(32px, 2.6vw + 22px, 62px);
  --t-h2: clamp(26px, 1.25vw + 20px, 40px);
  --t-h3: 22px;
  --t-lead: clamp(18px, 0.4vw + 16.5px, 20px);
  --t-card: 20px;
  --t-body: 16px;
  --t-small: 14px;
  --t-label: 13px;

  /* Espaçamento (escala 4 → 128) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Raios (família "soft") */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-btn: 12px;
  --r-pill: 999px;

  /* Ritmo da página (--nav = espaço reservado no topo; o menu é uma pílula flutuante dentro dele) */
  --nav: 88px;
  --nav-top: 14px;
  --gut: 80px;
  --maxw: 1280px;
  --padt: 120px;
  --padb: 72px;
  --btn-h: 44px;

  /* Movimento */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.8);

  color-scheme: dark;
}

@media (max-width: 1023px) {
  :root { --gut: 40px; }
}
@media (max-width: 639px) {
  :root {
    --nav: 72px;
    --nav-top: 10px;
    --gut: 24px;
    --padt: 96px;
    --padb: 48px;
  }
}

/* Celulares pequenos (até 380px: iPhone SE, Galaxy A antigos, etc.) */
@media (max-width: 380px) {
  :root {
    --gut: 18px;
    --padt: 80px;
    --t-h1: 30px;
    --t-h2: 23px;
    --t-lead: 16.5px;
    --t-card: 18px;
  }
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav);
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- 3. Tipografia ---------- */
h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
  hyphens: manual;
}
h1, h2 { font-family: var(--display); font-weight: 500; }
h1 { font-size: var(--t-h1); letter-spacing: -0.035em; line-height: 1.06; }
h2 { font-size: var(--t-h2); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.muted { color: var(--muted); }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--text-2); }
.measure { max-width: 62ch; }
.label {
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}
.mono { font-family: var(--mono); font-size: var(--t-label); letter-spacing: -0.01em; }
/* Rótulo técnico decorativo acima do título: <div data-eyebrow="01 / Projetos"> */
[data-eyebrow]::before {
  content: attr(data-eyebrow);
  display: block;
  width: fit-content;
  margin-bottom: var(--s-4);
  padding-left: 28px;
  background: linear-gradient(currentColor, currentColor) 0 50% / 18px 1px no-repeat;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--accent);
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 4. Layout base ---------- */
.wrap {
  width: calc(100% - var(--gut) * 2);
  max-width: var(--maxw);
  margin-inline: auto;
}
.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--padt) 0 var(--padb);
}
.section--alt { background: transparent; }
/* Fundo ambiente das seções: pontos + brilho de canto que somem longe do canto.
   O canto vem de --glow-at (padrão: topo à esquerda). */
.section,
.detalhe-hero {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--line);
}
.detalhe-hero { border-top: 0; }
.section::before,
.detalhe-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at var(--glow-at, 0% 0%), var(--corner-glow)),
    var(--dots);
  -webkit-mask-image: radial-gradient(140% 110% at var(--glow-at, 0% 0%), #000 30%, transparent 85%);
  mask-image: radial-gradient(140% 110% at var(--glow-at, 0% 0%), #000 30%, transparent 85%);
}
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark .muted { color: var(--on-dark-muted); }
.section__head { margin-bottom: var(--s-7); max-width: 760px; }
.section__head p { margin-top: var(--s-4); }
@media (max-width: 639px) {
  .section__head { margin-bottom: var(--s-6); }
}

/* Foco visível */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible { outline-color: var(--accent); }

/* Link de pular para o conteúdo */
.skip-link {
  position: absolute;
  left: 0;
  top: 12px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. Header ---------- */
/* Menu em pílula de vidro, flutuando sobre a página */
.nav {
  position: fixed;
  top: var(--nav-top);
  left: 0;
  right: 0;
  z-index: 20;
  width: min(1120px, calc(100% - 32px));
  height: calc(var(--nav) - var(--nav-top) * 2);
  margin-inline: auto;
  border-radius: var(--r-pill);
  /* vidro: reflexo diagonal + fio de luz no topo */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.06) 100%),
    rgba(12, 16, 22, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.32),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px -20px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  animation: nav-in 1000ms var(--ease-out) 250ms both;
}
.nav::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%; right: 18%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55) 30%, rgba(190, 240, 232, 0.8) 50%, rgba(255, 255, 255, 0.55) 70%, transparent);
}
@keyframes nav-in {
  from { opacity: 0; transform: translateY(-24px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 767px) {
  .nav { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.05)), rgba(10, 13, 18, 0.82); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: rgba(15, 20, 27, 0.96); }
}
.nav > .wrap { width: 100%; max-width: none; padding: 0 6px 0 24px; }
.nav .btn { border-radius: var(--r-pill); }
.nav__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
/* Monograma PI (o mesmo da abertura): letras na cor do texto, arco em verde */
.brand__mark {
  width: auto;
  height: 30px;
  flex-shrink: 0;
  fill: currentColor;
  overflow: visible;
}
.brand__swoosh {
  fill: var(--accent);
  transform-box: view-box;
  transform-origin: 665px 495px;
  transition: transform 600ms var(--ease-out);
}
/* ao passar o mouse, o arco dá um giro curto */
.brand:hover .brand__swoosh { transform: rotate(-18deg); }
.footer__brand .brand__mark { height: 36px; }
@media (max-width: 639px) { .brand__mark { height: 26px; } }
.nav__links {
  display: flex;
  gap: var(--s-6);
  margin-left: auto;
}
.nav__links a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: var(--s-3); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r-btn);
  background: var(--paper);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.menu-toggle:hover { background: var(--paper-2); }
.menu-toggle:active { transform: scale(0.96); }
.menu-toggle__bars { position: relative; width: 18px; height: 12px; }
.menu-toggle__bars span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 260ms var(--ease), opacity 160ms;
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 5px; }
.menu-toggle__bars span:nth-child(3) { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-sheet {
  position: fixed;
  inset: var(--nav) 0 0 0;
  z-index: 19;
  background: var(--bg);
  padding: var(--s-5) var(--gut) var(--s-6);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 220ms var(--ease), transform 260ms var(--ease), visibility 0s 260ms;
}
.nav-sheet.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 220ms var(--ease), transform 260ms var(--ease);
}
.nav-sheet a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
}
.nav-sheet .btn { margin-top: var(--s-5); }
.nav-sheet { overflow-y: auto; overscroll-behavior: contain; }
.nav-sheet > * { opacity: 0; transform: translateY(10px); transition: opacity 300ms var(--ease), transform 400ms var(--ease-out); }
.nav-sheet.is-open > * { opacity: 1; transform: none; }
.nav-sheet.is-open > :nth-child(2) { transition-delay: 50ms; }
.nav-sheet.is-open > :nth-child(3) { transition-delay: 100ms; }
.nav-sheet.is-open > :nth-child(4) { transition-delay: 150ms; }
@media (max-height: 560px) { .nav-sheet a:not(.btn) { min-height: 48px; font-size: 19px; } }
body.menu-open { overflow: hidden; }
.nav .menu-toggle { border-radius: 50%; }
@media (max-width: 639px) {
  .nav > .wrap { padding: 0 4px 0 18px; }
  .brand { font-size: 15px; }
}

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 639px) {
  .nav__actions .btn { display: none; }
}
@media (min-width: 1024px) {
  .nav-sheet { display: none; }
}

/* ---------- 6. Botões ---------- */
.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bg-hover: var(--paper-2);
  --btn-border: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border-radius: var(--r-btn);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--btn-border);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 80ms; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-bg-hover: var(--accent-hover);
  --btn-border: transparent;
  font-weight: 600;
}
.btn--primary:hover { box-shadow: 0 10px 28px -10px rgba(46, 196, 176, 0.55); }
.btn--secondary {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bg-hover: var(--paper-2);
}
.btn--secondary:hover { border-color: var(--accent-line); }
.btn--danger {
  --btn-bg: var(--danger);
  --btn-fg: #1a0603;
  --btn-bg-hover: #ffa395;
  --btn-border: transparent;
}
.btn--sm { --btn-h: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn--block { width: 100%; }
.btn .arrow {
  width: 16px; height: 16px;
  transition: transform var(--dur) var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
/* Botão principal com brilho e seta num círculo (hero) */
.btn--glow {
  isolation: isolate;
  overflow: hidden;
  padding: 0 8px 0 24px;
  min-height: 52px;
  border-radius: var(--r-pill);
  box-shadow: 0 0 0 1px rgba(82, 211, 193, 0.5), 0 8px 24px -10px rgba(46, 196, 176, 0.55), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
.btn--glow:hover { box-shadow: 0 0 0 1px rgba(82, 211, 193, 0.7), 0 12px 30px -10px rgba(46, 196, 176, 0.7), 0 1px 0 rgba(255, 255, 255, 0.35) inset; }
/* reflexo que atravessa o botão de tempos em tempos */
.btn--glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.6) 48%, rgba(255, 255, 255, 0.15) 56%, transparent 66%);
  transform: translateX(-130%);
  animation: shine 5s var(--ease) 2.6s infinite;
}
@keyframes shine {
  0%   { transform: translateX(-130%); }
  28%, 100% { transform: translateX(130%); }
}
.btn__circle {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-ink);
  color: var(--accent);
  transition: transform var(--dur) var(--ease);
}
.btn__circle svg { width: 16px; height: 16px; }
.btn--glow:hover .btn__circle { transform: translateX(3px) rotate(-45deg); }
.btn--ghost-pill { min-height: 52px; border-radius: var(--r-pill); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 639px) {
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}

/* Botão só com ícone (ações de tabela, fechar) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur);
}
.icon-btn:hover { background: var(--hover); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Link de texto com sublinhado que se desenha */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--line-strong), var(--line-strong));
  background-size: 0 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  transition: background-size 380ms var(--ease);
}
.link:hover { background-size: 100% 1px, 100% 1px; }
.link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.link:hover svg { transform: translateX(3px); }
.link--back:hover svg { transform: translateX(-3px); }

/* ---------- 7. Componentes reutilizáveis ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--text-2);
  background: rgba(20, 27, 36, 0.7);
}
.pill__dot {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
/* sinal de "online": um anel que se expande devagar */
.pill__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2.6s var(--ease-out) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.5); opacity: 0.9; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(150, 180, 210, 0.04);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1;
  white-space: nowrap;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-label);
  font-weight: 500;
  background: var(--accent);
  color: var(--accent-ink);
}
.badge--muted { background: var(--hover); color: var(--ink); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }

/* Janela de navegador (moldura para prints dos sistemas) */
.window {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #10161e;
}
.window__dots { display: flex; gap: 6px; flex-shrink: 0; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(150, 180, 210, 0.22); }
.window__dots i:first-child { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.window__address {
  flex: 1;
  max-width: 420px;
  margin-inline: auto;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(150, 180, 210, 0.07);
  font-family: var(--mono);
  font-size: var(--t-label);
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 10px;
}
.window__body { position: relative; background: var(--surface); }
.window__body img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Imagem ausente: tipografia no lugar da foto */
.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--s-5);
  background:
    radial-gradient(120% 90% at 0% 0%, var(--accent-soft), transparent 55%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--surface);
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: center;
  color: var(--ink);
}

/* Toasts / alertas */
.toast-stack {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 20px 1fr 32px;
  gap: 12px;
  align-items: start;
  padding: 14px 10px 14px 16px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  color: var(--on-dark);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  animation: toast-in 320ms var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out 220ms var(--ease) forwards; }
.toast__icon { width: 20px; height: 20px; margin-top: 1px; }
.toast--success .toast__icon { color: #8fd19e; }
.toast--error .toast__icon { color: #f2a08f; }
.toast--info .toast__icon { color: var(--accent); }
.toast__msg { font-size: 15px; line-height: 1.45; }
.toast__close {
  width: 32px; height: 32px;
  margin-top: -6px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--on-dark-muted);
}
.toast__close:hover { background: rgba(255, 255, 255, 0.08); color: var(--on-dark); }
.toast__close svg { width: 16px; height: 16px; }
@media (max-width: 639px) {
  .toast-stack { left: 16px; right: 16px; bottom: 16px; width: auto; }
}

/* Loaders */
.spinner {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  animation: spin 800ms linear infinite;
}
.page-loader {
  display: grid;
  place-items: center;
  min-height: 40vh;
}
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(150, 180, 210, 0.07);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(150, 180, 210, 0.08), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton--text { height: 14px; margin-top: 10px; }
.skeleton--title { height: 22px; width: 70%; }

/* Estado vazio / erro */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
  padding: var(--s-7) 0;
  max-width: 560px;
}
.empty-state h3, .empty-state__title { font-size: var(--t-card); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }

/* ---------- 7b. Abertura (tela de carregamento, só na 1ª visita da sessão) ---------- */
/* Sequência: nome sobe letra a letra → linhas se abrem → contador → nome pulsa → cortina curva sobe */
.intro { display: none; }
html.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #040608;
  overflow: hidden;
  will-change: transform;
  contain: layout paint;
  transition: transform 1050ms cubic-bezier(0.76, 0, 0.24, 1);
  /* segurança: se o JS falhar, some sozinha */
  animation: intro-fallback 1ms 7s forwards;
}
/* aurora atrás do nome + grão de filme */
html.has-intro .intro::before {
  content: "";
  position: absolute;
  pointer-events: none;
}
html.has-intro .intro::before {
  inset: -20%;
  background:
    radial-gradient(28% 24% at 46% 48%, rgba(46, 196, 176, 0.16), transparent 70%),
    radial-gradient(26% 22% at 56% 54%, rgba(40, 110, 190, 0.16), transparent 70%);
  animation: intro-aura 2600ms var(--ease-out) both;
}
.intro.is-leaving {
  transform: translateY(-100%);
  border-radius: 0 0 50% 50% / 0 0 24vh 24vh;
}
html.has-intro .intro.is-done { visibility: hidden; }

/* anel de luz que antecipa o anel do hero */
.intro__ring {
  position: absolute;
  left: 50%; top: 50%;
  width: min(560px, 96vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  animation: ring-in 1600ms var(--ease-out) 200ms both, orb-spin 9s linear infinite;
  transition: scale 1000ms var(--ease-out), opacity 700ms var(--ease);
}
.intro__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #2ec4b0, #3a9fd8 30%, #3b8fd4 48%, rgba(139, 107, 255, 0) 70%, rgba(46, 196, 176, 0) 88%, #2ec4b0);
  /* fio nítido + halo suave para dentro (faz o papel do brilho, sem filtro) */
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 14px), rgba(0, 0, 0, 0.18) calc(100% - 5px), #000 calc(100% - 1.5px), #000 100%, transparent 100%);
  mask: radial-gradient(closest-side, transparent calc(100% - 14px), rgba(0, 0, 0, 0.18) calc(100% - 5px), #000 calc(100% - 1.5px), #000 100%, transparent 100%);
}
.intro.is-complete .intro__ring { scale: 1.08; }
.intro.is-leaving .intro__ring { scale: 2.4; opacity: 0; }

.intro__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(340px, 76vw);
  transition: transform 800ms cubic-bezier(0.76, 0, 0.24, 1), opacity 500ms var(--ease);
}
.intro.is-leaving .intro__inner { transform: translateY(-10vh); opacity: 0; }
/* Logo PI: arco gira e encaixa → P e I deslizam → circuitos se desenham e acendem → nome escrito traço a traço */
.intro__logo { position: relative; isolation: isolate; width: 100%; transition: transform 600ms var(--ease-out); }
.intro__logo::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(46, 196, 176, 0.32), rgba(46, 196, 176, 0.08) 55%, transparent);
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.intro.is-complete .intro__logo::before { opacity: 1; }
.logo-mono { display: block; width: 100%; height: auto; overflow: visible; }
.logo-swoosh {
  transform-box: view-box;
  transform-origin: 650px 495px;
  animation: logo-swoosh 1200ms var(--ease-out) 120ms both;
}
.logo-p, .logo-i { transform-box: fill-box; transform-origin: 50% 50%; }
.logo-p { animation: logo-p 850ms var(--ease-out) 320ms both; }
.logo-i { animation: logo-i 850ms var(--ease-out) 460ms both; }
.logo-circuit { color: rgba(255, 255, 255, 0.9); transition: color 400ms var(--ease); }
.logo-circuit path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 650ms var(--ease) 780ms forwards;
}
.logo-circuit path:nth-child(2) { animation-delay: 860ms; }
.logo-circuit path:nth-child(3) { animation-delay: 940ms; }
.logo-circuit path:nth-child(4) { animation-delay: 1020ms; }
.logo-node {
  stroke: var(--accent);
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: node-pop 500ms var(--ease-out) 1250ms both;
}
.logo-node:nth-of-type(2) { animation-delay: 1330ms; }
.logo-node:nth-of-type(3) { animation-delay: 1410ms; }
.logo-node:nth-of-type(4) { animation-delay: 1490ms; }

.intro__word { display: block; width: 100%; height: auto; margin-top: 6px; color: #f3f7fb; overflow: visible; }
.intro__word path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 620ms var(--ease) calc(900ms + var(--i) * 50ms) forwards;
}

/* — </> — embaixo do nome, como no logo */
.intro__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.intro__divider span { animation: fade-in 700ms var(--ease) 1500ms both; }
.intro__divider::before, .intro__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55));
  transform: scaleX(0);
  transform-origin: right;
  animation: line-grow 1000ms var(--ease-out) 1350ms both;
}
.intro__divider::after { background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), transparent); transform-origin: left; }

/* no 100%: o logo acende em verde */
.intro.is-complete .intro__logo { transform: scale(1.05); }
.intro.is-complete .logo-circuit { color: var(--accent); }

@keyframes logo-swoosh {
  from { opacity: 0; transform: rotate(-70deg) scale(0.6); }
  to   { opacity: 1; transform: none; }
}
@keyframes logo-p {
  from { opacity: 0; transform: translateX(-90px) skewX(-14deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes logo-i {
  from { opacity: 0; transform: translateX(90px) skewX(-14deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes node-pop {
  0%   { opacity: 0; transform: scale(0); }
  70%  { opacity: 1; transform: scale(1.4); }
  100% { opacity: 1; transform: none; }
}
.intro__bar {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: 14px;
  border-radius: 2px;
  background: rgba(150, 180, 210, 0.1);
  animation: fade-in 700ms var(--ease) 500ms both;
}
.intro__bar i {
  position: absolute;
  inset: 0;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  will-change: transform;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(46, 196, 176, 0.2), var(--accent) 45%, #4aa8e0);
  box-shadow: 0 0 14px rgba(46, 196, 176, 0.7);
}
/* cabeça luminosa na ponta da barra: anda junto com a escala, sem ser esticada */
.intro__bar b {
  position: absolute;
  inset: 0;
  transform: translateX(calc((var(--p, 0) - 1) * 100%));
  will-change: transform;
  pointer-events: none;
}
.intro__bar b::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 14px; height: 14px;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff, rgba(190, 240, 232, 0.6) 40%, transparent);
}
.intro__meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fade-in 700ms var(--ease) 600ms both;
}
.intro__pct { color: var(--ink); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.intro__divider, .intro__bar, .intro__meta { transition: opacity 300ms var(--ease); }
.intro.is-complete .intro__divider,
.intro.is-complete .intro__bar,
.intro.is-complete .intro__meta { opacity: 0; }

/* o hero (e o menu) só entram depois da abertura */
html.has-intro:not(.intro-done) [data-enter] > *,
html.has-intro:not(.intro-done) [data-enter-late],
html.has-intro:not(.intro-done) .nav,
html.has-intro:not(.intro-done) .hero .split-char,
html.has-intro:not(.intro-done) .hero__veil,
html.has-intro:not(.intro-done) .hero__orb,
html.has-intro:not(.intro-done) .float-card { animation-play-state: paused; }

@keyframes intro-fallback { to { opacity: 0; visibility: hidden; } }
@keyframes intro-aura { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes ring-in { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }
@keyframes orb-spin { to { rotate: 360deg; } }
@keyframes char-in {
  from { opacity: 0; transform: translateY(0.5em) rotate(5deg); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes char-in-lite {
  from { opacity: 0; transform: translateY(0.5em) rotate(5deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes line-grow { to { transform: scaleX(1); } }

/* ---------- 8. Fechamento (chamada final + rodapé num só bloco escuro) ---------- */
.closing {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  color: var(--on-dark);
  border-top: 1px solid var(--line);
  isolation: isolate;
}
/* Brilho de canto + marcas de grade discretas (só no fundo, nunca sobre o texto) */
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--corner-glow)),
    var(--dots);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.closing :focus-visible { outline-color: var(--accent); }
.closing__close {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-6);
  padding-top: calc(var(--nav) + var(--s-7));
  padding-bottom: var(--s-8);
}
.closing__word {
  font-family: var(--display);
  font-size: clamp(36px, 5.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  max-width: 13ch;
  text-wrap: balance;
}
.closing__word span { color: var(--accent); }
.closing__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
}
.closing__lead { max-width: 46ch; font-size: var(--t-lead); line-height: 1.55; color: var(--on-dark); }
.closing__dir {
  padding-top: var(--s-7);
  padding-bottom: var(--s-6);
  border-top: 1px solid var(--line-dark);
}
.closing .footer__brand p,
.closing .footer__title,
.closing .footer__legal { color: var(--on-dark-muted); }
.closing .footer__legal { border-top-color: var(--line-dark); }
.closing .brand { color: var(--on-dark); }
@media (max-width: 639px) {
  .closing__row .btn-row { width: 100%; }
  .closing__close { padding-top: var(--s-9); }
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-5);
}
.footer__brand { grid-column: span 6; display: flex; flex-direction: column; gap: var(--s-4); }
.footer__brand p { max-width: 40ch; color: var(--muted); }
.footer__col { grid-column: span 3; }
.footer__title {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.footer__col { min-width: 0; }
.footer__col a { display: inline-flex; min-height: 44px; align-items: center; max-width: 100%; overflow-wrap: anywhere; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
}
.footer__legal a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 767px) {
  .footer__brand { grid-column: 1 / -1; }
  .footer__col { grid-column: span 6; }
}
@media (max-width: 479px) {
  .footer__col { grid-column: 1 / -1; }
}

/* ---------- 9. Entrada do hero e animações ---------- */
[data-enter] > * {
  animation: enter 900ms var(--ease-out) both;
}
[data-enter] > *:nth-child(2) { animation-delay: 80ms; }
[data-enter] > *:nth-child(3) { animation-delay: 160ms; }
[data-enter] > *:nth-child(4) { animation-delay: 240ms; }
[data-enter] > *:nth-child(5) { animation-delay: 320ms; }
[data-enter] > *:nth-child(6) { animation-delay: 400ms; }

@keyframes enter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  [data-enter] > * { animation: none; }
}
