/* ==========================================================
   mateusemth.dev · modelo cinematográfico
   Camada extra sobre styles.css. Movimento em cinema.js (GSAP).
   ========================================================== */

/* O GSAP assume as revelações: os .rv do script.js ficam neutros */
.cine .rv { opacity: 1; transform: none; transition: none; }
.cine .stairs li.rv .stair-bar { transform: none; transition: none; }
.cine .stair-bar, .cine .deck-card, .cine .fig { transition: none; }
.cine #tree.draw path { animation: none; }
.cine .hero-ten { animation: none; }
.cine.lenis-smooth { scroll-behavior: auto !important; }
.cine .lenis.lenis-stopped { overflow: hidden; }

/* ── BorderBeam (recriação nativa do Magic UI) ───────────
   Um ponto de luz percorre a borda do elemento.
   Uso: o JS injeta <span class="beam"> dentro de .beam-host. */
.beam-host { position: relative; isolation: isolate; }
.beam {
  --size: 180px; --dur: 7s; --bw: 1.5px;
  --from: var(--signal); --to: #ffb37a;
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 6;
  border: var(--bw) solid transparent;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0) border-box;
  mask-composite: exclude;
  opacity: 0; transition: opacity .6s var(--ease);
}
.beam::after {
  content: ""; position: absolute; width: var(--size); aspect-ratio: 1;
  background: linear-gradient(to left, var(--from), var(--to), transparent);
  offset-path: rect(0 auto auto 0 round var(--size));
  offset-anchor: 90% 50%;
  animation: beam-run var(--dur) linear infinite;
}
.beam.b2::after { animation-delay: calc(var(--dur) / -2); }
@keyframes beam-run { to { offset-distance: 100%; } }
.beam-host.beam-on > .beam, .beam-always > .beam { opacity: 1; }
/* sem offset-path: um anel cônico girando faz o mesmo papel */
@supports not (offset-path: rect(0 auto auto 0)) {
  @property --beam-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
  .beam { background: conic-gradient(from var(--beam-a), transparent 0 78%, var(--to) 88%, var(--from) 96%, transparent 100%) border-box; animation: beam-spin var(--dur) linear infinite; }
  .beam::after { display: none; }
  @keyframes beam-spin { to { --beam-a: 360deg; } }
}
:root[data-mode="gamer"] .beam { --from: var(--signal); --to: var(--cyan); }
.after.deck-card .beam { --from: var(--blood); --to: #ffb37a; }
:root[data-mode="gamer"] .after.deck-card .beam { --from: var(--blood); --to: var(--signal); }

/* ── Cena 1 · tela de abertura ──────────────────────── */
.cine-loader {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: var(--ink); color: var(--paper);
  place-items: center; align-content: center; gap: 18px;
}
.cine-loading .cine-loader { display: grid; }
.cine-loading body { overflow: hidden; }
.cl-inner { display: flex; align-items: flex-start; font: 400 clamp(7rem, 26vw, 22rem)/.8 var(--serif); font-style: italic; letter-spacing: -.04em; }
.cl-plus { color: var(--signal); font-size: .5em; margin-top: .1em; }
.cl-num { font-variant-numeric: tabular-nums; min-width: 1.05em; }
.cl-cap { color: rgba(241, 238, 232, .6); }
.cl-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }
:root[data-mode="gamer"] .cine-loader { background: #040309; color: var(--ink); }
:root[data-mode="gamer"] .cl-num { color: var(--cyan); text-shadow: 0 0 40px rgba(0, 240, 255, .6); font-family: var(--sans); font-style: normal; font-weight: 700; }

/* título com máscara por linha (SplitText) */
.cine .intro-title .cine-line { padding-bottom: .06em; margin-bottom: -.06em; }
.cine .hero-num { will-change: transform; }

/* ── Cena 3 · sobre ─────────────────────────────────── */
.cine .about-big .cine-word { opacity: .14; }

/* ── Cena 4 · pilha ─────────────────────────────────── */
.cine .stack { perspective: 1400px; }
.cine .deck-card { transform-style: preserve-3d; }
.cine .deck-card .beam { --size: 260px; --dur: 9s; --bw: 1.5px; }

/* ── Cena 5 · contato ───────────────────────────────── */
.cine .contact-mail .cine-char { display: inline-block; }
.cine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 28px; }
.cine-actions .copy { margin-top: 0; }
.cine-cta {
  font: 500 16px/1 var(--sans); letter-spacing: -.01em; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px;
  padding: 18px 26px; display: inline-flex; gap: 12px; align-items: center;
  will-change: transform;
}
.cine-cta span { transition: transform .35s var(--ease); }
.cine-cta:hover span { transform: translateX(4px); }
.cine-cta .beam { --size: 70px; --dur: 3.2s; --bw: 2px; }
:root[data-mode="gamer"] .cine-cta { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.chat-go.beam-host .beam { --size: 70px; --dur: 3s; --bw: 2px; --from: #fff; --to: #b6ffd0; }

@media (prefers-reduced-motion: reduce) {
  .beam::after, .beam { animation: none; }
  .cine .about-big .cine-word { opacity: 1; }
}

/* gamer: o gradiente recortado no texto não sobrevive à divisão em letras */
:root.cine[data-mode="gamer"] .contact-mail { background: none; color: var(--ink); animation: none; }
:root.cine[data-mode="gamer"] .contact-mail .cine-char { color: var(--ink); text-shadow: 0 0 22px rgba(0, 240, 255, .55), 0 0 2px rgba(255, 43, 214, .8); }

/* ══════════════════════════════════════════════════════
   Vitrine de projetos (abertura): 7 quadros, o do mouse se expande
   ══════════════════════════════════════════════════════ */
.vitrine { background: var(--ink); color: var(--paper); padding-block: 14px 18px; }
.vitrine-in { display: grid; gap: 12px; }
.vitrine-label { display: flex; justify-content: space-between; color: rgba(241, 238, 232, .5); }
.vitrine-label span:first-child { color: var(--signal); }
.vt-list { display: flex; gap: 8px; height: clamp(124px, 15vh, 160px); }
.vt-list li { flex: 1 1 0; min-width: 0; transition: flex-grow .7s cubic-bezier(.2, .8, .2, 1); }
.vt-list:hover li { flex-grow: .8; }
.vt-list li:hover, .vt-list li:focus-within { flex-grow: 2.6; }
.vt {
  position: relative; height: 100%; border-radius: 14px; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; gap: 8px; padding: 14px 14px 12px;
  background: rgba(241, 238, 232, .045); border: 1px solid rgba(241, 238, 232, .12);
  transition: background .45s var(--ease), border-color .45s;
}
.vt:hover, .vt:focus-visible { background: rgba(241, 238, 232, .09); border-color: rgba(241, 238, 232, .26); }
.vt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.vt-n { font: 400 1.7rem/1 var(--serif); font-style: italic; color: var(--signal); }
.vt-c { font: 500 9.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: rgba(241, 238, 232, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-g { display: flex; align-items: center; min-height: 0; }
.vt-g svg { height: 100%; width: auto; max-width: 92px; max-height: 46px; overflow: visible; }
.vt-g svg * { fill: none; stroke: rgba(241, 238, 232, .55); stroke-width: 1.4; transition: stroke .4s, fill .4s; }
.vt-g svg .g-hot { fill: var(--signal); stroke: var(--signal); }
.vt-g svg .g-hot-l { stroke: var(--signal); stroke-width: 2; }
.vt-g svg .g-col { stroke: rgba(241, 238, 232, .18); }
.vt-g svg .g-dash { stroke-dasharray: 4 3; }
.vt:hover .vt-g svg * { stroke: rgba(241, 238, 232, .9); }
.vt:hover .vt-g svg .g-hot { fill: var(--signal); stroke: var(--signal); }
.vt:hover .vt-g svg .g-dash { animation: vt-dash 1.2s linear infinite; }
@keyframes vt-dash { to { stroke-dashoffset: -14; } }
.vt-t { font-size: clamp(.95rem, 1.15vw, 1.2rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
.vt-d {
  font-size: 12.5px; line-height: 1.4; color: rgba(241, 238, 232, .62);
  max-height: 0; opacity: 0; overflow: hidden; transform: translateY(6px);
  transition: max-height .5s var(--ease), opacity .35s .1s, transform .5s var(--ease);
}
.vt-d b { display: block; margin-top: 4px; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--signal); }
.vt:hover .vt-d, .vt:focus-visible .vt-d { max-height: 70px; opacity: 1; transform: none; }
.vt .beam { --size: 90px; --dur: 3.4s; --bw: 1.5px; }
.vt:hover > .beam, .vt:focus-visible > .beam { opacity: 1; }

:root[data-mode="gamer"] .vitrine { background: transparent; border-block: 1px solid var(--signal); box-shadow: 0 0 20px -4px rgba(255, 43, 214, .5), inset 0 0 30px rgba(255, 43, 214, .06); }
:root[data-mode="gamer"] .vt { border-color: rgba(0, 240, 255, .25); background: rgba(0, 240, 255, .03); }
:root[data-mode="gamer"] .vt-n { color: var(--cyan); font-family: var(--mono); font-style: normal; font-size: 1.1rem; }
:root[data-mode="gamer"] .vt-t { text-transform: uppercase; font-weight: 700; letter-spacing: -.01em; }
:root[data-mode="gamer"] .vt-g svg .g-hot { fill: var(--signal); stroke: var(--signal); filter: drop-shadow(0 0 4px var(--signal)); }

@media (max-width: 900px) {
  .vt-list { height: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vt-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .vt { grid-template-rows: auto auto; gap: 6px; padding: 11px 12px; }
  .vt-g, .vt-d { display: none; }
  .vt-n { font-size: 1.3rem; }
  .vt-t { font-size: .95rem; }
}

/* memoji: o título contorna o memoji em vez de passar por baixo */
.cine .hero-copy { display: block; }
.cine .hero-copy > * + * { margin-top: 22px; }
.cine .hero-copy > .hero-slot + * { margin-top: 0; }
.cine .hero-slot {
  position: relative; right: auto; top: auto; float: right;
  width: clamp(120px, 11vw, 190px); margin: 0 0 18px 24px; shape-outside: circle(50%);
}
@media (max-width: 720px) {
  .cine .hero-copy > * + * { margin-top: 14px; }
  .cine .hero-slot { width: 26vw; max-width: 120px; margin: 0 0 6px 14px; }
}

/* ══════════════════════════════════════════════════════
   Cena 2 · Da planilha ao sistema (janela que se transforma)
   Sobe como cortina sobre a abertura.
   ══════════════════════════════════════════════════════ */
.evo {
  position: relative; z-index: 3; background: var(--paper);
  border-radius: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 0 0;
  box-shadow: 0 -30px 60px -30px rgba(20, 20, 19, .35);
  min-height: 100svh; display: flex; align-items: center;
  padding-block: clamp(28px, 5vh, 56px);
}
:root[data-mode="gamer"] .evo { border-top: 1px solid var(--rule); box-shadow: 0 -20px 60px -20px rgba(0, 240, 255, .3); }
.evo-in { width: 100%; display: grid; gap: clamp(20px, 4vh, 44px); }
.evo-head { display: grid; gap: 12px; }
.evo-kicker { color: var(--ink); }
.evo .solve-title { font-size: clamp(2rem, 4.4vw, 4.2rem); font-weight: 500; letter-spacing: -.045em; line-height: 1; max-width: 16em; text-wrap: balance; }
.evo .solve-title em { color: var(--signal-ink); }
.evo-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center; }

/* passos */
.evo-steps { position: relative; display: grid; gap: 4px; padding-left: 22px; }
.evo-rail { position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.evo-rail b { position: absolute; inset: 0; background: var(--signal); transform-origin: top; transform: scaleY(var(--p, 1)); }
.evo-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 12px 0; opacity: .38; transition: opacity .45s var(--ease); }
.evo-steps li.on { opacity: 1; }
.es-n { font: 400 1.6rem/1 var(--serif); font-style: italic; color: var(--signal); }
.evo-steps h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.evo-steps p { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; max-width: 26em; }

/* janela */
.evo-stage { perspective: 1600px; }
.evo-win { max-width: calc((100svh - 330px) * 1.7); margin-inline: auto; }
@media (max-width: 900px) { .evo-win { max-width: calc((100svh - 300px) * 1.7); } }
.evo-win {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #fff; border: 1px solid var(--rule);
  box-shadow: 0 50px 80px -40px rgba(20, 20, 19, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
  font-family: var(--sans); color: #1d1d1b;
}
.evo-win .beam { --size: 220px; --dur: 6s; --bw: 2px; }
.ew-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f4f2ee; border-bottom: 1px solid #e6e2da; }
.ew-dots { display: flex; gap: 6px; }
.ew-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ddd8cf; }
.ew-dots i:first-child { background: #ff5f57; } .ew-dots i:nth-child(2) { background: #febc2e; } .ew-dots i:nth-child(3) { background: #28c840; }
.ew-url { position: relative; flex: 1; height: 24px; border-radius: 7px; background: #fff; border: 1px solid #e6e2da; overflow: hidden; }
.ew-url b { position: absolute; inset: 0; display: flex; align-items: center; padding-inline: 10px; font: 500 11.5px var(--mono); color: #6d6a63; }
.ew-url .u1::before { content: ""; width: 12px; height: 12px; border-radius: 2px; background: #1f8f4e; margin-right: 8px; }
.ew-url .u2::before { content: "🔒"; font-size: 10px; margin-right: 8px; }
.ew-url .u1 { opacity: 0; }
.ew-chip { font: 500 10.5px var(--mono); padding: 4px 9px; border-radius: 999px; background: #fff3e8; color: #b84300; border: 1px solid #ffd4b3; opacity: 0; }

.ew-body { position: relative; aspect-ratio: 16 / 9.4; }
.ew-sheet, .ew-app { position: absolute; inset: 0; }

/* planilha */
.ew-sheet { display: grid; grid-template-rows: auto 1fr; background: #fff; }
.ew-fx { display: flex; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid #ebe8e2; font: 500 12px var(--mono); color: #6d6a63; }
.ew-fx b { color: #9a968e; font-style: italic; font-family: var(--serif); font-size: 15px; }
.ew-fx code { color: #1f8f4e; opacity: 0; }
.ew-grid { display: grid; grid-template-columns: 30px 1.6fr 1.1fr .8fr 1fr 1.1fr; grid-auto-rows: 1fr; font-size: clamp(10px, .95vw, 13px); }
.ew-grid .c { border-right: 1px solid #ebe8e2; border-bottom: 1px solid #ebe8e2; padding: 0 10px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.ew-grid .h, .ew-grid .n { background: #f6f5f2; color: #9a968e; font: 500 10.5px var(--mono); justify-content: center; padding: 0; }
.ew-grid .th { font-weight: 600; background: #fbfaf8; }
.ew-grid .row-hot { background: #fff7f0; }
.pill { font: 600 10.5px var(--sans); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: #e3f5ea; color: #1f7a44; }
.pill.late { background: #ffe9dc; color: #c2410c; }
.ew-grid .st .pill { opacity: 0; }

/* sistema */
.ew-app { display: grid; grid-template-columns: 52px 1fr; background: #f7f6f3; }
.ea-side { background: #141413; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 14px; }
.ea-logo { width: 22px; height: 22px; border-radius: 7px; background: var(--signal); margin-bottom: 8px; }
.ea-side i { width: 18px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.ea-side i.on { background: #fff; }
.ea-main { padding: clamp(10px, 1.6vw, 20px); display: grid; gap: clamp(8px, 1.2vw, 14px); align-content: start; }
.ea-top { display: flex; align-items: center; gap: 10px; }
.ea-top h4 { font-size: clamp(14px, 1.5vw, 19px); font-weight: 600; letter-spacing: -.02em; margin-right: auto; }
.ea-search { font-size: 11px; color: #9a968e; background: #fff; border: 1px solid #e6e2da; border-radius: 8px; padding: 6px 12px; min-width: 30%; }
.ea-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #141413; color: #fff; font: 600 9.5px var(--mono); }
.ea-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ea-kpis div { background: #fff; border: 1px solid #ebe8e2; border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.ea-kpis small { font-size: 10.5px; color: #8a867e; }
.ea-kpis strong { font-size: clamp(16px, 1.9vw, 24px); font-weight: 600; letter-spacing: -.03em; }
.ea-kpis .warn strong { color: #c2410c; }
.ea-rows { display: grid; gap: 6px; }
.ea-rows li { display: grid; grid-template-columns: 1.6fr 1fr .7fr auto; align-items: center; gap: 10px; background: #fff; border: 1px solid #ebe8e2; border-radius: 9px; padding: 8px 12px; font-size: clamp(10px, .95vw, 12.5px); }
.ea-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ea-name i { width: 16px; height: 16px; border-radius: 5px; background: #e9e5dd; }

/* IA */
.ea-ai {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: 40%;
  background: #141413; color: #f1eee8; border-radius: 12px; padding: 14px;
  display: grid; align-content: start; gap: 10px;
  box-shadow: -20px 0 50px -20px rgba(20, 20, 19, .5);
}
.ai-head { font: 600 12px var(--sans); display: flex; gap: 6px; align-items: center; }
.ai-head b { color: var(--signal); }
.ai-q { justify-self: end; background: var(--signal); color: #fff; font-size: 12px; padding: 8px 11px; border-radius: 12px 12px 3px 12px; max-width: 90%; }
.ai-a { background: rgba(241, 238, 232, .08); font-size: 12px; line-height: 1.45; padding: 9px 11px; border-radius: 12px 12px 12px 3px; max-width: 95%; }
.ai-in { position: absolute; left: 14px; right: 14px; bottom: 14px; font-size: 11px; color: rgba(241, 238, 232, .45); border: 1px solid rgba(241, 238, 232, .14); border-radius: 9px; padding: 8px 10px; }

/* sem JS ou movimento reduzido: a janela mostra o estado final */
.ew-sheet { visibility: hidden; }
.cine-anim .ew-sheet { visibility: visible; }

:root[data-mode="gamer"] .evo-win { background: #0b0a14; color: var(--ink); border-color: rgba(0, 240, 255, .35); box-shadow: 0 0 40px -10px rgba(0, 240, 255, .4); }
:root[data-mode="gamer"] .ew-bar, :root[data-mode="gamer"] .ew-grid .h, :root[data-mode="gamer"] .ew-grid .n, :root[data-mode="gamer"] .ew-grid .th { background: #110f1e; }
:root[data-mode="gamer"] .ew-url, :root[data-mode="gamer"] .ew-sheet, :root[data-mode="gamer"] .ea-search, :root[data-mode="gamer"] .ea-kpis div, :root[data-mode="gamer"] .ea-rows li { background: #0b0a14; border-color: rgba(0, 240, 255, .18); color: var(--ink); }
:root[data-mode="gamer"] .ew-app { background: #07060d; }
:root[data-mode="gamer"] .ew-grid .c, :root[data-mode="gamer"] .ew-fx, :root[data-mode="gamer"] .ew-bar { border-color: rgba(0, 240, 255, .14); }
:root[data-mode="gamer"] .ea-side { background: #000; }
:root[data-mode="gamer"] .ea-ai { background: #120b1f; border: 1px solid rgba(255, 43, 214, .4); }

@media (max-width: 900px) {
  .evo-grid { grid-template-columns: 1fr; }
  .evo-stage { order: -1; }
  .evo-steps { padding-left: 0; display: grid; }
  .evo-steps li { grid-area: 1 / 1; opacity: 0; }
  .evo-steps li.on { opacity: 1; }
  .evo-rail { left: 0; right: 0; top: auto; bottom: -6px; width: auto; height: 2px; }
  .evo-rail b { transform-origin: left; transform: scaleX(var(--p, 1)); }
  .ea-ai { width: 58%; }
  .ea-rows li { grid-template-columns: 1.6fr auto; }
  .ea-rows li > span:nth-child(2), .ea-rows li > span:nth-child(3) { display: none; }
  .ew-grid { grid-template-columns: 22px 1.6fr 1fr .9fr; }
  .ew-grid .c:nth-child(6n+4), .ew-grid .c:nth-child(6n+5) { display: none; }
  .ew-chip { display: none; }
}
@media (max-width: 720px) {
  .evo .solve-title { font-size: clamp(1.7rem, 7.6vw, 2.4rem); }
  .ea-kpis div:nth-child(3) { display: none; }
  .ea-kpis { grid-template-columns: 1fr 1fr; }
  .ea-main { padding: 8px; gap: 6px; }
  .ea-rows li { padding: 5px 8px; }
  .ea-rows li:nth-child(n + 4) { display: none; }
  .ai-q, .ai-a { font-size: 10.5px; padding: 6px 8px; }
  .ai-in { display: none; }
}

/* ══════════════════════════════════════════════════════
   Contato · cartões de WhatsApp, GitHub e Instagram
   A cor da marca inunda o cartão a partir do cursor.
   ══════════════════════════════════════════════════════ */
.social { margin-top: clamp(40px, 7vh, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sc {
  --brand: #25d366; --on: #fff;
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 18px 16px;
  min-height: clamp(180px, 26vh, 240px); padding: clamp(18px, 2vw, 26px);
  border-radius: 20px; border: 1px solid var(--rule); background: var(--paper-2);
  color: var(--ink); transition: color .45s var(--ease), border-color .45s;
}
.sc-gh { --brand: #141413; }
.sc-ig { --brand: linear-gradient(45deg, #f58529, #dd2a7b 45%, #8134af 75%, #515bd4); }
.sc-fill { position: absolute; inset: 0; z-index: -1; background: var(--brand); clip-path: circle(0% at 50% 50%); }
.sc-logo { grid-row: 1; grid-column: 1; align-self: start; width: clamp(44px, 4.4vw, 60px); aspect-ratio: 1; display: grid; place-items: center; will-change: transform; }
.sc-logo svg { width: 100%; height: 100%; fill: #25d366; transition: fill .45s var(--ease), transform .6s cubic-bezier(.2, .8, .2, 1); }
.sc-gh .sc-logo svg { fill: var(--ink); }
.sc-ig .sc-logo svg { fill: #dd2a7b; }
.sc-txt { grid-row: 2; grid-column: 1 / -1; display: grid; gap: 4px; }
.sc-txt b { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.sc-txt span { font: 500 12px var(--mono); letter-spacing: .04em; color: var(--ink-2); transition: color .45s; }
.sc-cta { grid-row: 1; grid-column: 2; justify-self: end; align-self: start; font: 500 10.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--rule); transition: color .45s, border-color .45s, background .45s; white-space: nowrap; }
.sc-cta i { font-style: normal; display: inline-block; transition: transform .45s var(--ease); }
.sc .beam { --size: 110px; --dur: 3.6s; --bw: 2px; --from: #fff; --to: rgba(255, 255, 255, .4); }
.sc:hover, .sc:focus-visible { color: var(--on); border-color: transparent; }
.sc:hover .sc-logo svg, .sc:focus-visible .sc-logo svg { fill: var(--on); transform: rotate(-8deg) scale(1.08); }
.sc:hover .sc-txt span, .sc:focus-visible .sc-txt span { color: rgba(255, 255, 255, .8); }
.sc:hover .sc-cta, .sc:focus-visible .sc-cta { color: var(--on); border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); }
.sc:hover .sc-cta i { transform: translate(3px, -3px); }
.sc:hover > .beam, .sc:focus-visible > .beam { opacity: 1; }
/* teclado e toque: sem cursor, a cor entra pelo centro */
.sc:focus-visible .sc-fill { clip-path: circle(150% at 50% 50%); }

:root[data-mode="gamer"] .sc { background: rgba(0, 240, 255, .03); border-color: rgba(0, 240, 255, .25); }
:root[data-mode="gamer"] .sc-gh { --brand: linear-gradient(135deg, #7a5cff, #00f0ff); }
:root[data-mode="gamer"] .sc-gh .sc-logo svg { fill: var(--cyan); }
:root[data-mode="gamer"] .sc-logo svg { filter: drop-shadow(0 0 10px currentColor); }
:root[data-mode="gamer"] .sc-txt b { text-transform: uppercase; font-weight: 700; letter-spacing: -.02em; }
:root[data-mode="gamer"] .sc:hover { box-shadow: 0 0 40px -6px rgba(0, 240, 255, .5); }

@media (max-width: 720px) {
  .social { grid-template-columns: 1fr; gap: 10px; }
  .sc { min-height: 0; grid-template-columns: auto 1fr auto; grid-template-rows: auto; align-items: center; gap: 14px; padding: 16px 18px; }
  .sc-logo { grid-row: 1; width: 40px; align-self: center; }
  .sc-txt { grid-row: 1; grid-column: 2; }
  .sc-txt b { font-size: 1.35rem; }
  .sc-cta { grid-row: 1; grid-column: 3; align-self: center; padding: 6px 9px; }
  .sc-cta { font-size: 0; } .sc-cta i { font-size: 14px; }
}
/* abertura cabe na primeira tela com a vitrine */
.cine .intro-stage { padding-block: clamp(12px, 2.4vh, 36px); }
/* quadros estreitos (quando outro está aberto): só número, desenho e nome */
.vt { container-type: inline-size; }
@container (max-width: 150px) {
  .vt-c { display: none; }
  .vt-t { font-size: .88rem; letter-spacing: -.02em; hyphens: auto; }
}

/* emendas: a cena da planilha encosta na vitrine, sem cobrir */
.evo { box-shadow: none; }
/* vãos menores entre as cenas */
.cine .about { padding-bottom: clamp(48px, 8vh, 96px); }
.cine .stack { padding-bottom: 24px; }
.cine .contact { padding-top: clamp(40px, 7vh, 80px); }

/* ══════════════════════════════════════════════════════
   Modal do WhatsApp · versão cinematográfica
   Palco escuro com o memoji e a prévia da mensagem; texto ao lado.
   ══════════════════════════════════════════════════════ */
.cine-chat.chat {
  width: min(880px, calc(100vw - 32px)); max-width: none; padding: 0; overflow: hidden;
  display: none; grid-template-columns: 1fr 1.05fr;
  background: var(--paper); color: var(--ink); border: 0; border-radius: 28px;
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .6);
  animation: none;
}
.cine-chat.chat[open] { display: grid; animation: none; }
.cine-chat.chat::backdrop { background: rgba(10, 9, 8, .62); backdrop-filter: blur(10px) saturate(.8); }
.cine-chat .chat-close-form { position: absolute; top: 14px; right: 14px; z-index: 5; }
.cine-chat .chat-close { width: 38px; height: 38px; border-radius: 50%; }

.cc-stage {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; align-content: center; gap: 0; padding: 36px 28px 30px; min-height: 440px;
}
.cc-stage::before { /* grão */
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cc-glow { position: absolute; width: 140%; aspect-ratio: 1; left: -20%; top: -45%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 79, 0, .55), rgba(255, 79, 0, .12) 55%, transparent); filter: blur(10px); }
.cine-chat .chat-face { position: relative; inset: auto; transform: none; width: 168px; height: 168px; margin: 0 0 -18px; z-index: 2; animation: none; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.cc-phone {
  position: relative; z-index: 1; width: min(300px, 100%); display: grid; gap: 10px;
  padding: 30px 14px 14px; border-radius: 22px;
  background: rgba(241, 238, 232, .06); border: 1px solid rgba(241, 238, 232, .12);
  backdrop-filter: blur(6px);
}
.cc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(241, 238, 232, .1); }
.cc-av { width: 30px; height: 30px; border-radius: 50%; background: #25d366; display: grid; place-items: center; }
.cc-av svg { width: 17px; height: 17px; fill: #fff; }
.cc-head b { display: block; font-size: 13.5px; font-weight: 600; }
.cc-head small { display: block; font: 500 10px var(--mono); letter-spacing: .04em; color: rgba(241, 238, 232, .5); }
.cc-typing { justify-self: end; display: flex; gap: 4px; padding: 10px 12px; border-radius: 14px 14px 4px 14px; background: #1f5f3a; }
.cc-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .8); animation: cc-dot 1s ease-in-out infinite; }
.cc-typing i:nth-child(2) { animation-delay: .15s; } .cc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cc-dot { 50% { transform: translateY(-4px); opacity: .5; } }
.cc-msg { justify-self: end; max-width: 92%; font-size: 13.5px; line-height: 1.4; padding: 10px 12px 8px; border-radius: 14px 14px 4px 14px; background: #1f5f3a; color: #f1fff6; }
.cc-msg small { display: block; text-align: right; margin-top: 4px; font: 500 9.5px var(--mono); color: rgba(241, 255, 246, .65); }
.cc-msg small::first-letter { text-transform: none; }

.cc-copy { padding: clamp(32px, 4vw, 52px) clamp(24px, 3.4vw, 44px); display: grid; align-content: center; gap: 18px; text-align: left; }
.cine-chat .chat-kicker { text-align: left; }
.cine-chat .chat-title { text-align: left; margin: 0; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: .98; letter-spacing: -.045em; font-weight: 500; }
.cine-chat .chat-text { text-align: left; margin: 0; }
.cine-chat .chat-go {
  margin-top: 6px; width: 100%; border-radius: 16px; padding: 18px 20px; gap: 14px;
  font-size: 16px; font-weight: 500; letter-spacing: -.01em;
}
.cine-chat .chat-go > svg { width: 24px; height: 24px; fill: currentColor; }
.cc-alt { font-size: 13.5px; }
.cc-alt a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.cc-alt a:hover { color: var(--ink); text-decoration-color: currentColor; }

:root[data-mode="gamer"] .cine-chat.chat { background: #0b0a14; color: var(--ink); border: 1px solid rgba(0, 240, 255, .3); box-shadow: 0 0 60px -10px rgba(0, 240, 255, .4); }
:root[data-mode="gamer"] .cc-stage { background: #05040b; }
:root[data-mode="gamer"] .cc-glow { background: radial-gradient(closest-side, rgba(255, 43, 214, .5), rgba(0, 240, 255, .14) 55%, transparent); }
:root[data-mode="gamer"] .cc-msg, :root[data-mode="gamer"] .cc-typing { background: rgba(57, 255, 20, .18); border: 1px solid rgba(57, 255, 20, .4); }

@media (max-width: 720px) {
  .cine-chat.chat { grid-template-columns: 1fr; width: calc(100vw - 24px); max-height: calc(100svh - 24px); overflow-y: auto; border-radius: 22px; }
  .cc-stage { min-height: 0; padding: 22px 18px 18px; }
  .cine-chat .chat-face { width: 104px; height: 104px; margin-bottom: -12px; }
  .cc-phone { padding-top: 22px; }
  .cc-copy { padding: 22px 20px 24px; gap: 14px; }
  .cine-chat .chat-title { font-size: 2.1rem; }
}

/* nada de rolagem lateral: as rotações 3D (cards entrando inclinados) podem
   passar da largura da tela por um instante. clip não quebra o sticky. */
.cine body, .cine main { overflow-x: clip; }
/* "digitando…" e a mensagem ocupam o mesmo lugar */
.cc-typing, .cc-msg { grid-row: 2; grid-column: 1; align-self: end; }
.cine-chat .chat-close { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35); }
:root[data-mode="gamer"] .cine-chat .chat-close { background: #0b0a14; }

/* Cena 2 · abre pela dor: a foto ocupa o palco e se fecha dentro da janela */
.evo-stage { position: relative; }
.evo-pain {
  position: absolute; inset: 0; z-index: 4; margin: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 50px 80px -40px rgba(20, 20, 19, .5); display: none;
}
.cine-anim .evo-pain { display: block; }
.evo-pain img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 40%; display: block; }
.evo-pain figcaption {
  position: absolute; left: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center;
  padding: 8px 14px; border-radius: 999px; background: rgba(20, 20, 19, .72); color: #f1eee8;
  font-size: 13px; backdrop-filter: blur(8px);
}
.evo-pain figcaption .label { color: var(--signal); }
:root[data-mode="gamer"] .evo-pain { box-shadow: 0 0 40px -10px rgba(255, 43, 214, .45); outline: 1px solid rgba(255, 43, 214, .4); }
@media (max-width: 720px) { .evo-pain figcaption { font-size: 11.5px; padding: 6px 10px; left: 8px; bottom: 8px; } }

/* o BorderBeam não pode tirar o sticky dos cards da pilha */
.deck-card.beam-host { position: sticky; }

/* e-mail sempre em uma linha: o tamanho acompanha a largura da tela */
.cine .contact-mail { white-space: nowrap; word-break: normal; font-size: min(clamp(2.2rem, 8.4vw, 8.6rem), calc((100vw - 2 * var(--gutter)) / 10.4)); }

/* celular: cards da pilha enxutos (título, o que foi feito e a figura) */
@media (max-width: 720px) {
  .case.deck-card .case-meta { display: none; }
  .case.deck-card .case-sub { font-size: 15px; margin-top: 10px; }
  .case.deck-card .case-n { font-size: 2.4rem; }
  .case.deck-card .case-title { font-size: 1.75rem; }
  .case.deck-card .case-body { margin-top: 18px; gap: 16px; }
  .case.deck-card .pas { grid-template-columns: 1fr; border-top: 0; }
  .case.deck-card .pas section:not(:nth-child(2)) { display: none; }
  .case.deck-card .pas section:nth-child(2) { border: 0; border-top: 1px solid var(--rule); padding: 12px 0 0; }
  .case.deck-card .pas p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .case.deck-card .fig-frame { padding: 12px; }
  .case.deck-card .fig figcaption { display: none; }
  .roadmap.deck-card .rm-flow li { padding: 14px; gap: 6px; }
  .roadmap.deck-card .rm-flow p { font-size: 13.5px; }
  .roadmap.deck-card .case-sub { font-size: 14.5px; }
  .after.deck-card .after-intro { display: none; }
  .after.deck-card .after-grid { padding-top: 16px; gap: 20px; }
  .after.deck-card #tree { max-height: 34vh; }
  .after.deck-card .after-text > p:not(.after-lede):not(.after-note) { font-size: 14px; }
}
@media (max-width: 720px) {
  #versoes .fig-frame, #bots .fig-frame { zoom: .6; }
  .roadmap.deck-card .rm-intro .case-n { display: none; }
  .roadmap.deck-card .rm-intro { padding-top: 10px; }
  .roadmap.deck-card .rm-flow { margin-top: 18px; }
  .roadmap.deck-card .rm-flow li:not(.rm-hot) p { display: none; }
  .after.deck-card .after-text > p:not(.after-lede), .after.deck-card .after-note { display: none; }
  .after.deck-card .after-title { font-size: 3rem; }
  .after.deck-card #tree { max-height: 26vh; }
}

/* foto da dor: versão neon no modo gamer */
.evo-pain .pain-gamer { display: none; }
:root[data-mode="gamer"] .evo-pain .pain-normal { display: none; }
:root[data-mode="gamer"] .evo-pain .pain-gamer { display: block; }
