/*
Theme Name: Agenda31 Blog
Theme URI: https://agenda31.com.br/
Author: Agenda31
Description: Tema do blog do Agenda31: noir, dourado e vinho. Escuro, elegante e sensual, sem imagens explícitas.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: agenda31-blog
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
    --bg: #0a0a0a;
    --bg-2: #110e10;
    --card: #15110f;
    --card-2: #1b1514;
    --line: rgba(187, 157, 108, .22);
    --line-2: rgba(187, 157, 108, .4);
    --gold: #bb9d6c;
    --gold-hi: #f1d87a;
    --wine: #8c1f34;
    --wine-hi: #b3243f;
    --red: #c0392b;
    --text: #ebe4d8;
    --muted: #a99f8f;
    --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --sans: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 14px;
    --wrap: 1240px;
    --read: 740px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background:
        radial-gradient(1100px 620px at 88% -8%, rgba(140, 31, 52, .30), transparent 62%),
        radial-gradient(900px 520px at -4% 6%, rgba(187, 157, 108, .10), transparent 58%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-hi); }
::selection { background: var(--wine); color: #fff; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; width: auto; height: auto; clip: auto; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ==========================================================================
   Topo
   ========================================================================== */
.topbar {
    background: linear-gradient(90deg, #1a0a10, #0d0809 50%, #1a0a10);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--muted);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 7px; }
.topbar strong { color: var(--gold); font-weight: 700; }
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--gold-hi); }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 10, 10, .78);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 46px; width: auto; }
.brand__sub {
    font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--gold);
    padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 1;
}

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a {
    display: block; padding: 10px 14px; color: var(--text);
    font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    border-radius: 999px; position: relative;
}
.nav a::after {
    content: ''; position: absolute; left: 50%; bottom: 4px; width: 0; height: 1px;
    background: var(--gold); transition: width .25s ease, left .25s ease;
}
.nav a:hover, .nav .current-menu-item > a, .nav .current-cat > a { color: var(--gold-hi); }
.nav a:hover::after, .nav .current-menu-item > a::after { width: 22px; left: calc(50% - 11px); }

.header-tools { display: flex; align-items: center; gap: 10px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
    letter-spacing: .18em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn--red {
    color: #fff; background: linear-gradient(135deg, var(--red), var(--wine));
    box-shadow: 0 8px 26px -10px rgba(192, 57, 43, .8);
}
.btn--red:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(192, 57, 43, .95); }
.btn--ghost { color: var(--gold); border-color: var(--line-2); background: transparent; }
.btn--ghost:hover { color: #0a0a0a; background: var(--gold); border-color: var(--gold); }

.icon-btn {
    width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--gold);
    border-radius: 50%; transition: background .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: rgba(187, 157, 108, .14); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

.search-panel { display: none; border-top: 1px solid var(--line); background: rgba(10, 10, 10, .96); }
.search-panel.is-open { display: block; }
.search-panel form { display: flex; gap: 10px; padding-block: 18px; }
.search-panel input[type=search] {
    flex: 1; background: var(--card); border: 1px solid var(--line-2); color: var(--text);
    padding: 14px 20px; border-radius: 999px; font: inherit; outline: none;
}
.search-panel input[type=search]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(187, 157, 108, .18); }

/* ==========================================================================
   Títulos de seção
   ========================================================================== */
.section { padding-block: 56px; }
.section-title { display: flex; align-items: center; gap: 18px; margin: 0 0 30px; }
.section-title h2, .section-title h1 {
    margin: 0; font-family: var(--serif); font-weight: 600; font-style: italic;
    font-size: clamp(30px, 4vw, 44px); line-height: 1.1; color: var(--text);
}
.section-title::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, var(--line-2), transparent); }
.kicker {
    display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 700;
    font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase;
}
.kicker::before { content: ''; width: 28px; height: 1px; background: var(--gold); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: 34px 8px; }
.hero__card {
    position: relative; overflow: hidden; border-radius: 22px; min-height: 560px;
    display: flex; align-items: flex-end; border: 1px solid var(--line);
    background: linear-gradient(135deg, #2a0f18, #0d0809);
    box-shadow: 0 40px 90px -40px rgba(140, 31, 52, .55);
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s ease; }
.hero__card:hover .hero__img { transform: scale(1.06); }
.hero__veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, .05) 0%, rgba(10, 10, 10, .55) 52%, rgba(10, 10, 10, .96) 100%),
        linear-gradient(90deg, rgba(140, 31, 52, .5), transparent 62%);
}
.hero__body { position: relative; padding: clamp(26px, 5vw, 60px); max-width: 860px; }
.hero__body .kicker { text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.hero__title {
    font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 5.4vw, 66px);
    line-height: 1.04; margin: 16px 0 18px; color: #fff; text-wrap: balance;
}
.hero__title a { color: inherit; }
.hero__title a:hover { color: var(--gold-hi); }
.hero__excerpt { color: #d6cdbe; font-size: 18px; max-width: 640px; margin: 0 0 26px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; letter-spacing: .06em; margin-bottom: 24px; }

/* ==========================================================================
   Cards
   ========================================================================== */
.grid { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    display: flex; flex-direction: column; background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 28px 50px -28px rgba(140, 31, 52, .7); }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #1c1012; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card:hover .card__media img { transform: scale(1.07); }
.card__media::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 50%, rgba(140, 31, 52, .38));
    opacity: .55; transition: opacity .3s ease;
}
.card:hover .card__media::after { opacity: 1; }
.card__ph {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: radial-gradient(circle at 30% 20%, rgba(187, 157, 108, .22), transparent 55%), linear-gradient(135deg, #3a1220, #130a0c);
    font-family: var(--serif); font-style: italic; font-size: 54px; color: var(--gold); letter-spacing: .04em;
}
.chip {
    position: absolute; left: 14px; top: 14px; z-index: 2; padding: 5px 13px; border-radius: 999px;
    background: rgba(10, 10, 10, .72); backdrop-filter: blur(6px); border: 1px solid var(--line-2);
    color: var(--gold-hi); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.card__title { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.15; margin: 0 0 10px; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--gold-hi); }
.card__excerpt { color: var(--muted); font-size: 15px; margin: 0 0 18px; flex: 1; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; letter-spacing: .08em; padding-top: 14px; border-top: 1px solid var(--line); }
.card__more { color: var(--gold); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 11px; }
.card__more::after { content: ' →'; }

/* ==========================================================================
   Paginação
   ========================================================================== */
.pagination { margin-top: 46px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
    min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 14px;
}
.pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold-hi); }
.pagination .page-numbers.current { background: linear-gradient(135deg, var(--gold), #8e7547); color: #0a0a0a; border-color: transparent; }
.pagination .dots { border: 0; }

/* ==========================================================================
   Artigo
   ========================================================================== */
.post-head { text-align: center; padding-block: 56px 30px; }
.post-head .kicker { justify-content: center; }
.post-head .kicker::after { content: ''; width: 28px; height: 1px; background: var(--gold); }
.post-title {
    font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 5.4vw, 64px);
    line-height: 1.06; margin: 18px auto 20px; max-width: 980px; color: #fff; text-wrap: balance;
}
.post-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.post-meta span + span::before { content: '◆'; color: var(--gold); font-size: 8px; margin-right: 20px; vertical-align: middle; }

.post-cover { width: min(100% - 40px, 1080px); margin: 8px auto 46px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); position: relative; box-shadow: 0 40px 80px -40px rgba(140, 31, 52, .5); }
.post-cover img { width: 100%; max-height: 600px; object-fit: cover; }
.post-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(10, 10, 10, .55)); pointer-events: none; }

.entry { width: min(100% - 40px, var(--read)); margin-inline: auto; font-size: 18.5px; line-height: 1.88; color: #e3dccf; }
.entry > p:first-of-type::first-letter {
    float: left; font-family: var(--serif); font-size: 4.6em; line-height: .82; padding: 6px 12px 0 0;
    color: var(--gold); font-weight: 600;
}
.entry p { margin: 0 0 1.5em; }
.entry h2, .entry h3, .entry h4 { font-family: var(--serif); color: #fff; font-weight: 600; line-height: 1.15; margin: 2em 0 .7em; }
.entry h2 { font-size: 38px; position: relative; padding-bottom: 14px; }
.entry h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.entry h3 { font-size: 29px; color: var(--gold-hi); }
.entry h4 { font-size: 23px; color: var(--gold); }
.entry a { color: var(--gold-hi); border-bottom: 1px solid rgba(241, 216, 122, .35); }
.entry a:hover { border-bottom-color: var(--gold-hi); }
.entry strong { color: #fff; }
.entry ul, .entry ol { padding-left: 1.3em; margin: 0 0 1.5em; }
.entry li { margin-bottom: .5em; }
.entry li::marker { color: var(--gold); }
.entry blockquote {
    margin: 2em 0; padding: 26px 32px; border-left: 3px solid var(--wine-hi);
    background: linear-gradient(90deg, rgba(140, 31, 52, .22), transparent);
    border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.4; color: #fff;
}
.entry blockquote p { margin: 0; }
.entry img { border-radius: var(--radius); border: 1px solid var(--line); margin-block: 2em; }
.entry figure { margin: 2em 0; }
.entry figcaption, .wp-caption-text { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; font-style: italic; }
.entry hr { border: 0; height: 1px; margin: 3em 0; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.entry table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 16px; }
.entry th, .entry td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.entry th { color: var(--gold); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.alignleft { float: left; margin: .4em 1.5em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }

.post-tags { width: min(100% - 40px, var(--read)); margin: 38px auto 0; display: flex; flex-wrap: wrap; gap: 10px; }
.post-tags a { padding: 6px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; letter-spacing: .1em; color: var(--gold); }
.post-tags a:hover { background: var(--gold); color: #0a0a0a; }

.share { width: min(100% - 40px, var(--read)); margin: 34px auto 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 22px; border-block: 1px solid var(--line); }
.share__label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; margin-right: 6px; }
.share a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--text); }
.share a:hover { background: var(--wine); border-color: var(--wine); color: #fff; }

/* Chamada para o site */
.cta {
    position: relative; overflow: hidden; margin-block: 64px 10px; border-radius: 22px; padding: clamp(30px, 5vw, 56px);
    background: radial-gradient(600px 300px at 100% 0, rgba(241, 216, 122, .16), transparent 60%), linear-gradient(135deg, #5c1424, #2b0b14 60%, #130709);
    border: 1px solid rgba(187, 157, 108, .35); display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta h2 { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; color: #fff; }
.cta p { margin: 0; color: #d9cdbd; max-width: 560px; }

/* ==========================================================================
   Rodapé
   ========================================================================== */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line-2); background: linear-gradient(180deg, #0c0809, #060606); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; padding-block: 56px 36px; }
.footer-grid h3 { margin: 0 0 16px; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--muted); font-size: 15px; }
.footer-grid a:hover { color: var(--gold-hi); }
.footer-brand img { height: 50px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); max-width: 420px; margin: 0; font-size: 15px; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px 30px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 26px; color: #7d7466; font-size: 12.5px; letter-spacing: .04em; }
.footer-bottom strong { color: var(--gold); }

/* ==========================================================================
   Busca vazia / 404
   ========================================================================== */
.empty { text-align: center; padding-block: 110px; }
.empty h1 { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(54px, 9vw, 110px); line-height: 1; margin: 0 0 12px; color: var(--gold); }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; }
.archive-desc { color: var(--muted); max-width: 720px; margin: -10px 0 34px; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1020px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-toggle { display: grid; }
    .nav {
        position: absolute; left: 0; right: 0; top: 100%; margin: 0; display: none;
        background: rgba(10, 10, 10, .97); border-bottom: 1px solid var(--line); padding: 10px 20px 22px;
    }
    .nav.is-open { display: block; }
    .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .nav a { padding: 15px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav a::after { display: none; }
    .header-tools .btn { display: none; }
    .site-header .wrap { justify-content: space-between; }
    .header-tools { margin-left: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .grid { grid-template-columns: 1fr; gap: 22px; }
    .hero__card { min-height: 480px; border-radius: 16px; }
    .brand img { height: 38px; }
    .brand__sub { display: none; }
    .topbar .wrap { justify-content: center; }
    .topbar__right { display: none; }
    .entry { font-size: 17px; }
    .entry h2 { font-size: 31px; }
    .entry blockquote { font-size: 22px; padding: 20px 22px; }
    .cta { text-align: center; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
