/* =========================================================
   DESMANCHE Nº2 — Design System
   ========================================================= */

/* ---------- Fontes da marca ---------- */
@font-face { font-family: 'Menca'; src: url('../fonts/Menca-Light.otf') format('opentype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Menca'; src: url('../fonts/Menca-Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Menca'; src: url('../fonts/Menca-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Menca'; src: url('../fonts/Menca-Black.otf') format('opentype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Ink Grunge'; src: url('../fonts/InkGrunge-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Rougant'; src: url('../fonts/RougantBoldN2-PersonalUse.otf') format('opentype'); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Paleta principal */
  --vermelho-neon: #FF0000;
  --vermelho-desmanche: #D30101;
  --vermelho-sombra: #A40000;
  --vermelho-brilho: #FF2F2F;
  --preto-puro: #000000;
  --preto-fundo: #101010;
  --preto-grafite: #3E3E3E;
  --cinza-fundo: #CACACA;
  --cinza-sombra: #8E8E8E;
  --cinza-logo: #B5B5B5;
  --cinza-claro: #E8E8E8;
  --branco: #FFFFFF;
  /* Degradê das fotos (sangue) */
  --sangue-950: #120B0B; --sangue-900: #3F0C0C; --sangue-800: #740D0F;
  --sangue-700: #BA191A; --sangue-600: #D53737; --sangue-500: #DB5858;
  --sangue-400: #D98484; --sangue-300: #DAB6B6; --sangue-100: #F3F3F3;
  /* Tipografia */
  --font-info: 'Menca', 'Arial Black', sans-serif;
  --font-fala: 'Ink Grunge', 'Arial Black', sans-serif;
  --font-assinatura: 'Rougant', cursive;
  /* Interface */
  --side: 256px;
  --line: rgba(255, 255, 255, .12);
  --muted: #9a9a9a;
  --panel: #171717;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-width: 1100px;
  background: var(--preto-fundo) url('../img/grao-preto.jpg') repeat;
  background-size: 360px;
  color: var(--branco);
  font: 500 16px/1.55 var(--font-info);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
b, strong { font-weight: 700; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: rgba(255,255,255,.08); padding: .1em .35em; border-radius: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--vermelho-neon); outline-offset: 3px; }
::selection { background: var(--vermelho-neon); color: #fff; }

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Fundos dos temas (com grão real do kit) ---------- */
.bg-vermelho { background: var(--vermelho-desmanche) url('../img/grao-vermelho.jpg') repeat; background-size: 360px; }
.bg-preto    { background: var(--preto-fundo) url('../img/grao-preto.jpg') repeat; background-size: 360px; }
.bg-cinza    { background: var(--cinza-fundo) url('../img/grao-cinza.jpg') repeat; background-size: 360px; }
.bg-xadrez   { background: #fff conic-gradient(#e4e4e4 25%, #fff 0 50%, #e4e4e4 0 75%, #fff 0) 0 0 / 20px 20px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .8em 1.3em; border: 1.5px solid currentColor; border-radius: 999px; background: transparent;
  font: 900 13px/1 var(--font-info); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { padding: .62em 1em; font-size: 11px; }
.btn-red { background: var(--vermelho-neon); border-color: var(--vermelho-neon); color: #fff; }
.btn-red:hover { background: var(--vermelho-brilho); border-color: var(--vermelho-brilho); }
.btn-black { background: #000; border-color: #000; color: #fff; }
.btn-black:hover { background: var(--preto-grafite); border-color: var(--preto-grafite); }
.btn-white { background: #fff; border-color: #fff; color: #000; }
.btn:not(.btn-red):not(.btn-black):not(.btn-white):not(.btn-ghost) { background: #fff; color: #000; border-color: #fff; }
.btn:not(.btn-red):not(.btn-black):not(.btn-white):not(.btn-ghost):hover { background: var(--vermelho-neon); border-color: var(--vermelho-neon); color: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: #fff; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.link:hover { color: var(--vermelho-neon); }

/* ---------- Sidebar ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 10;
  display: flex; flex-direction: column; padding: 28px 22px 22px;
  background: rgba(10, 10, 10, .92); border-right: 1px solid var(--line);
}
.side-logo img { width: 92px; }
.side-tag { margin: 14px 0 26px; font: 900 11px/1 var(--font-info); letter-spacing: .14em; text-transform: uppercase; color: var(--vermelho-neon); }
.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.side-nav a {
  display: flex; gap: 12px; padding: 8px 10px; border-radius: 6px; text-decoration: none;
  font: 700 13px/1.2 var(--font-info); letter-spacing: .03em; text-transform: uppercase; color: #bdbdbd;
  transition: background .15s, color .15s;
}
.side-nav a span { width: 20px; color: #5c5c5c; font-weight: 900; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.side-nav a.is-active { color: #fff; background: rgba(255, 0, 0, .14); }
.side-nav a.is-active span { color: var(--vermelho-neon); }
.side-dl { margin-top: 18px; width: 100%; }

/* ---------- Layout ---------- */
.main { margin-left: var(--side); }
.sec { padding: 112px 72px 40px; max-width: 1400px; }

.sec-head { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: start; margin-bottom: 44px; }
.sec-num { font: 900 64px/0.9 var(--font-info); color: var(--vermelho-neon); filter: blur(.6px); }
.sec-head h2 { margin: 0; font: 900 72px/.9 var(--font-info); letter-spacing: -.01em; text-transform: uppercase; }
.sec-frase { margin: 14px 0 0; font: 400 34px/1 var(--font-fala); color: var(--vermelho-neon); text-transform: lowercase; filter: blur(1.1px); }
.sec-desc { margin: 18px 0 0; max-width: 680px; color: #c4c4c4; font-size: 17px; }
.sub { margin: 56px 0 18px; font: 900 15px/1 var(--font-info); letter-spacing: .12em; text-transform: uppercase; color: #d0d0d0; display: flex; align-items: center; gap: 14px; }
.sub::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 100vh; padding: 40px 72px 56px; display: flex; flex-direction: column; }
.hero-luzes { position: absolute; top: -40px; left: -60px; width: 760px; opacity: .95; pointer-events: none; }
.hero-liquid { position: absolute; right: -260px; bottom: -330px; width: 860px; opacity: .85; pointer-events: none; }
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: center; max-width: 900px; margin: 0 auto; width: 100%; font: 900 18px/1 var(--font-info); letter-spacing: .04em; }
.hero-elipse { position: relative; display: grid; place-items: center; width: 190px; height: 78px; }
.hero-elipse img { position: absolute; inset: 0; width: 100%; height: 100%; filter: invert(1); }
.hero-elipse b { position: relative; font-weight: 900; font-size: 22px; }
.hero-body { position: relative; flex: 1; display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 72px; align-items: center; max-width: 1200px; margin: 0 auto; width: 100%; padding-top: 40px; }
.hero-logo { width: 100%; filter: drop-shadow(0 0 40px rgba(0,0,0,.15)); }
.hero-jingle { width: 360px; margin-bottom: 26px; }
.hero h1 { margin: 0; font: 900 104px/.86 var(--font-info); letter-spacing: -.02em; }
.hero-frase { margin: 22px 0 0; font: 400 48px/1 var(--font-fala); color: #000; filter: blur(1.4px); }
.hero-desc { max-width: 560px; margin: 26px 0 0; font-size: 17px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; }
.hero-stars { position: relative; display: flex; justify-content: center; margin: 32px 0 0; }
.hero-stars img { width: 200px; }

/* ---------- 00 Passos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.steps li { position: relative; display: flex; flex-direction: column; padding: 26px 22px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.step-n { font: 900 54px/1 var(--font-info); color: var(--vermelho-neon); filter: blur(.8px); }
.steps h3 { margin: 12px 0 10px; font: 900 18px/1 var(--font-info); letter-spacing: .06em; }
.steps p { margin: 0; color: #c9c9c9; font-size: 14.5px; flex: 1; }
.step-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.callout { margin-top: 18px; padding: 18px 22px; border-left: 3px solid var(--vermelho-neon); background: rgba(255,0,0,.07); border-radius: 0 10px 10px 0; color: #d6d6d6; font-size: 15px; }

/* ---------- 01 Cores ---------- */
.pal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.pal-head h3 { margin: 0; font: 900 15px/1 var(--font-info); letter-spacing: .12em; }
.pal-head + * { margin-bottom: 56px; }
.swatches-main { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.swatch { display: flex; flex-direction: column; padding: 0; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .15s, border-color .15s; }
.swatch:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.4); }
.swatch-chip { display: block; aspect-ratio: 4 / 3; background: var(--c); border-bottom: 1px solid var(--line); }
.swatch-info { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.swatch-info strong { font: 900 18px/1 var(--font-info); letter-spacing: .02em; }
.swatch-info span { font-size: 13px; color: #d5d5d5; }
.swatch-info em { font-style: normal; font-size: 12px; line-height: 1.35; color: var(--muted); }
.ramp { display: grid; grid-template-columns: repeat(9, 1fr); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ramp-step { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 190px; padding: 14px 12px; border: 0; background: var(--c); text-align: left; transition: flex .2s, filter .15s; }
.ramp-step:hover { filter: brightness(1.08); }
.ramp-step strong { font: 900 14px/1 var(--font-info); }
.ramp-step span { font-size: 11px; opacity: .85; }
.ramp-step:nth-child(n+6) { color: #000; }
.kit-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kit-imgs .asset-stage { aspect-ratio: 5 / 2; --pad: 0px; background: #fff; }

/* ---------- Temas ---------- */
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tema { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tema-mock { position: relative; aspect-ratio: 9 / 13; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 26px 22px; }
.tema-el { position: absolute; pointer-events: none; }
.el-liquid { width: 140%; left: -30%; top: 22%; opacity: .85; }
.el-estrela { width: 78%; right: -30%; top: -12%; }
.el-arvore { width: 70%; right: -14%; bottom: -30%; }
.mock-top { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; font: 900 11px/1 var(--font-info); letter-spacing: .04em; }
.mock-elipse { border: 1.5px solid; border-radius: 50%; padding: 9px 16px; font-size: 13px; }
.mock-logo { position: relative; width: 38%; margin: 12% 0 0; }
.mock-frase { position: relative; margin: 7% 0 0; font: 400 34px/1 var(--font-fala); filter: blur(1.2px); text-align: center; }
.mock-info { position: relative; margin: auto 0 0; font: 900 13px/1 var(--font-info); letter-spacing: .03em; }
.tema-info { padding: 22px; }
.tema-info h3 { margin: 0 0 14px; font: 900 18px/1 var(--font-info); letter-spacing: .06em; }
.tema-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tok { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; text-align: left; }
.tok:hover { border-color: rgba(255,255,255,.4); }
.tok i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid rgba(255,255,255,.3); flex: none; }
.tok b { margin-left: auto; font: 900 13px/1 var(--font-info); }
.tok-none { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.tema-logo { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 02 Fontes ---------- */
.tester { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 6px 6px 6px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.tester span { font: 900 12px/1 var(--font-info); letter-spacing: .1em; text-transform: uppercase; color: var(--vermelho-neon); white-space: nowrap; }
.tester input { flex: 1; padding: 14px 18px; border: 0; border-radius: 999px; background: #0c0c0c; color: #fff; font: 500 16px var(--font-info); }
.tester input:focus { outline: 1px solid var(--vermelho-neon); }
.fonts { display: grid; gap: 14px; }
.font { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.font-meta h3 { margin: 0 0 6px; font: 900 20px/1.1 var(--font-info); }
.font-meta > p { margin: 0 0 14px; color: #c4c4c4; font-size: 14px; }
.font-meta dl { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.font-meta dt { color: var(--muted); }
.font-meta dd { margin: 0; word-break: break-word; }
.warn { margin: 14px 0 0 !important; padding: 10px 12px; border-radius: 8px; background: rgba(255,0,0,.12); color: #ffb3b3 !important; font-size: 12.5px !important; }
.font-sample { margin: 0; line-height: 1.05; overflow-wrap: anywhere; }
.font-sample.is-blur { filter: blur(1.6px); }
.scale { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.scale th { text-align: left; padding: 14px 18px; font: 900 11px/1 var(--font-info); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.scale td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.scale tr:last-child td { border-bottom: 0; }
.scale td:nth-child(4) { font-weight: 900; color: var(--vermelho-neon); }
.ex.ink { font: 400 30px/1 var(--font-fala); filter: blur(1px); }
.ex.rou { font: 700 30px/1 var(--font-assinatura); }
.ex.mb { font: 900 16px/1 var(--font-info); }

/* ---------- Grids de assets ---------- */
.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.asset { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.asset-stage { --pad: 26px; position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.asset-stage img { position: absolute; top: var(--pad); left: var(--pad); width: calc(100% - var(--pad) * 2); height: calc(100% - var(--pad) * 2); object-fit: contain; cursor: grab; transition: transform .2s; }
.asset-stage img:active { cursor: grabbing; }
.asset:hover .asset-stage img { transform: scale(1.03); }
.asset.tall .asset-stage { aspect-ratio: 3 / 4; --pad: 34px; }
.asset.wide .asset-stage { aspect-ratio: 16 / 9; --pad: 28px; }
.asset.type .asset-stage { aspect-ratio: 4 / 3; --pad: 28px; }
.asset.story .asset-stage { aspect-ratio: 9 / 16; --pad: 0px; }
.asset.story .asset-stage img { object-fit: cover; }
.asset.story:hover .asset-stage img { transform: none; }
.asset figcaption { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.asset-meta { display: flex; flex-direction: column; gap: 2px; }
.asset-meta strong { font: 900 14px/1.2 var(--font-info); word-break: break-all; }
.asset-meta span { font-size: 12px; color: var(--muted); }
.asset-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.asset-actions { display: inline-flex; gap: 6px; }
.asset-bgs { display: inline-flex; gap: 6px; }
.dot { width: 18px; height: 18px; border-radius: 50%; padding: 0; border: 1px solid rgba(255,255,255,.35); }
.dot.is-on { outline: 2px solid #fff; outline-offset: 2px; }
.dot-vermelho { background: var(--vermelho-desmanche); }
.dot-preto { background: #000; }
.dot-cinza { background: var(--cinza-fundo); }
.dot-xadrez { background: conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0) 0 0 / 8px 8px; }
.bg-all { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.bg-all span { margin-right: 6px; }

/* ---------- 07 Degradês ---------- */
.degrades { display: grid; gap: 18px; }
.degrade { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.degrade-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.degrade-head h3 { margin: 0; font: 900 20px/1 var(--font-info); letter-spacing: .04em; }
.degrade-img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; cursor: grab; }
.stops { display: flex; gap: 6px; margin-top: 10px; }
.stop { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; font: 900 12px/1 var(--font-info); }
.stop::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 1px solid rgba(255,255,255,.3); flex: none; }
.stop:hover { border-color: rgba(255,255,255,.45); }
.mapa { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.mapa > img { border-radius: 10px; cursor: grab; }
.mapa-t { margin: 0 0 8px; font: 900 14px/1.2 var(--font-info); text-transform: uppercase; letter-spacing: .04em; }
.mapa-d { margin: 0 0 12px; font-size: 14px; color: #c4c4c4; max-width: 560px; }
.duo { display: flex; gap: 8px; margin: 0 0 12px; max-width: 460px; }

/* ---------- Regras ---------- */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rule { padding: 30px 32px; border-radius: 16px; }
.rule h3 { margin: 0 0 18px; font: 900 28px/1 var(--font-info); }
.rule ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 16px; }
.rule li { display: flex; gap: 12px; }
.rule.do { background: var(--branco); color: #000; }
.rule.do li::before { content: '★'; color: var(--vermelho-desmanche); }
.rule.dont { background: var(--vermelho-desmanche) url('../img/grao-vermelho.jpg'); background-size: 360px; }
.rule.dont li::before { content: '✕'; font-weight: 900; }

/* ---------- Rodapé ---------- */
.foot { margin-top: 96px; padding: 64px 72px 72px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.foot img { width: 380px; }
.foot-dl { display: flex; gap: 10px; }
.foot p { margin: 0; font: 900 12px/1 var(--font-info); letter-spacing: .14em; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 14px 22px; border-radius: 999px; background: #fff; color: #000; font: 900 13px/1 var(--font-info); letter-spacing: .04em;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-err { background: var(--vermelho-neon); color: #fff; }

/* ---------- 404 ---------- */
.page-404 main { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 28px; }
.page-404 .sec-frase { font-size: 72px; }

@media (max-width: 1300px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .swatches-main { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
