/*
Theme Name: Área 42
Theme URI: https://area42.com.br
Author: Thayná Felizardo
Description: Tema próprio do blog de divulgação científica Área 42. Editorial e neobrutalista, com grade de linhas finas, tipografia expandida, anotações manuscritas, modo escuro e compatível com Elementor.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: area42
*/

:root {
	--cosmic: #142D49;
	--dew: #C75B9B; /* magenta Área 42 (design system) */
	--accent: #A23F7B; /* magenta-deep: texto pequeno sobre claro */
	--dew-light: #F1DDF0;
	--paper: #EAD4B5;
	--ink: #242323;
	--lab: #557D55;
	--white: #F7F4EF;

	--bg: var(--white);
	--surface: #FFFFFF;
	--text: var(--ink);
	--muted: #57534E;
	--border: var(--ink);
	--shadow: var(--ink);
	--solid-bg: var(--ink);      /* botões pretos */
	--solid-text: #FFFFFF;
	--link: #A23F7B;
	--section-alt: var(--paper);

	--font-display: 'Anton', 'Archivo Black', Impact, 'Arial Narrow', sans-serif; /* headline do design system */
	--font-body: 'DM Sans', Manrope, 'Segoe UI', system-ui, sans-serif;
	--font-hand: 'Caveat', 'Patrick Hand', cursive;
	--font-logo: 'Bungee', 'Archivo Black', Impact, sans-serif; /* só no logotipo e carimbos */
	--font-mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;

	--line: 1.5px;
	--radius: 22px;
	--maxw: 1200px;
}

[data-theme="dark"] {
	--bg: #0D1B2C;
	--surface: #142D49;
	--text: #F7F4EF;
	--muted: #C3BDB2;
	--border: #EAD4B5;
	--shadow: #000000;
	--solid-bg: #EAD4B5;
	--solid-text: #242323;
	--link: #E08BBE;
	--accent: #E08BBE; /* magenta-glow: texto sobre cosmos */
	--section-alt: #11253D;
}

/* ---------- 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-body); font-size: 17px; line-height: 1.65; overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--dew); outline-offset: 3px; border-radius: 6px; }
[data-theme="dark"] :focus-visible { outline-color: var(--paper); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.04; letter-spacing: .005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 7.4vw, 6.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.45rem; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 700; }
p { margin: 0 0 1.1em; }
.muted { color: var(--muted); }
.hand { font-family: var(--font-hand); font-size: 1.7rem; line-height: 1.1; color: var(--accent); margin: 0 0 .4em; }
[data-theme="dark"] .hand { color: var(--paper); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--dew); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.hp { position: absolute; left: -9999px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 840px; padding-top: 40px; padding-bottom: 64px; }
.upper { text-transform: uppercase; }

/* Etiqueta tipo "AUDIO-FIRST" da referência */
.tag {
	display: inline-flex; align-items: stretch; border: var(--line) solid var(--border); font: 600 .78rem var(--font-mono);
	text-transform: uppercase; letter-spacing: .04em; color: var(--text); background: var(--surface); margin-bottom: 22px;
}
.tag__icon { display: grid; place-items: center; width: 30px; background: var(--solid-bg); color: var(--solid-text); }
.tag__icon svg { width: 16px; height: 16px; }
.tag__text { padding: 5px 10px; }
.eyebrow { font-family: var(--font-hand); font-size: 1.6rem; color: var(--accent); display: block; line-height: 1.1; margin-bottom: 6px; }
[data-theme="dark"] .eyebrow { color: var(--paper); }

/* ---------- Botões (pílulas) ---------- */
.btn, .comment-form input[type=submit] {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
	font: 600 1rem var(--font-body); padding: 13px 26px; border-radius: 999px;
	background: var(--solid-bg); color: var(--solid-text); border: var(--line) solid var(--border);
	transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--text); }
.btn--accent { background: var(--dew); color: #fff; border: 2px solid var(--ink); box-shadow: 5px 6px 0 var(--ink); padding: 15px 34px; font-size: 1.2rem; font-weight: 700; }
.btn--accent:hover { transform: translate(-2px, -2px); box-shadow: 7px 8px 0 var(--ink); }
.btn--accent:active { transform: translate(3px, 3px); box-shadow: 1px 2px 0 var(--ink); }
[data-theme="dark"] .btn--accent { border-color: var(--paper); box-shadow: 5px 6px 0 #000; }
.btn--small { padding: 8px 16px; font-size: .9rem; }
.chips { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-block; background: var(--surface); color: var(--text); font: 600 .85rem var(--font-body);
	text-decoration: none; padding: 5px 14px; border: var(--line) solid var(--border); border-radius: 999px; cursor: pointer;
}
.chip:hover { background: var(--solid-bg); color: var(--solid-text); }
.chip--small { font-size: .74rem; padding: 3px 10px; }
.sticker { display: inline-block; background: var(--lab); color: #fff; font: 700 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; padding: 5px 12px; border: var(--line) solid var(--border); border-radius: 999px; margin-bottom: 1rem; }

/* ---------- Cabeçalho ---------- */
.site-header { background: var(--surface); border-bottom: var(--line) solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
/* Logo: lockup do design system (monograma + ÁREA magenta / 42 cosmos, em Bungee) */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand img { max-height: 46px; width: auto; }
.brand__mark { width: 42px; height: 42px; flex: 0 0 auto; transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.brand:hover .brand__mark { transform: rotate(-24deg); }
[data-theme="dark"] .brand__mark, .site-footer .brand__mark { border-radius: 50%; box-shadow: 0 0 0 3px #F7F4EF; } /* contorno de adesivo sobre fundo escuro */
.brand__word { font: 400 1.5rem/1 var(--font-logo); letter-spacing: -.01em; color: var(--dew); }
.brand__word b { font-weight: 400; color: var(--cosmic); }
[data-theme="dark"] .brand__word b, .site-footer .brand__word b { color: var(--paper); }
.brand--stacked { flex-direction: column; align-items: flex-start; gap: 4px; }
.brand--stacked .brand__word { font-size: 3rem; line-height: .92; display: flex; flex-direction: column; }
.brand__tagline { font: 600 1.6rem var(--font-hand); color: var(--accent); transform: rotate(-2deg); transform-origin: left; }
.nav { margin: 0 auto; }
.nav__list, .nav .sub-menu, .footer-list, .side-list { list-style: none; margin: 0; padding: 0; }
.nav__list { display: flex; gap: 2px; }
.nav__list a { display: block; padding: 8px 12px; color: var(--text); font-weight: 500; font-size: .98rem; text-decoration: none; border-radius: 999px; }
.nav__list a:hover, .nav__list .current-menu-item > a { background: var(--dew-light); color: var(--ink); }
.nav__list li { position: relative; }
.nav .menu-item-has-children > a::after { content: ' ▾'; font-size: .8em; }
.nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 250px; background: var(--surface); border: var(--line) solid var(--border); border-radius: 16px; box-shadow: 5px 6px 0 var(--shadow); padding: 8px; z-index: 60; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: block; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: var(--line) solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; }
.nav-toggle { display: none; }
.search-bar { display: none; border-top: var(--line) solid var(--border); padding: 12px 0; }
.search-open .search-bar { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--line) solid var(--border); }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; min-height: 600px; padding-top: 60px; padding-bottom: 72px; }
.hero__text { position: relative; z-index: 2; }
.hero h1 { margin-bottom: .35em; }
.hero h1 { line-height: 1.12; } /* folga para os acentos altos da Anton (Á, É) */
.hero h1 > span { display: block; }
.hero h1 .hl { color: var(--dew); }
[data-theme="dark"] .hero h1 .hl { color: var(--paper); }
.hero__lead { font-size: 1.15rem; max-width: 46ch; }
.hero__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.hero__note { font-family: var(--font-hand); font-size: 1.6rem; color: var(--accent); transform: rotate(-3deg); display: inline-block; }
[data-theme="dark"] .hero__note { color: var(--paper); }

/* Prancheta do caderno com polaroides */
.board { position: relative; height: 500px; }
.board__paper {
	position: absolute; inset: 18px 0 10px 6%; border: var(--line) solid var(--ink); border-radius: 6px; transform: rotate(2deg);
	background-color: #FBF6EC;
	background-image: linear-gradient(rgba(20,45,73,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(20,45,73,.10) 1px, transparent 1px),
		linear-gradient(rgba(20,45,73,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(20,45,73,.18) 1px, transparent 1px);
	background-size: 12px 12px, 12px 12px, 60px 60px, 60px 60px;
	box-shadow: 8px 10px 0 var(--ink);
}
[data-theme="dark"] .board__paper { border-color: #000; box-shadow: 8px 10px 0 #000; }
.polaroid {
	--r: 0deg; position: absolute; display: block; width: 54%; padding: 10px 10px 0; background: #fff; color: var(--ink); text-decoration: none;
	border: var(--line) solid var(--ink); box-shadow: 4px 6px 0 rgba(36,35,35,.9); transform: rotate(var(--r));
	transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s; z-index: 1;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 7 / 4; object-fit: cover; border: 1px solid rgba(36,35,35,.25); }
.polaroid__caption { display: block; font: 700 1.25rem/1.15 var(--font-hand); padding: 8px 2px 12px; }
.polaroid__blank { display: grid; place-items: center; aspect-ratio: 7 / 4; background: var(--dew-light); }
.polaroid__blank img, .card__placeholder img { width: 34%; height: auto; aspect-ratio: 1; opacity: .8; }
.polaroid--1 { --r: -7deg; left: 2%; top: 4%; }
.polaroid--2 { --r: 5deg; right: -2%; top: 13%; z-index: 2; }
.polaroid--3 { --r: -2deg; left: 16%; bottom: 0; z-index: 3; }
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0deg) translateY(-10px) scale(1.04); box-shadow: 8px 12px 0 var(--ink); z-index: 6; }
.tape { position: absolute; top: -13px; left: 50%; width: 90px; height: 26px; transform: translateX(-50%) rotate(-4deg); background: rgba(234,212,181,.85); border: 1px dashed rgba(36,35,35,.25); }
.polaroid--2 .tape { background: rgba(199,91,155,.85); transform: translateX(-50%) rotate(5deg); }
.polaroid--3 .tape { background: rgba(85,125,85,.5); }
.board__note { position: absolute; right: 4%; top: 0; font: 700 1.5rem var(--font-hand); color: var(--accent); transform: rotate(4deg); z-index: 4; }
[data-theme="dark"] .board__note { color: var(--paper); }
.board__arrow { position: absolute; right: 9%; top: 26px; width: 90px; height: 60px; z-index: 4; overflow: visible; }
.board__arrow path { fill: none; stroke: var(--dew); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 0; }
[data-theme="dark"] .board__arrow path { stroke: var(--paper); }
/* Selo do monograma, com contorno de adesivo (shadow-adesivo) */
.stamp { position: absolute; right: 2%; bottom: 4%; z-index: 5; width: 112px; height: 112px; border-radius: 50%; transform: rotate(-12deg); box-shadow: 0 0 0 6px #F7F4EF, 0 6px 14px rgba(12,28,47,.35); transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.stamp img { display: block; width: 100%; height: 100%; }
.board:hover .stamp { transform: rotate(8deg) scale(1.06); }

/* Letreiro de categorias */
.ticker { overflow: hidden; background: var(--dew); color: #fff; border-bottom: var(--line) solid var(--border); padding: 14px 0; }
.ticker__track { display: flex; width: max-content; gap: 28px; align-items: center; animation: ticker 48s linear infinite; font: 400 1.2rem var(--font-display); text-transform: uppercase; white-space: nowrap; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__dot { color: var(--paper); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Movimento ---------- */
/* Entrada do topo (só com JS ativo, para nunca esconder conteúdo) */
.js .rise { animation: rise .8s cubic-bezier(.2,.75,.2,1) backwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.js .polaroid { animation: drop .9s cubic-bezier(.3,1.35,.5,1) backwards; }
.js .polaroid--1 { animation-delay: .35s; }
.js .polaroid--2 { animation-delay: .5s; }
.js .polaroid--3 { animation-delay: .65s; }
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--r) - 14deg)) scale(.9); } }
.js .board__paper { animation: paper .7s cubic-bezier(.2,.75,.2,1) .15s backwards; }
@keyframes paper { from { opacity: 0; transform: rotate(-4deg) scale(.96); } }
.js .board__arrow path { animation: draw 1s ease-out 1.1s backwards; }
@keyframes draw { from { stroke-dashoffset: 160; } }
.js .stamp { animation: stamp .6s cubic-bezier(.3,1.6,.5,1) 1.3s backwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-40deg) scale(1.6); } }
.js .board__note { animation: rise .6s ease-out 1s backwards; }

/* Revelar ao rolar */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .75s cubic-bezier(.2,.75,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal="side"] { transform: translateX(48px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Seções ---------- */
.section { padding: 76px 0; }
.section + .section { padding-top: 0; }
.section--paper { background: var(--section-alt); border-top: var(--line) solid var(--border); border-bottom: var(--line) solid var(--border); padding: 76px 0 !important; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section__title { text-transform: uppercase; margin: 0; }
.section__title--center { text-align: center; margin: 0 auto 36px; max-width: 16ch; }
.more { font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* ---------- Grade de categorias (estilo "Total Transformation") ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--line) solid var(--border); border-left: var(--line) solid var(--border); }
.feature { position: relative; padding: 30px 28px 32px; border-right: var(--line) solid var(--border); border-bottom: var(--line) solid var(--border); color: var(--text); text-decoration: none; background: var(--surface); transition: background .15s; }
.feature:hover { background: var(--dew-light); color: var(--ink); }
.feature__icon { width: 50px; height: 50px; border-radius: 50%; border: var(--line) solid var(--ink); display: grid; place-items: center; margin-bottom: 22px; }
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.22rem; margin-bottom: .45em; }
.feature p { margin: 0; font-size: .95rem; color: inherit; opacity: .85; }
.bg-cosmic { background: var(--cosmic); color: #fff; }
.bg-dew { background: var(--dew); color: #fff; }
.bg-lab { background: var(--lab); color: #fff; }
.bg-paper { background: var(--paper); color: var(--ink); }
.bg-pink { background: var(--dew-light); color: var(--ink); }
.bg-white { background: #fff; color: var(--ink); }

/* ---------- Cards de post ---------- */
.grid { display: grid; gap: 30px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
	position: relative; display: flex; flex-direction: column; background: var(--surface); color: var(--text);
	border: var(--line) solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 7px 0 var(--shadow); }
[data-theme="dark"] .card:hover { box-shadow: 6px 7px 0 var(--dew); }
.card__media { display: block; aspect-ratio: 7 / 4; overflow: hidden; border-bottom: var(--line) solid var(--border); background: var(--cosmic); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card__media img { transform: scale(1.03); }
.card__placeholder { display: grid; place-items: center; height: 100%; background: var(--paper); }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card__title { margin: .55rem 0 .45rem; font-size: 1.28rem; line-height: 1.12; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; } /* card inteiro clicável */
.card__body .chip { position: relative; z-index: 1; align-self: flex-start; }
.card__excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.card--caderno .card__body { background-image: repeating-linear-gradient(transparent, transparent 27px, color-mix(in srgb, var(--cosmic) 16%, transparent) 28px); }
.card--wide { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
.card--wide .card__media { align-self: stretch; aspect-ratio: auto; border-bottom: 0; border-right: var(--line) solid var(--border); }
.card--wide .card__media img { aspect-ratio: 7 / 4; height: auto; } /* capas têm texto: sem cortes */
.card--wide .card__body { flex: 1; padding: 34px; justify-content: center; }
.card--wide .card__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.card--wide .card__excerpt { flex: 0; font-size: 1.05rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .9rem; color: var(--muted); margin: 0; }
.meta--small { font-size: .82rem; gap: 6px; }
.meta__avatar { border-radius: 50%; border: var(--line) solid var(--border); vertical-align: middle; margin-right: 4px; }

.feature__go { position: absolute; right: 24px; top: 30px; font-size: 1.4rem; opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .25s; }
.feature:hover .feature__go { opacity: 1; transform: none; }
.section--first { padding-top: 76px !important; }

/* ---------- Números ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--line) solid var(--border); border-left: var(--line) solid var(--border); }
.stat { padding: 30px 26px; border-right: var(--line) solid var(--border); border-bottom: var(--line) solid var(--border); background: var(--surface); }
.stat__num { display: block; font: 400 clamp(2.6rem, 5vw, 3.8rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .stat__num { color: var(--paper); }
.stat__label { display: block; margin-top: 10px; font-weight: 500; }
.hand-inline { font-family: var(--font-hand); font-size: 1.3em; color: var(--accent); }

/* ---------- Fato ou fake (cartões que viram) ---------- */
.flips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.flip { perspective: 1200px; min-height: 290px; }
.flip__inner { position: relative; display: grid; height: 100%; transition: transform .7s cubic-bezier(.3,1.25,.45,1); transform-style: preserve-3d; }
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; padding: 24px; border: var(--line) solid var(--ink); border-radius: var(--radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 5px 6px 0 var(--ink); }
[data-theme="dark"] .flip__face { border-color: #000; box-shadow: 5px 6px 0 #000; }
.flip__front { background: var(--surface); color: var(--text); }
.flip__front .btn { margin-top: auto; align-self: flex-start; }
.flip__n { font: 400 .95rem var(--font-display); color: var(--accent); }
.flip__claim { font-size: 1.12rem; font-weight: 600; line-height: 1.4; margin: 0; }
.flip__back { transform: rotateY(180deg); color: var(--ink); visibility: hidden; transition: visibility 0s .35s; }
.flip.is-flipped .flip__back { visibility: visible; transition-delay: 0s; }
.flip.is-flipped .flip__front { visibility: hidden; transition: visibility 0s .35s; }
.flip__back.is-fake { background: var(--dew-light); }
.flip__back.is-fato { background: #D6E6D2; }
.flip__back p { margin: 0; font-size: .98rem; }
.verdict { align-self: flex-start; font: 400 1.35rem var(--font-logo); text-transform: uppercase; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; transform: rotate(-4deg); }
.is-fake .verdict { color: var(--accent); }
.is-fato .verdict { color: var(--lab); }
.flip__actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.flip__actions .more { color: var(--ink); }
.flip__again { width: 38px; height: 38px; border-radius: 50%; border: var(--line) solid var(--ink); background: #fff; color: var(--ink); font-size: 1.1rem; cursor: pointer; }

/* ---------- Barra de leitura ---------- */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 80; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--dew); transform-origin: 0 50%; transform: scaleX(0); }
.site-header { transition: box-shadow .25s; }
.site-header.is-scrolled { box-shadow: 0 6px 0 rgba(36,35,35,.08); }

/* ---------- Seção dividida com cartões empilhados ---------- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.split__intro { position: sticky; top: 110px; }
.split__intro h2 { text-transform: uppercase; }
.split__intro p { font-size: 1.12rem; max-width: 34ch; }
.stack { background: var(--ink); border-radius: calc(var(--radius) + 2px); display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border: var(--line) solid var(--ink); }
.stack__card { display: block; padding: 36px 40px 40px; border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; border: var(--line) solid var(--ink); margin-top: -1px; transition: transform .15s; }
.stack__card + .stack__card { margin-top: 10px; }
.stack__card:hover { transform: translateX(6px); }
.stack__card svg { width: 34px; height: 34px; margin-bottom: 18px; }
.stack__card h3 { font-size: 1.6rem; margin-bottom: .35em; }
.stack__card p { margin: 0; max-width: 46ch; }

/* ---------- Layout com barra lateral ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 44px; padding-bottom: 72px; }
.page-head { margin-bottom: 30px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.page-head__desc { color: var(--muted); max-width: 60ch; font-size: 1.08rem; }
.sidebar { display: flex; flex-direction: column; gap: 22px; align-self: start; position: sticky; top: 100px; }
.widget { background: var(--surface); border: var(--line) solid var(--border); border-radius: var(--radius); padding: 22px 22px; }
.widget--note { background: var(--dew-light); color: var(--ink); }
.widget--note a { color: var(--ink); }
.widget__title { font-size: 1.05rem; text-transform: uppercase; margin-bottom: .8em; }
.side-list li { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--text); text-decoration: none; font-weight: 500; }
.side-list a:hover { color: var(--link); text-decoration: underline; }
.side-list--num { counter-reset: n; }
.side-list--num li { counter-increment: n; display: flex; gap: 10px; }
.side-list--num li::before { content: counter(n, decimal-leading-zero); font: 400 1rem var(--font-display); color: var(--accent); }
.searchform { display: flex; gap: 8px; }
.searchform input[type=search] { flex: 1; min-width: 0; }

/* ---------- Artigo ---------- */
.entry__head { margin-bottom: 1.6rem; }
.entry__head h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); text-transform: none; line-height: 1.05; }
.entry__cover { margin: 0 0 2rem; border: var(--line) solid var(--border); border-radius: var(--radius); overflow: hidden; }
.entry__cover img { display: block; width: 100%; }
.entry__content { max-width: 70ch; font-size: 1.1rem; line-height: 1.78; }
.entry__content > * + h2 { margin-top: 2em; }
.entry__content h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); line-height: 1.12; }
.entry__content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.entry__content a { font-weight: 600; word-break: break-word; }
.entry__content img { border-radius: 12px; }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content li { margin-bottom: .5em; }
.entry__content code { background: color-mix(in srgb, var(--text) 10%, transparent); padding: 2px 6px; border-radius: 4px; }
.entry__content blockquote { margin: 1.6em 0; padding: 18px 24px; background: var(--dew-light); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 18px; font-family: var(--font-hand); font-size: 1.7rem; line-height: 1.25; }
.entry__content .lead { font-size: 1.3rem; line-height: 1.5; color: var(--muted); }
.entry__content .callout { background: var(--paper); color: var(--ink); border: var(--line) solid var(--ink); border-radius: 18px; padding: 18px 22px; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: var(--line) solid var(--border); border-radius: 16px; }
.entry__content table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.5; }
.entry__content th, .entry__content td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
.entry__content thead th { background: var(--cosmic); color: #fff; font-weight: 700; border-bottom: 0; }
.entry__content tbody tr:last-child td, .entry__content tbody tr:last-child th { border-bottom: 0; }
.entry__content tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper) 30%, transparent); }
.referencias { font-size: .9rem; line-height: 1.6; color: var(--muted); border-top: var(--line) solid var(--border); padding-top: 1rem; }
.referencias h3 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.referencias a { font-weight: 500; }
/* Placar (Star Wars) */
.placar { margin: 2em 0; }
.placar__title { font: 700 1.05rem var(--font-body); margin-bottom: .6em; }
.placar td { text-align: center !important; }
.placar thead th:not(:first-child) { text-align: center; }
.pl { display: inline-block; width: 20px; height: 20px; vertical-align: middle; border-radius: 50%; }
.pl--sim { background: var(--lab); border: 2px solid var(--lab); }
.pl--parte { border: 2px solid var(--lab); box-shadow: inset 0 0 0 3px var(--surface); background: var(--lab); }
.pl--nao { border-radius: 0; background: linear-gradient(45deg, transparent 44%, var(--dew) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--dew) 44% 56%, transparent 56%); }
.pl--nt { height: 2px; width: 16px; border-radius: 2px; background: var(--muted); opacity: .6; }
.placar__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .88rem; color: var(--muted); }
.placar__legend .pl { margin-left: 8px; }
.placar__caption { font-family: var(--font-hand); font-size: 1.4rem; color: var(--accent); margin: 0; }
.tags { margin: 2rem 0 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: .85rem; background: var(--dew-light); color: var(--ink); padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.tags a::before { content: '#'; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 0; margin: 1.6rem 0; border-top: var(--line) solid var(--border); border-bottom: var(--line) solid var(--border); }
.share__label { font-family: var(--font-hand); font-size: 1.5rem; margin-right: 4px; }
.authorbox { display: flex; gap: 20px; align-items: center; background: var(--dew-light); color: var(--ink); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: 24px; }
.authorbox .hand { color: var(--accent); margin: 0; }
.authorbox img { border-radius: 50%; border: var(--line) solid var(--ink); flex-shrink: 0; }
.authorbox h2 { font-size: 1.35rem; margin: 0 0 .3em; }
.authorbox p:last-child { margin: 0; }
.related, .comments { margin-top: 56px; }
.related .section__title { font-size: 1.6rem; margin-bottom: 22px; }

/* ---------- Newsletter, formulários ---------- */
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--cosmic); color: #fff; border: 2px solid var(--ink); border-radius: calc(var(--radius) + 6px); box-shadow: 0 12px 0 var(--ink); padding: clamp(26px, 5vw, 56px); }
.newsletter .section__title { color: #fff; }
.newsletter .sticker { background: var(--paper); color: var(--ink); }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 12px; }
.newsletter__form input[type=email] { flex: 1 1 220px; border-radius: 999px; padding: 14px 20px; }
.newsletter .btn { background: var(--paper); color: var(--ink); border-color: var(--ink); }
input[type=text], input[type=email], input[type=search], input[type=url], select, textarea {
	width: 100%; padding: 12px 16px; font: inherit; color: var(--ink); background: #fff;
	border: var(--line) solid var(--ink); border-radius: 14px;
}
.searchform input[type=search] { border-radius: 999px; }
.form label, .comment-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.notice { width: 100%; padding: 12px 16px; border: var(--line) solid var(--ink); border-radius: 14px; font-weight: 600; margin: 0 0 12px; color: var(--ink); }
.notice--ok { background: #D3E6D0; }
.notice--erro { background: #F6C9C9; }

/* ---------- Sobre (home) ---------- */
.about { display: grid; grid-template-columns: auto 1fr auto; gap: 36px; align-items: center; border: var(--line) solid var(--border); border-radius: var(--radius); padding: 36px; background: var(--surface); }
.about__photo { width: 132px; height: 132px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); display: grid; place-items: center; font: 400 2.4rem var(--font-display); color: var(--ink); overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: 1.8rem; text-transform: uppercase; }
.about p { margin-bottom: .4em; }

/* ---------- Comentários ---------- */
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { background: var(--surface); border: var(--line) solid var(--border); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-meta a { color: var(--muted); font-size: .85rem; }

/* ---------- Paginação, vazio, 404 ---------- */
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; justify-content: center; }
.page-numbers { display: inline-block; min-width: 44px; text-align: center; padding: 9px 15px; border: var(--line) solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.page-numbers.current, a.page-numbers:hover { background: var(--solid-bg); color: var(--solid-text); }
.empty { text-align: center; padding: 48px 20px; background: var(--surface); border: var(--line) dashed var(--border); border-radius: var(--radius); }
.big-num { font: 400 clamp(5rem, 18vw, 10rem)/1 var(--font-display); color: var(--accent); margin: 0; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink); color: var(--white); margin-top: 40px; padding-top: 60px; }
[data-theme="dark"] .site-footer { background: #070F19; border-top: var(--line) solid var(--border); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.site-footer .hand { color: var(--paper); }
.site-footer .widget__title { color: var(--paper); font-size: .9rem; }
.site-footer .muted { color: #BDB7AE; }
.site-footer .brand__mark { width: 72px; height: 72px; margin-bottom: 12px; }
.site-footer .brand__tagline { color: #E08BBE; margin-top: 10px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer-list li { padding: 5px 0; }
.site-footer__bottom { border-top: 1px solid rgba(247,244,239,.2); margin-top: 44px; padding-top: 18px; padding-bottom: 22px; font-size: .88rem; color: #BDB7AE; }

/* ---------- Cookies ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 520px; z-index: 200; background: var(--surface); color: var(--text); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 5px 6px 0 var(--ink); padding: 18px 20px; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: .95rem; }
.consent__actions { display: flex; gap: 10px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
	.feature-grid { grid-template-columns: repeat(2, 1fr); }
	.nav__list a { padding: 8px 9px; }
	.header-actions .btn--outline { display: none; }
}
@media (max-width: 960px) {
	.layout, .split { grid-template-columns: minmax(0, 1fr); } /* minmax: tabelas largas rolam dentro do .table-wrap */
	.sidebar, .split__intro { position: static; }
	.hero__inner { grid-template-columns: 1fr; min-height: 0; }
	.board { height: 460px; max-width: 620px; width: 100%; margin: 0 auto; }
	.stats, .flips { grid-template-columns: repeat(2, 1fr); }
	.newsletter { grid-template-columns: 1fr; }
	.grid--3 { grid-template-columns: repeat(2, 1fr); }
	.card--wide { display: flex; flex-direction: column; align-items: stretch; }
	.card--wide .card__media { aspect-ratio: 7 / 4; border-right: 0; border-bottom: var(--line) solid var(--border); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.about { grid-template-columns: auto 1fr; }
	.about > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
	.nav-toggle { display: grid; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: var(--line) solid var(--border); padding: 10px 20px 18px; margin: 0; }
	.nav.is-open { display: block; }
	.nav__list { flex-direction: column; }
	.nav .menu-item-has-children > a::after { content: ''; }
	.nav .sub-menu { display: block; position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; min-width: 0; }
	.header-actions { margin-left: auto; }
	.header-actions .btn { display: none; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.section { padding: 56px 0; }
	.grid--2, .grid--3, .site-footer__grid, .feature-grid { grid-template-columns: 1fr; }
	.hero__inner { padding-top: 36px; }
	.board { height: 340px; }
	.polaroid { width: 60%; padding: 7px 7px 0; }
	.polaroid__caption { font-size: 1.05rem; padding: 5px 2px 8px; }
	.stamp { width: 78px; height: 78px; }
	.brand__mark { width: 34px; height: 34px; }
	.brand__word { font-size: 1.2rem; }
	.board__arrow { display: none; }
	.stats, .flips { grid-template-columns: 1fr; }
	.stack__card { padding: 26px 24px 28px; }
	.authorbox, .about { flex-direction: column; text-align: center; grid-template-columns: 1fr; justify-items: center; }
	.entry__content { font-size: 1.04rem; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.card:hover, .stack__card:hover, .polaroid:hover { transform: none; }
	.js [data-reveal] { opacity: 1; transform: none; }
	.flip__inner { transform: none !important; }
	.flip__back { transform: none; }
	.flip__face { backface-visibility: visible; }
}
