/* Sysborg — páginas de cases (lista e case individual) */
@font-face { font-family: "Tw Cen MT"; src: url(../assets/fonts/TCM_____.TTF); font-weight: 400; }
@font-face { font-family: "Tw Cen MT"; src: url(../assets/fonts/TCB_____.TTF); font-weight: 700; }
@font-face { font-family: "Tw Cen MT Condensed"; src: url(../assets/fonts/TCCM____.TTF); font-weight: 400; }
@font-face { font-family: "Tw Cen MT Condensed"; src: url(../assets/fonts/TCCB____.TTF); font-weight: 700; }

:root {
  --preto: #1A1A1A; --vermelho: #CC1F1F; --verm-escuro: #8B0000; --branco: #FFFFFF;
  --cinza-claro: #F2F2F2; --cinza-medio: #888888; --cinza-escuro: #333333; --linha: #2a2a2a;
  --font-head: "Tw Cen MT Condensed", "Barlow Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Tw Cen MT", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-code: "Courier New", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--preto); color: var(--branco); }
body { font-family: var(--font-body); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.04; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
.eyebrow { font-family: var(--font-code); color: var(--vermelho); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: #b5b5b5; }
.wrap { padding-left: 6vw; padding-right: 6vw; }

/* Topo */
.topbar { position: fixed; inset: 0 0 auto; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 6vw; z-index: 20; background: rgba(26,26,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); }
.topbar .brand img { height: 26px; display: block; }
.topbar nav { display: flex; gap: 28px; font-size: 15px; }
.topbar nav a { text-decoration: none; color: #cfcfcf; transition: color .2s; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--branco); }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--vermelho); color: var(--branco); text-decoration: none; padding: 12px 22px; font-weight: 700; font-size: 15px; border-radius: 2px; border: 0; cursor: pointer; font-family: var(--font-body); transition: background .2s; }
.btn:hover { background: var(--verm-escuro); }
.btn.white { background: var(--branco); color: var(--preto); }
.btn.white:hover { background: var(--cinza-claro); }
@media (max-width: 860px) { .topbar nav { display: none; } }

/* Cabeçalho do case */
.case-hero { padding: 150px 6vw 70px; position: relative; overflow: hidden; border-bottom: 1px solid var(--linha); }
.case-hero::after { content: ""; position: absolute; right: 0; bottom: 0; width: 40vw; height: 100%; background: var(--vermelho); clip-path: polygon(100% 40%, 100% 100%, 35% 100%); opacity: .9; pointer-events: none; }
.case-hero > * { position: relative; z-index: 1; }
.case-hero h1 { font-size: clamp(44px, 6vw, 96px); margin: 16px 0 22px; max-width: 16ch; }
.case-hero .lead { font-size: 21px; max-width: 56ch; color: #cfcfcf; }
.big { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 44px 0 10px; }
.big b { font-family: var(--font-head); font-size: clamp(64px, 9vw, 140px); line-height: .9; color: var(--vermelho); }
.big b i { font-style: normal; color: var(--branco); font-size: .5em; padding: 0 .2em; }
.big small { color: var(--cinza-medio); font-size: 17px; max-width: 26ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--linha); max-width: 1100px; }
.facts div { padding: 18px 20px 0 0; }
.facts dt { font-family: var(--font-code); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cinza-medio); }
.facts dd { margin: 6px 0 0; font-size: 17px; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; gap: 10px; } .case-hero::after { width: 70vw; height: 30%; } }

/* História em 4 atos (painel fixo + passos) */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; padding: 0 6vw; }
.story .stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.panel { width: 100%; aspect-ratio: 4/3; background: #121212; border: 1px solid var(--linha); position: relative; overflow: hidden; }
.panel .frame { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10%; opacity: 0; transform: scale(.97); transition: opacity .6s, transform .6s; }
.panel .frame.is-active { opacity: 1; transform: none; }
.panel .frame b { display: block; font-family: var(--font-head); font-size: clamp(56px, 7vw, 110px); line-height: 1; color: var(--vermelho); }
.panel .frame small { color: #9a9a9a; font-size: 16px; display: block; margin-top: 10px; }
.panel .poly { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.panel .poly polygon { fill: var(--vermelho); opacity: .08; transition: transform 1s ease, opacity 1s; transform-origin: center; transform-box: fill-box; }
.panel[data-step="1"] .poly polygon { opacity: .14; }
.panel[data-step="1"] .poly polygon:nth-child(odd) { transform: translate(-30px, 20px) rotate(-8deg); }
.panel[data-step="1"] .poly polygon:nth-child(even) { transform: translate(26px, -18px) rotate(6deg); }
.panel[data-step="3"] .poly polygon { opacity: .2; }
.panel .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--vermelho); width: 0; transition: width .6s; }
.story .steps { padding: 25vh 0 35vh; }
.story .step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: .2; transition: opacity .5s; }
.story .step.is-active { opacity: 1; }
.story .step h2 { font-size: clamp(30px, 3.4vw, 48px); margin: 12px 0 18px; }
.story .step p, .story .step li { max-width: 48ch; color: #c9c9c9; }
.story .step ul { padding-left: 1.1em; margin: 0; }
.story .step li { margin-bottom: .5em; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .story .stage { height: 40vh; top: 68px; z-index: 2; background: var(--preto); } .story .step { min-height: 70vh; } }

/* O que foi feito */
.light { background: var(--branco); color: var(--cinza-escuro); }
.work { padding: 16vh 6vw; }
.work h2 { font-size: clamp(36px, 4.4vw, 64px); color: var(--preto); margin: 12px 0 48px; max-width: 20ch; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #e6e6e6; border: 1px solid #e6e6e6; }
.card { background: var(--branco); padding: 36px 30px 44px; position: relative; overflow: hidden; transition: background .3s; }
.card:hover { background: var(--cinza-claro); }
.card .n { font-family: var(--font-code); color: var(--vermelho); font-size: 13px; }
.card h3 { font-size: 28px; color: var(--preto); margin: 16px 0 12px; }
.card p { font-size: 16px; color: #555; margin: 0; }
.card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 60px; height: 60px; background: var(--vermelho); clip-path: polygon(100% 0, 100% 100%, 0 100%); transform: translate(100%, 100%); transition: transform .4s ease; }
.card:hover::after { transform: none; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.stack span { font-family: var(--font-code); font-size: 13px; padding: 6px 12px; border: 1px solid #ddd; color: #444; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* Frase */
.quote { padding: 18vh 8vw; text-align: center; border-bottom: 1px solid var(--linha); }
.quote blockquote { font-family: var(--font-head); font-weight: 700; font-size: clamp(36px, 5vw, 80px); line-height: 1.04; margin: 0 auto; max-width: 18ch; }
.quote blockquote em { color: var(--vermelho); font-style: normal; }

/* Próximo case + CTA */
.next { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--linha); }
.next a { padding: 60px 6vw; text-decoration: none; transition: background .3s; }
.next a:hover { background: #222; }
.next a + a { border-left: 1px solid var(--linha); text-align: right; }
.next h3 { font-size: clamp(28px, 3vw, 44px); margin-top: 10px; }
@media (max-width: 860px) { .next { grid-template-columns: 1fr; } .next a + a { border-left: 0; border-top: 1px solid var(--linha); text-align: left; } }
.cta { padding: 14vh 6vw; display: grid; grid-template-columns: 1.3fr 1fr; gap: 6vw; align-items: end; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: 0; bottom: 0; width: 46vw; height: 100%; background: var(--vermelho); clip-path: polygon(100% 25%, 100% 100%, 20% 100%); opacity: .9; }
.cta::after { content: ""; position: absolute; right: 0; bottom: 0; width: 46vw; height: 100%; background: var(--verm-escuro); clip-path: polygon(100% 65%, 100% 100%, 62% 100%); }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(38px, 4.6vw, 70px); margin: 12px 0 0; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; padding-bottom: 30vh; } .cta::before, .cta::after { height: 26vh; top: auto; width: 70vw; } }
footer { padding: 36px 6vw; color: var(--cinza-medio); font-size: 14px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--linha); }
footer img { height: 20px; }

/* Lista de cases */
.list-hero { padding: 160px 6vw 60px; }
.list-hero h1 { font-size: clamp(48px, 7vw, 110px); margin: 14px 0 20px; }
.filters { display: flex; gap: 10px; padding: 0 6vw 40px; flex-wrap: wrap; }
.filters button { background: none; border: 1px solid #444; color: #ccc; padding: 9px 18px; font: 15px var(--font-body); cursor: pointer; border-radius: 2px; }
.filters button[aria-pressed="true"] { background: var(--branco); color: var(--preto); border-color: var(--branco); }
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--linha); border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.case-card { background: var(--preto); padding: 56px 6vw 60px; text-decoration: none; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; transition: background .3s; min-height: 420px; }
.case-card:hover { background: #202020; }
.case-card[hidden] { display: none; }
.case-card .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(56px, 6vw, 96px); line-height: .9; color: var(--vermelho); }
.case-card .num i { font-style: normal; color: var(--branco); font-size: .5em; padding: 0 .15em; }
.case-card h2 { font-size: clamp(30px, 3vw, 44px); }
.case-card p { color: #b5b5b5; max-width: 46ch; margin: 0; }
.case-card .tags { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.case-card .tags span { font-family: var(--font-code); font-size: 12px; color: #999; border: 1px solid #3a3a3a; padding: 4px 10px; }
.case-card .go { position: absolute; right: 6vw; top: 56px; color: #666; transition: color .2s, transform .2s; font-size: 22px; }
.case-card:hover .go { color: var(--vermelho); transform: translateX(4px); }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }

/* Marca de rascunho (remover antes de publicar) */
.draft { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #3a2a00; color: #ffd27a; font: 13px var(--font-code); padding: 10px 6vw; border-top: 1px solid #6b5000; }

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
.case-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
