/* ===================== Tokens ===================== */
:root {
  color-scheme: light; /* site sempre claro, mesmo com o sistema no modo escuro */
  --bg: #ffffff;
  --surface: #f7f7f5;
  --surface-2: #efefec;
  --text: #0a0a0a;
  --muted: #6b6b68;
  --line: #e7e7e3;
  --accent: #f25c05; /* troque aqui a cor de destaque */
  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --spring: cubic-bezier(0.32, 0.72, 0, 1); /* curva de animação no estilo iOS */
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 10vw, 128px) var(--gutter) 0; }

.display { font-size: clamp(44px, 8.5vw, 112px); letter-spacing: -0.045em; line-height: 0.98; }
.h1 { font-size: clamp(36px, 5.5vw, 72px); letter-spacing: -0.035em; }
.h2 { font-size: clamp(26px, 3.4vw, 42px); letter-spacing: -0.03em; }
.lead { font-size: clamp(19px, 2vw, 24px); color: var(--muted); max-width: 40ch; }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.muted { color: var(--muted); }
.muted-strong { color: var(--muted); font-size: 18px; margin-bottom: 28px; }

/* ===================== Botões e links ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 500; font-size: 16px;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-small { height: 38px; padding: 0 18px; font-size: 15px; }

.link-arrow { font-weight: 500; transition: color 0.2s; white-space: nowrap; }
.link-arrow:hover { color: var(--accent); }

/* ===================== Navbar: Dynamic Island ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header { position: relative; height: 80px; z-index: 60; }
body[data-page="home"] .header { height: 0; }

.island {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center;
  height: 52px; padding: 0 6px 0 6px; border-radius: 999px;
  background: rgba(8, 8, 8, 0.86); color: #f5f5f7;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 14px 36px -14px rgba(0, 0, 0, 0.55);
  font-size: 14px; letter-spacing: -0.01em; white-space: nowrap;
  transition: height 0.55s var(--spring), padding 0.55s var(--spring), border-radius 0.55s var(--spring), box-shadow 0.3s;
}
.island a { color: inherit; }

.island-logo { display: flex; align-items: center; gap: 10px; padding-right: 6px; }
.island-mark {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: #f5f5f7; color: #0a0a0a;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0;
  transition: width 0.55s var(--spring), height 0.55s var(--spring);
}
.island-mark { overflow: hidden; }
.island-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: contrast(1.05); }
.island-name, .island-links, .island-cta, .island-status {
  overflow: hidden;
  transition: max-width 0.55s var(--spring), opacity 0.35s ease, padding 0.55s var(--spring), margin 0.55s var(--spring);
}
.island-links { display: flex; align-items: center; max-width: 460px; margin-left: 10px; }
.island-links a {
  padding: 8px 13px; border-radius: 999px; color: rgba(245, 245, 247, 0.72);
  transition: color 0.2s, background-color 0.2s;
}
.island-links a:hover, .island-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.1); }
.island-cta {
  max-width: 120px; margin-left: 6px; padding: 0 18px; height: 40px;
  display: flex; align-items: center; border-radius: 999px;
  background: #f5f5f7; color: #0a0a0a !important; font-weight: 500;
}
.island-cta:hover { background: #fff; }
.island-status {
  display: flex; align-items: center; gap: 8px; max-width: 0; opacity: 0;
  font-size: 13px; color: rgba(245, 245, 247, 0.8);
}
.island-status i { width: 8px; height: 8px; border-radius: 50%; background: #30d158; flex-shrink: 0; animation: island-pulse 2s ease-in-out infinite; }
@keyframes island-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); } 50% { box-shadow: 0 0 0 5px rgba(48, 209, 88, 0); } }

/* Estado compacto (rolando para baixo): expande no hover/foco */
.island.compact:not(:hover):not(:focus-within):not(.open) { height: 40px; padding: 0 16px 0 5px; }
.island.compact:not(:hover):not(:focus-within):not(.open) .island-mark { width: 30px; height: 30px; }
.island.compact:not(:hover):not(:focus-within):not(.open) :is(.island-name, .island-links, .island-cta) {
  max-width: 0; opacity: 0; margin: 0; padding-left: 0; padding-right: 0;
}
.island.compact:not(:hover):not(:focus-within):not(.open) .island-logo { padding-right: 0; }
.island.compact:not(:hover):not(:focus-within):not(.open) .island-status { max-width: 140px; opacity: 1; margin-left: 10px; }

/* Botão de menu (mobile): pílula "Menu" + ícone, para ficar óbvio que abre o menu */
.island-menu {
  display: none; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 16px;
  border-radius: 999px; border: 0; cursor: pointer; margin-left: auto;
  background: #f5f5f7; color: #0a0a0a; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: -0.01em;
  transition: background-color 0.2s, padding 0.45s var(--spring), height 0.45s var(--spring);
}
.island-menu:hover { background: #fff; }
.island-menu-icon {
  position: relative; width: 26px; height: 26px; border-radius: 50%; background: #0a0a0a; flex-shrink: 0;
}
.island-menu-icon i {
  position: absolute; left: 7px; right: 7px; height: 1.5px; border-radius: 2px; background: #f5f5f7;
  transition: transform 0.45s var(--spring), top 0.45s var(--spring);
}
.island-menu-icon i:nth-of-type(1) { top: 10px; }
.island-menu-icon i:nth-of-type(2) { top: 15px; }
.island.open .island-menu-icon i:nth-of-type(1) { top: 12.25px; transform: rotate(45deg); }
.island.open .island-menu-icon i:nth-of-type(2) { top: 12.25px; transform: rotate(-45deg); }

/* Nome ao lado do avatar: só no mobile, com a navbar grande */
.island-name { display: none; max-width: 0; }

@media (max-width: 820px) {
  .island { width: calc(100% - 24px); max-width: 440px; flex-wrap: wrap; }
  .island-links, .island-cta { display: none; }
  .island-menu { display: flex; }
  .island-name { display: block; max-width: 220px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
  .island.compact:not(.open) .island-name { max-width: 0; opacity: 0; }
  .island.compact:not(.open) .island-logo { padding-right: 0; gap: 0; }
  .island.compact:not(.open) { height: 44px; width: auto; padding-right: 5px; flex-wrap: nowrap; }
  .island.compact:not(.open) .island-menu { margin-left: 12px; height: 34px; padding: 0 5px 0 12px; font-size: 13px; }
  .island.compact:not(.open) .island-menu-icon { width: 24px; height: 24px; }
  .island.compact:not(.open) .island-menu-icon i { left: 6px; right: 6px; }
  .island.compact:not(.open) .island-menu-icon i:nth-of-type(1) { top: 9px; }
  .island.compact:not(.open) .island-menu-icon i:nth-of-type(2) { top: 14px; }
  .island.compact:not(.open) .island-status { max-width: 140px; opacity: 1; margin-left: 10px; }

  .island.open { height: auto; border-radius: 28px; padding: 6px 6px 14px; align-content: flex-start; }
  .island.open .island-links {
    display: flex; flex-direction: column; align-items: stretch; order: 3;
    width: 100%; max-width: none; margin: 10px 0 0; animation: island-open 0.5s var(--spring) both;
  }
  .island.open .island-links a { font-size: 22px; font-weight: 500; padding: 12px 14px; color: #f5f5f7; }
  .island.open .island-cta {
    display: flex; order: 4; width: 100%; max-width: none; height: 50px; justify-content: center;
    margin: 10px 0 0; font-size: 16px; animation: island-open 0.5s 0.05s var(--spring) both;
  }
}
@keyframes island-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ===================== Hero (sempre clara, minimalista) ===================== */
.hx {
  /* tokens claros locais: a hero é clara mesmo no tema escuro */
  --text: #0a0a0a; --bg: #ffffff; --muted: #6b6b68; --line: #e4e4e0; --surface: #ffffff; --surface-2: #f2f2f0;
  color: var(--text); background: var(--bg);
  margin: 0;
  overflow: hidden; position: relative; isolation: isolate;
}
.hx-inner { position: relative; padding-top: clamp(84px, 7.5vw, 112px); display: flex; flex-direction: column; align-items: center; }
.hx-copy { position: relative; z-index: 3; text-align: center; }

.hx-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: -0.01em; margin-bottom: clamp(10px, 1.4vw, 18px); }
.hx-status-dot { width: 8px; height: 8px; background: #34c759; border-radius: 1px; animation: hx-blink 2.4s ease-in-out infinite; }

.hx-title { display: flex; flex-direction: column; align-items: center; font-weight: 600; }
.hx-name {
  font-size: clamp(56px, 10.6vw, 156px); line-height: 0.86; letter-spacing: -0.065em;
  white-space: nowrap; padding: 0 0.04em 0.06em;
}
.hx-role {
  font-size: clamp(22px, 3.3vw, 48px); line-height: 1; letter-spacing: -0.045em; font-weight: 500;
  margin-top: clamp(2px, 0.4vw, 6px);
}

/* Foto: o branco da imagem se funde ao fundo (multiply no figure, máscara no img) */
.hx-photo {
  position: relative; z-index: 2; margin: clamp(8px, 2vw, 32px) auto 0;
  width: clamp(280px, 32vw, 430px); aspect-ratio: 4 / 5; mix-blend-mode: multiply; overflow: hidden;
}
.hx-photo.wide { width: min(100%, 1180px); aspect-ratio: 16 / 9; }
.hx-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%), linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0%, #000 10%), linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
          mask-composite: intersect;
}

.hx-orbit { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hx-orbit path { fill: none; stroke: #c9c9c5; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 900; stroke-dashoffset: 900; animation: hx-draw 2.4s .6s var(--ease) forwards; }

/* ----- Componentes no estilo shadcn/ui ----- */
.ui-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 40px -18px rgba(0,0,0,.2);
  padding: 14px 16px; color: var(--text); font-size: 13px;
}
.ui-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ui-label { font-size: 12.5px; font-weight: 500; color: var(--text); }
.ui-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  background: #18181b; color: #fafafa; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.ui-badge-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.ui-switch { width: 36px; height: 20px; border-radius: 999px; background: #e4e4e7; position: relative; flex-shrink: 0; transition: background-color .35s var(--ease); }
.ui-switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .35s var(--ease); }
.ui-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ui-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: #18181b; }
.ui-avatars { display: flex; }
.ui-avatars span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--bg); margin-left: -8px;
  font-size: 10.5px; font-weight: 600; color: var(--text);
}
.ui-avatars span:first-child { margin-left: 0; background: #18181b; color: #fafafa; }

/* ----- Cards flutuantes (posicionados em volta da foto, abaixo do nome) ----- */
.hx-float { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hx-c { position: absolute; transition: translate .5s var(--ease); animation: hx-in .9s var(--spring) both, hx-bob 7s ease-in-out infinite; }

.hx-terminal { left: 0; top: 50%; width: 250px; animation-delay: .35s, 1s; }
.term-dots { display: flex; gap: 5px; }
.term-dots i { width: 8px; height: 8px; border-radius: 50%; background: #e4e4e7; }
.term-line { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; min-height: 36px; line-height: 1.5; }
.term-prompt { color: #f25c05; font-weight: 600; }
.term-caret { display: inline-block; width: 6px; height: 13px; margin-left: 1px; background: #18181b; vertical-align: -2px; animation: hx-caret 1s steps(1) infinite; }
.term-ok { margin-top: 8px; font-size: 12px; color: #16a34a; display: flex; gap: 6px; align-items: center; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s var(--ease); }
.term-ok.show { opacity: 1; transform: none; }
.ok-icon { width: 16px; height: 16px; border-radius: 50%; background: #dcfce7; display: grid; place-items: center; font-size: 10px; }

.hx-switch { right: 0; top: 47%; width: 220px; animation-delay: .45s, 2s; animation-duration: .9s, 8s; }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; font-size: 12.5px; }
.sw-label { color: var(--muted); transition: color .3s; }
.hx-switch:not(.on) .sw-label[data-side="a"], .hx-switch.on .sw-label[data-side="b"] { color: var(--text); font-weight: 500; }
.hx-switch.on .ui-switch { background: #18181b; }
.hx-switch.on .ui-switch span { transform: translateX(16px); }
.sw-preview { position: relative; height: 62px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.sw-design, .sw-code { position: absolute; inset: 0; padding: 10px; transition: opacity .4s, transform .5s var(--ease); }
.sw-design { display: grid; gap: 6px; align-content: start; }
.sw-design i { display: block; height: 8px; border-radius: 4px; background: #d4d4d8; }
.sw-design i:nth-child(1) { width: 55%; background: #a1a1aa; }
.sw-design i:nth-child(3) { width: 75%; }
.sw-code { margin: 0; font: 11.5px/1.45 ui-monospace, "SF Mono", Menlo, monospace; color: #52525b; opacity: 0; transform: translateY(8px); }
.sw-code b { color: #f25c05; font-weight: 500; }
.hx-switch.on .sw-design { opacity: 0; transform: translateY(-8px); }
.hx-switch.on .sw-code { opacity: 1; transform: none; }

.ui-toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.hx-deploy { left: 9%; top: 74%; width: 260px; animation: hx-in .9s .55s var(--spring) both, hx-toast 6s 1.6s var(--ease) infinite; }
.toast-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.toast-title { font-weight: 500; font-size: 13px; }
.toast-sub { color: var(--muted); font-size: 12px; }
.hx-deploy .ui-badge { margin-left: auto; background: #dcfce7; color: #15803d; }

.hx-progress { right: 8%; top: 70%; width: 264px; animation-delay: .65s, 0s; animation-duration: .9s, 7.5s; }
.hx-progress.fill .ui-progress span { animation: hx-fill 1.6s var(--ease) forwards; }
.progress-value { margin-top: 8px; color: var(--muted); font-size: 12px; }
.progress-value strong { color: var(--text); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

.hx-seal { position: absolute; right: 3%; top: 8%; width: 92px; height: 92px; animation: hx-in .9s .8s var(--spring) both; }
.hx-seal text { font-size: 10.5px; letter-spacing: 2.6px; fill: var(--text); font-weight: 500; transform-origin: 60px 60px; animation: hx-spin 22s linear infinite; }
.hx-star { fill: var(--text); }

.hx-foot { position: absolute; bottom: 40px; z-index: 3; font-size: 14px; color: var(--muted); line-height: 1.4; display: grid; gap: 12px; }
.hx-foot-left { left: var(--gutter); }
.hx-foot-right { right: var(--gutter); justify-items: start; }
.hx-rule { width: 28px; height: 1px; background: #c9c9c5; }
.hx-spark { width: 18px; height: 18px; fill: var(--text); animation: hx-twinkle 3.2s ease-in-out infinite; }

@keyframes hx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hx-toast { 0%, 8% { transform: translateY(0); } 50% { transform: translateY(-12px); } 92%, 100% { transform: translateY(0); } }
@keyframes hx-fill { from { width: 0; } to { width: 100%; } }
@keyframes hx-caret { 50% { opacity: 0; } }
@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.7) rotate(45deg); opacity: .6; } }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 1180px) {
  .hx-deploy { left: 2%; }
  .hx-progress { right: 2%; }
}
@media (max-width: 980px) {
  .hx-deploy, .hx-progress, .hx-orbit, .hx-foot { display: none; }
  .hx-terminal { top: auto; bottom: 120px; }
  .hx-switch { top: auto; bottom: 150px; }
  .hx-seal { top: 4%; right: 2%; width: 72px; height: 72px; }
}
@media (max-width: 680px) {
  /* No celular a hero fica só com o texto e a foto */
  .hx-float, .hx-orbit, .hx-foot { display: none; }
  .hx-copy { order: 1; }
  .hx-photo { order: 2; }
}

/* Entrada */
.hx-status, .hx-photo { animation: hx-in 1s var(--spring) both; }

/* Decodificação do H1: glifo de código/pixel por cima da letra final transparente */
.dc-word { white-space: nowrap; }
.dc { position: relative; display: inline-block; }
.dc b { font-weight: inherit; color: transparent; }
.dc i {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 0.74em/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0;
  color: var(--text); opacity: 0.82;
}
.dc i[data-tone="hi"] { color: #34c759; opacity: 1; }
.dc.on b { color: inherit; animation: dc-pop 0.42s var(--spring) both; }
.dc.on i { opacity: 0; transition: opacity 0.12s; }
@keyframes dc-pop {
  0% { opacity: 0; filter: blur(6px); transform: translateY(0.06em) scale(1.06); }
  100% { opacity: 1; filter: none; transform: none; }
}
.hx-photo { animation-delay: 0.3s; animation-duration: 1.4s; }
@keyframes hx-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes hx-blink { 50% { opacity: 0.35; } }

@media (max-width: 640px) {
  .hx-name { white-space: normal; font-size: 19vw; line-height: 0.84; }
  .hx-role { font-size: 6.6vw; margin-top: 10px; }
  .hx-photo.wide { width: calc(100% + 2 * var(--gutter)); max-width: none; aspect-ratio: 1 / 1; }
  .hx-photo.wide img { object-position: 52% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-status, .hx-name, .hx-role, .hx-photo, .hx-status-dot,
  .hx-c, .hx-seal, .hx-seal text, .hx-spark, .hx-orbit path { animation: none !important; }
  .hx-orbit path { stroke-dashoffset: 0; }
  .hx-progress .ui-progress span { width: 100%; animation: none; }
}

/* Empresas que já atendi: carrossel de logos em preto, com as bordas sumindo */
.clients-wrap { padding: clamp(8px, 1.5vw, 20px) 0 0; overflow: hidden; }
.clients-marquee {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.clients-track { display: flex; width: max-content; animation: clients-scroll 70s linear infinite; }
.clients-group {
  list-style: none; margin: 0; padding: 0 clamp(28px, 4vw, 48px) 0 0;
  display: flex; align-items: center; gap: clamp(48px, 6vw, 88px); flex-shrink: 0;
}
.clients-group li { display: flex; align-items: center; height: 56px; flex-shrink: 0; }
/* Logos sempre em preto, qualquer que seja a cor original */
.clients-group img { display: block; height: 32px; width: auto; max-width: 170px; object-fit: contain; filter: brightness(0); opacity: 0.88; }
.clients-group img[data-name="SBT Games"] { height: 44px; }
.clients-group img[data-name="ABB"] { height: 28px; }
.clients-group img[data-name="14b Venture Capital"] { height: 44px; }
.clients-group img[data-name="Pier"] { height: 26px; }
.clients-group img[data-name="Cumbuca"] { height: 28px; }
.clients-group img[data-name="AbacatePay"] { height: 36px; }
/* Logos já em tons de cinza (ex.: AbacatePay) não passam pelo filtro de preto, para os detalhes aparecerem */
.clients-group img[data-gray] { filter: none; opacity: 1; }
@keyframes clients-scroll { to { transform: translateX(-50%); } }
@media (max-width: 640px) {
  .clients-group { gap: 40px; }
  .clients-group img { height: 24px; max-width: 130px; }
  .clients-group img[data-name="SBT Games"] { height: 34px; }
  .clients-group img[data-name="ABB"] { height: 21px; }
  .clients-group img[data-name="14b Venture Capital"] { height: 34px; }
  .clients-group img[data-name="Pier"], .clients-group img[data-name="Cumbuca"] { height: 20px; }
  .clients-group img[data-name="AbacatePay"] { height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; width: auto; justify-content: center; }
  .clients-group { flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
  .clients-group[aria-hidden="true"], .clients-group li:nth-child(n+11) { display: none; }
  .clients-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ===================== Visão geral ===================== */
.overview-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
@media (max-width: 860px) { .overview-grid { grid-template-columns: 1fr; } }

/* ===================== Cabeçalho de seção ===================== */
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  margin-bottom: 40px; flex-wrap: wrap;
}

/* ===================== Cards de projeto ===================== */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px) clamp(16px, 2.5vw, 32px); }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; }
.card-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: clamp(18px, 2vw, 26px);
  overflow: hidden; background: var(--surface-2); isolation: isolate;
}
.card-media > img, .card-media > video, .card-media > .placeholder {
  width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease);
}
.card:hover .card-media > :is(img, video) { transform: scale(1.04); }

/* Card com vídeo dentro de uma janela de navegador */
.card-media.framed {
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--frame-bg) 70%, #5a5a5f) 0%, var(--frame-bg) 62%);
}
.browser-frame {
  width: 88%; border-radius: 12px; overflow: hidden; background: #0a0a0b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  transition: transform 1s var(--ease);
}
.card:hover .browser-frame { transform: translateY(-4px) scale(1.02); }
.browser-bar {
  position: relative; height: clamp(22px, 2.2vw, 30px); display: flex; align-items: center; gap: 6px;
  padding: 0 12px; background: #1c1c1f; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span {
  position: absolute; left: 50%; transform: translateX(-50%);
  padding: 2px 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6); font-size: 11px; letter-spacing: 0;
}
.card-media.framed .browser-frame video { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.card:hover .card-media.framed video { transform: none; }
/* Vídeo gravado com a tela inteira: mostra só a área da página (coverVideoCrop) */
.video-crop { position: relative; overflow: hidden; }
.card-media.framed .browser-frame .video-crop video {
  position: absolute; left: var(--vx); top: var(--vy);
  width: var(--vw); max-width: none; height: auto; aspect-ratio: auto; object-fit: fill;
}

.card-title { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -0.025em; margin-top: clamp(16px, 2vw, 24px); }
.card-cat { color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); margin-top: 6px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.tag {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}

.placeholder {
  display: grid; place-items: center;
  background: var(--ph);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(0,0,0,0.04));
  color: rgba(0, 0, 0, 0.35); font-size: 14px; font-weight: 500;
  min-height: 220px;
}

/* ===================== Serviços ===================== */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }
.service {
  display: flex; flex-direction: column; gap: 14px; min-height: 300px;
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.service:hover { transform: translateY(-4px); border-color: var(--text); }
.service-num { color: var(--accent); font-weight: 500; font-size: 14px; }
.service h3 { font-size: 30px; margin-top: auto; }
.service p { color: var(--muted); }
.service .link-arrow { margin-top: 8px; }
.service:hover .link-arrow { color: var(--accent); }

/* ===================== Juntos podemos ===================== */
.outcomes { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.outcomes li {
  display: flex; gap: clamp(16px, 4vw, 64px); align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 2.6vw, 32px); letter-spacing: -0.02em;
}
.outcomes span { font-size: 14px; color: var(--muted); min-width: 24px; }

/* ===================== Depoimentos ===================== */
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 800px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial {
  margin: 0; padding: 32px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 32px; justify-content: space-between;
}
.testimonial blockquote { margin: 0; font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; }
.testimonial figcaption { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--muted); }
.testimonial figcaption strong { color: var(--text); font-weight: 500; }
.testimonial .link-arrow { margin-left: auto; color: var(--text); }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-weight: 600;
}

/* ===================== CTA e rodapé ===================== */
.cta { padding: clamp(96px, 14vw, 180px) 0 clamp(64px, 8vw, 112px); }
.cta-title { font-size: clamp(44px, 9vw, 128px); letter-spacing: -0.05em; line-height: 0.95; }
.cta-mail {
  display: inline-block; margin-top: 32px;
  font-size: clamp(20px, 3vw, 36px); letter-spacing: -0.02em;
  border-bottom: 2px solid var(--line); padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s; overflow-wrap: anywhere;
}
.cta-mail:hover { color: var(--accent); border-color: var(--accent); }

.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); transition: color 0.2s; width: fit-content; }
.footer-grid a:hover { color: var(--text); }
.footer-label { color: var(--text); font-weight: 500; margin-bottom: 6px; }
.footer-end { align-items: flex-end; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-end { grid-column: 1 / -1; align-items: flex-start; }
}

/* ===================== Página de trabalhos ===================== */
.page-head { padding: clamp(56px, 10vw, 128px) 0 40px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.chip {
  font: inherit; font-size: 15px; cursor: pointer;
  padding: 9px 18px; border-radius: 999px;
  background: transparent; color: var(--text); border: 1px solid var(--line);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.empty { color: var(--muted); padding: 40px 0; }

/* ===================== Case study ===================== */
.case { padding-top: clamp(40px, 7vw, 88px); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--text); }
.case-kicker { font-size: 15px; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.case-title { max-width: 20ch; margin-bottom: clamp(32px, 5vw, 56px); }
.case-cover > * { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-2); }

/* Resumo (TL;DR) */
.case-summary {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.summary-cards { display: grid; gap: 28px; align-content: start; }
.summary-cards h2 { font-size: 14px; color: var(--accent); font-weight: 500; letter-spacing: 0; margin-bottom: 8px; }
.summary-cards p { font-size: clamp(18px, 1.7vw, 21px); letter-spacing: -0.01em; }
.case-meta { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; align-content: start; }
.case-meta div { border-top: 1px solid var(--line); padding-top: 12px; }
.case-meta dt { font-size: 13px; color: var(--muted); }
.case-meta dd { margin: 4px 0 0; font-weight: 500; font-size: 15px; }
.case-meta .case-link { border-top: 0; padding-top: 8px; grid-column: 1 / -1; }
@media (max-width: 860px) { .case-summary { grid-template-columns: 1fr; } }

/* Índice + corpo */
.case-layout {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px);
  padding-top: clamp(48px, 7vw, 96px);
}
.case-toc { position: sticky; top: 104px; align-self: start; font-size: 14px; }
.case-toc > p { color: var(--muted); margin-bottom: 14px; }
.case-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.case-toc a {
  display: flex; gap: 10px; padding: 7px 0 7px 16px; margin-left: -1px;
  color: var(--muted); border-left: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.case-toc a span { font-size: 12px; padding-top: 1px; opacity: 0.7; }
.case-toc a:hover { color: var(--text); }
.case-toc a[aria-current] { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 960px) {
  .case-layout { grid-template-columns: 1fr; }
  .case-toc { display: none; }
}

.case-body { display: grid; gap: clamp(72px, 10vw, 128px); min-width: 0; }
.case-section { display: grid; gap: 28px; scroll-margin-top: 96px; }
.case-section > p { font-size: 19px; max-width: 68ch; }
.case-section-num { font-size: 14px !important; color: var(--accent); font-weight: 500; }
.case-section-title { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.03em; max-width: 22ch; margin-top: -16px; }
.case-section h3 { font-size: 20px; letter-spacing: -0.01em; margin-bottom: 14px; }

.case-text { max-width: 68ch; }
.case-text p { font-size: 18px; }
.case-text p + p { margin-top: 14px; }
.case-list { margin: 0; padding-left: 1.3em; font-size: 18px; display: grid; gap: 10px; }
.case-list li::marker { color: var(--accent); font-weight: 500; }
.case-text p + .case-list { margin-top: 14px; }

.case-cards { display: grid; gap: 12px; }
.case-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.case-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.case-cards.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .case-cards.cols-3, .case-cards.cols-2, .case-cards.cols-4 { grid-template-columns: 1fr; } }
.case-card {
  padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 8px; align-content: start;
}
.case-card h4 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.case-card p { color: var(--muted); font-size: 15.5px; }
.case-card-num { font-size: 13px; color: var(--accent); font-weight: 500; }

.case-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.case-stats > div {
  padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 6px; align-content: start;
}
.case-stats strong { font-size: clamp(30px, 3.4vw, 42px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.case-stats span { color: var(--muted); font-size: 15px; }

.case-persona { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.persona-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.persona-head h4 { margin: 0; font-size: 20px; font-weight: 500; }
.persona-head p { color: var(--muted); font-size: 15px; }
.persona-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.persona-cols h5 { margin: 0 0 8px; font-size: 13px; color: var(--accent); font-weight: 500; }
.persona-cols ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 15.5px; }

.case-figure { margin: 0; min-width: 0; }
.case-figure > img, .case-figure > video, .case-figure > .placeholder {
  display: block; width: 100%; border-radius: var(--radius-lg); background: var(--surface-2);
}
.case-figure > .placeholder { aspect-ratio: 16 / 10; }
.case-figure figcaption { font-size: 14.5px; color: var(--muted); margin-top: 12px; max-width: 70ch; }
.case-figure figcaption strong { color: var(--text); font-weight: 500; }
.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 28px); align-items: start; }
@media (max-width: 640px) { .case-pair { grid-template-columns: 1fr; } }

.case-quote { margin: 0; padding: clamp(16px, 3vw, 32px) 0 clamp(16px, 3vw, 32px) clamp(20px, 3vw, 32px); border-left: 2px solid var(--accent); }
.case-quote blockquote { margin: 0; max-width: 32ch; font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -0.02em; line-height: 1.25; }
.case-quote figcaption { margin-top: 16px; color: var(--muted); font-size: 15px; }
.case-quote strong { color: var(--text); font-weight: 500; }

/* Próximo projeto */
/* Próximo projeto: faixa cinza de ponta a ponta, marca o fim do case */
.case-next {
  margin-top: clamp(48px, 8vw, 112px);
  padding: clamp(56px, 8vw, 112px) 0;
  background: #f4f4f2; border-top: 1px solid var(--line);
}
.next-link { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.next-media { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.next-media > * { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.next-link:hover .next-media > * { transform: scale(1.04); }
.next-link .muted { margin: 10px 0 18px; }
.next-link:hover .link-arrow { color: var(--accent); }
@media (max-width: 700px) { .next-link { grid-template-columns: 1fr; } }


/* ===================== Sobre: resumo na home ===================== */
.about-short-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.about-short-text { max-width: 26ch; margin-bottom: 24px; }
.about-short .about-photo img { width: clamp(120px, 14vw, 180px); height: clamp(120px, 14vw, 180px); margin: 0; }
.about-facts { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-facts li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
@media (max-width: 640px) { .about-short-grid { grid-template-columns: 1fr; } }

/* ===================== Página Sobre ===================== */
.about-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.about-head .display { max-width: 12ch; margin-bottom: 32px; }
.about-photo.about-photo-lg img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); margin: 0; }
@media (max-width: 760px) { .about-head { grid-template-columns: 1fr; } }
.about-long { max-width: 68ch; display: grid; gap: 18px; padding-top: clamp(16px, 3vw, 40px); }
.about-long p { font-size: clamp(18px, 1.8vw, 22px); letter-spacing: -0.01em; line-height: 1.55; }
.about-long p:first-child { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; line-height: 1.35; }
.about-grid { padding-left: 0; padding-right: 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 96px); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-sub { margin-top: clamp(48px, 6vw, 72px); }
.xp-list.edu-list li { grid-template-columns: 120px 1fr auto; }
@media (max-width: 520px) { .xp-list.edu-list li { grid-template-columns: 1fr; gap: 4px; } .xp-list.edu-list em, .xp-list.edu-list p { grid-column: 1; margin: 0; text-align: left; } }
.edu-list p { grid-column: 2 / -1; color: var(--muted); font-size: 15px; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ===================== Sobre: foto ===================== */
.about-photo:empty { display: none; }
.about-photo img {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin-bottom: 28px;
  border: 1px solid var(--line);
}

/* ===================== Experiência e ferramentas ===================== */
.xp-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 96px); }
@media (max-width: 860px) { .xp-grid { grid-template-columns: 1fr; } }
.xp-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.xp-list li {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.xp-list span { font-size: 14px; color: var(--muted); }
.xp-list strong { font-weight: 500; font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.01em; }
.xp-list em { font-style: normal; color: var(--muted); font-size: 15px; text-align: right; }
@media (max-width: 520px) {
  .xp-list li { grid-template-columns: 48px 1fr; }
  .xp-list em { grid-column: 2; text-align: left; margin-top: -10px; }
}
.tools { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li {
  padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px;
}

/* ===================== Playground ===================== */
.play-intro { max-width: 52ch; margin-top: 12px; }

/* Carrossel automático da home */
.marquee {
  overflow: hidden; padding: 4px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; gap: clamp(12px, 1.6vw, 20px); width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(12px, 1.6vw, 20px) / 2)); } }
.marquee-item {
  position: relative; flex: 0 0 auto; height: clamp(220px, 26vw, 340px); aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.marquee-item:hover img { transform: scale(1.05); }
.marquee-cap, .bento-cap {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 12px; font-size: 14px; color: #fff;
  background: rgba(10, 10, 10, 0.55); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.45s var(--spring);
}
.marquee-cap em, .bento-cap em { font-style: normal; font-size: 12px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.marquee-cap strong, .bento-cap strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marquee-item:hover .marquee-cap, .marquee-item:focus-visible .marquee-cap,
.bento-item:hover .bento-cap, .bento-item:focus-visible .bento-cap { opacity: 1; transform: none; }
@media (hover: none) { .marquee-cap, .bento-cap { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .marquee-item[aria-hidden="true"] { display: none; }
}

/* Página: bento grid */
.play-lead { margin-top: 24px; max-width: 52ch; }
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(160px, 17vw, 240px);
  grid-auto-flow: dense; gap: clamp(10px, 1.4vw, 18px);
}
.bento-item {
  position: relative; padding: 0; border: 0; cursor: pointer; font: inherit; text-align: left;
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2);
}
.bento-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.bento-item:hover img { transform: scale(1.04); }
.bento-item.size-lg { grid-column: span 2; grid-row: span 2; }
.bento-item.size-wide { grid-column: span 2; }
.bento-item.size-tall { grid-row: span 2; }
.bento-item.size-portrait { grid-column: span 2; grid-row: span 3; } /* metade da largura, proporção ~3:4 */
@media (max-width: 760px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; }
  .bento-item.size-wide, .bento-item.size-lg { grid-column: span 2; }
  .bento-item.size-lg { grid-row: span 1; }
  .bento-item.size-portrait { grid-column: span 1; grid-row: span 2; }
}

/* Visualizador */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: clamp(16px, 4vw, 56px);
  border: 0; background: transparent; color: #f5f5f7;
}
.lightbox[open] { display: grid; place-items: center; animation: lb-in 0.4s var(--spring); }
.lightbox::backdrop { background: rgba(8, 8, 8, 0.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; max-width: min(1400px, 100%); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; border-radius: 14px; }
.lightbox figcaption { display: flex; gap: 16px; font-size: 15px; }
#lb-count { color: rgba(245, 245, 247, 0.55); font-variant-numeric: tabular-nums; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #f5f5f7; font-size: 18px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; } }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

/* ===================== Animação de entrada ===================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Imagens verticais no case */
.case-figure.narrow { max-width: 440px; }

/* ===================== Como eu trabalho ===================== */
.workflow-intro { max-width: 44ch; }
.workflow { margin-top: 0; }
.workflow li { align-items: flex-start; }
.workflow li > span { padding-top: 8px; color: var(--accent); }
.workflow strong { display: block; font-weight: 500; }
.workflow p { font-size: 17px; color: var(--muted); letter-spacing: 0; margin-top: 6px; max-width: 60ch; line-height: 1.5; }

/* ===================== Ferramentas agrupadas ===================== */
.tool-groups { display: grid; gap: 24px; margin-top: 32px; }
.tool-group > p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.tool-group .tools { margin-top: 0; }
.tool-group:first-child .tools li { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* ===================== Selo "Design + código" ===================== */
.card-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag-code { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.case-kicker .tag-code { margin-left: 8px; vertical-align: 1px; font-weight: 400; }

/* ===================== Player de vídeo (sem som) ===================== */
.vplayer { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: #0a0a0b; }
.vplayer video { display: block; width: 100%; height: auto; border-radius: 0; }
.case-cover > .vplayer video { height: 100%; object-fit: cover; }
.case-figure > .vplayer { width: 100%; }
.vp-bar {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px;
  border-radius: 999px; background: rgba(12, 12, 14, 0.62); color: #f5f5f7;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s var(--ease);
  cursor: default;
}
.vplayer:hover .vp-bar, .vplayer:focus-within .vp-bar, .vplayer.is-paused .vp-bar { opacity: 1; transform: none; }
@media (hover: none) { .vp-bar { opacity: 1; transform: none; } }
.vp-play {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: inherit;
}
.vp-play:hover { background: rgba(255, 255, 255, 0.26); }
/* ícone: pausa (duas barras) / play (triângulo) */
.vp-ico { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.vplayer.is-paused .vp-ico {
  width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor; margin-left: 3px;
}
.vp-seek {
  --p: 0%; flex: 1; min-width: 0; height: 18px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.vp-seek::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, 0.28) var(--p));
}
.vp-seek::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.28); }
.vp-seek::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
.vp-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); transition: transform 0.15s;
}
.vp-seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.vp-seek:active::-webkit-slider-thumb { transform: scale(1.25); }
.vp-time { flex: none; font-size: 12.5px; font-variant-numeric: tabular-nums; color: rgba(245, 245, 247, 0.8); }

/* ===================== Visualizador das mídias do case ===================== */
.lb-trigger { cursor: pointer; transition: opacity 0.2s; }
.lb-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.case-lb figure { width: min(1400px, 100%); }
.case-lb figcaption { max-width: 80ch; text-align: center; color: rgba(245, 245, 247, 0.8); line-height: 1.5; }
.case-lb figcaption strong { color: #f5f5f7; font-weight: 500; }
.case-lb .lb-count { color: rgba(245, 245, 247, 0.55); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-stage { display: grid; place-items: center; width: 100%; max-height: calc(100vh - 150px); }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; border-radius: 14px; cursor: pointer; }
.lb-stage .vplayer { width: auto; max-width: 100%; border-radius: 14px; }
.lb-stage .vplayer video { max-height: calc(100vh - 150px); width: auto; max-width: 100%; margin: 0 auto; }
/* zoom: a foto aparece no tamanho real e dá para rolar/arrastar */
.lb-stage.zoomed {
  display: block; overflow: auto; height: calc(100vh - 150px); border-radius: 14px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.lb-stage.zoomed img { max-width: none; max-height: none; width: max(200%, 1600px); cursor: grab; border-radius: 0; }
.case-lb .lb-btn { z-index: 2; }
.lb-stage.zoomed img { -webkit-user-drag: none; user-select: none; }
.lb-stage.panning img { cursor: grabbing; }

/* Flicks aleatórios no H1: letras que não piscam ficam paradas, sem repetir a animação */
.dc.still b { color: inherit; }


/* ===================== Currículo: escolha de idioma ===================== */
.cv-menu { position: relative; width: fit-content; }
.cv-toggle { cursor: pointer; font: inherit; }
.footer-cv {
  padding: 0; border: 0; background: none; color: var(--muted); text-align: left; transition: color 0.2s;
}
.footer-cv:hover, .footer-cv[aria-expanded="true"] { color: var(--text); }
.cv-pop {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 220px;
  display: grid; gap: 2px; padding: 6px; border-radius: 14px;
  background: var(--bg, #fff); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.06);
  animation: cv-in 0.22s var(--ease) both;
}
.cv-pop[hidden] { display: none; }
.footer .cv-pop { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.cv-pop-label { margin: 4px 10px 6px; font-size: 12px; color: var(--muted); }
.cv-pop a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: auto; padding: 10px 12px; border-radius: 9px; color: var(--text); font-size: 15px;
  transition: background-color 0.15s;
}
.footer-grid .cv-pop a { width: auto; color: var(--text); }
.cv-pop a:hover, .cv-pop a:focus-visible { background: var(--surface-2); outline: none; }
.cv-pop em { font-style: normal; font-size: 12px; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
@keyframes cv-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ===================== Experiência detalhada (Sobre) ===================== */
.xp-list.xp-detail > li { display: block; padding: 26px 0; }
.xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.xp-head > div { display: grid; gap: 4px; }
.xp-head em { text-align: left; }
.xp-head > span { flex: none; white-space: nowrap; }
.xp-points, .xp-wins ul { margin: 14px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: 16px; line-height: 1.5; color: var(--text); }
.xp-points li::marker, .xp-wins li::marker { color: var(--muted); }
.xp-wins { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.xp-wins p { font-size: 13px; color: var(--accent); font-weight: 500; }
.xp-wins ul { margin-top: 8px; }
@media (max-width: 520px) {
  .xp-head { flex-direction: column-reverse; gap: 6px; }
  .xp-list.xp-detail em { margin-top: 0; }
}
.xp-detail .xp-points li, .xp-detail .xp-wins li { display: list-item; padding: 0; border: 0; }

/* Título da página Sobre mim: menor que o display */
.about-title { font-size: clamp(32px, 4.6vw, 60px); letter-spacing: -0.04em; line-height: 1.04; font-weight: 500; max-width: 18ch; margin-bottom: 32px; }

/* Rodapé "Vamos trabalhar juntos": a mesma animação da hero */
.cta-decode { display: inline-block; }
.cta-decode.pre-decode { color: transparent; }

/* Vídeo do YouTube dentro do case */
.case-embed .yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #0a0a0b; }
.case-embed .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Vídeo com áudio (motion de apresentação): botão de som na barra e chamada "Ativar som" */
.vp-sound {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: inherit;
}
.vp-sound:hover { background: rgba(255, 255, 255, 0.26); }
.vp-sound-ico { width: 18px; height: 18px; display: block; }
.vplayer .vp-sound-ico .off { display: none; }
.vplayer.is-muted .vp-sound-ico .on { display: none; }
.vplayer.is-muted .vp-sound-ico .off { display: inline; }
.vp-unmute {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: #f5f5f7; color: #0a0a0a; font: inherit; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.vp-unmute:hover { background: #fff; transform: translateY(-1px); }
.vplayer:not(.is-muted) .vp-unmute { opacity: 0; pointer-events: none; transform: translateY(-4px); }

/* Par de mídias com a mesma proporção (ex.: foto e vídeo lado a lado) */
.case-pair.fixed-aspect .case-figure > img,
.case-pair.fixed-aspect .case-figure > .vplayer video { aspect-ratio: var(--pair-aspect); width: 100%; height: auto; object-fit: cover; }

/* ===================== Modal de contato ===================== */
.contact-modal {
  width: min(440px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px);
  margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; color: var(--text);
}
.contact-modal::backdrop { background: rgba(10, 10, 10, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: cm-fade 0.3s ease both; }
.contact-modal[open] .cm-card { animation: cm-in 0.5s var(--spring) both; }
.cm-card {
  position: relative; padding: 28px; border-radius: 28px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 40px 80px -24px rgba(0, 0, 0, 0.45);
}
.cm-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: #f2f2f0; color: #0a0a0a; font-size: 14px; transition: background-color 0.2s, transform 0.2s;
}
.cm-close:hover { background: #e6e6e3; transform: rotate(90deg); }
.cm-head { text-align: left; }
.cm-avatar { position: relative; display: block; width: 56px; height: 56px; margin-bottom: 18px; }
.cm-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cm-avatar i { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 3px #fff; }
.cm-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cm-status span { width: 7px; height: 7px; border-radius: 50%; background: #30d158; animation: island-pulse 2s ease-in-out infinite; }
.cm-head h2 { font-size: clamp(28px, 6vw, 34px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.cm-sub { margin-top: 8px; color: var(--muted); font-size: 15px; }
.cm-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.cm-row { position: relative; }
.cm-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px;
  background: #f5f5f3; color: #0a0a0a; transition: background-color 0.2s, transform 0.25s var(--ease);
}
.cm-link:hover { background: #ececea; transform: translateY(-1px); }
.cm-ico {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: #0a0a0a; color: #fff;
}
.cm-ico svg { width: 22px; height: 22px; }
.is-wa .cm-ico { background: #25d366; }
.is-li .cm-ico { background: #0a66c2; }
.cm-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cm-text strong { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.cm-text span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-go { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform 0.25s var(--ease), color 0.2s; }
.cm-go svg { width: 100%; height: 100%; }
.cm-link:hover .cm-go { transform: translate(2px, -2px); color: #0a0a0a; }
/* E-mail: botão de copiar no lugar da seta */
.is-mail .cm-link { padding-right: 116px; }
.is-mail .cm-go { display: none; }
.cm-copy {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #0a0a0a; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.cm-copy svg { width: 15px; height: 15px; }
.cm-copy:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.cm-copy.done { background: #30d158; border-color: #30d158; color: #fff; }
@keyframes cm-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 520px) {
  .contact-modal { margin: auto 0 0; width: 100%; max-height: 100%; }
  .contact-modal[open] .cm-card { animation-name: cm-up; }
  .cm-card { border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .is-mail .cm-link { padding-right: 64px; }
  .cm-copy { width: 40px; padding: 0; justify-content: center; }
  .cm-copy span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  @keyframes cm-up { from { transform: translateY(100%); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .contact-modal[open] .cm-card, .contact-modal::backdrop { animation: none; } }

/* ===================== Menu "Trabalhos" (prévia dos projetos) ===================== */
.nav-drop { display: contents; }
.work-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: min(720px, calc(100vw - 32px));
  padding: 10px; border-radius: 26px; white-space: normal;
  background: #0e0e0e; color: #f5f5f7;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden; transform: translate(-50%, -8px) scale(0.985); transform-origin: top center;
  transition: opacity 0.22s ease, transform 0.35s var(--spring), visibility 0s linear 0.35s;
}
/* ponte invisível entre o link e o painel, para o hover não "cair" no espaço entre eles */
.work-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.island.work-open .work-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
.island.work-open .nav-drop > a { color: #fff; background: rgba(255, 255, 255, 0.1); }
.wm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.wm-item {
  display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px;
  color: #f5f5f7 !important; transition: background-color 0.18s;
}
.wm-item:hover, .wm-item:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.wm-thumb {
  flex: none; width: 92px; height: 62px; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.wm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.wm-item:hover .wm-thumb img { transform: scale(1.06); }
.wm-text { display: grid; gap: 4px; min-width: 0; }
.wm-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wm-top strong { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-top em {
  flex: none; font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: rgba(245, 245, 247, 0.75);
}
.wm-blurb {
  font-size: 12.5px; line-height: 1.4; color: rgba(245, 245, 247, 0.62);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wm-all {
  display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 14px 16px;
  border-radius: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px; font-weight: 500; color: rgba(245, 245, 247, 0.85) !important; transition: background-color 0.18s;
}
.wm-all:hover { background: rgba(255, 255, 255, 0.08); color: #fff !important; }
@media (max-width: 820px) { .work-menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .work-menu { transition: opacity 0.15s; transform: translate(-50%, 0); } }

.case-section > * { min-width: 0; }

/* Playground na home, no celular: grade de 2 colunas (sem carrossel lateral) */
@media (max-width: 640px) {
  .marquee { overflow: visible; padding: 0 var(--gutter); -webkit-mask-image: none; mask-image: none; }
  .marquee-track { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: auto; animation: none; }
  .marquee-item { height: auto; aspect-ratio: 1 / 1; border-radius: 16px; }
  .marquee-item[aria-hidden="true"], .marquee-item:nth-child(n+8) { display: none; }
  #playground .section-head .link-arrow { display: none; }
  .marquee-item:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
  .marquee-cap { left: 8px; right: 8px; bottom: 8px; padding: 7px 10px; font-size: 12.5px; border-radius: 10px; opacity: 1; transform: none; }
  .marquee-cap em { display: none; }
  .marquee-item:first-child .marquee-cap em { display: inline; }
  .marquee-more {
    display: flex; justify-content: center; align-items: center; height: 48px; margin: 14px var(--gutter) 0;
    border-radius: 999px; border: 1px solid var(--line); font-weight: 500; font-size: 15px;
  }
}
@media (min-width: 641px) { .marquee-more { display: none; } }
