/*
 * Mapa rapido:
 * - Ajuste larguras globais em --container e --container-wide.
 * - Ajuste a fonte base do site em body { font-size }.
 */
:root {
    --bg: #f3efe7;
    --bg-soft: #fffaf2;
    --surface: rgba(255, 251, 245, 0.84);
    --surface-strong: #fffdf9;
    --text: #151515;
    --muted: #5b564f;
    --line: rgba(21, 21, 21, 0.12);
    --accent: #d86c3d;
    --accent-dark: #8e3f1e;
    --shadow: 0 24px 60px rgba(44, 25, 12, 0.12);
    --radius-lg: 28px;
    --radius-md: 22px;
    --radius-sm: 16px;
    --nav-height: 92px;
    --container: 1360px;
    --container-wide: 1480px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Fonte base do site inteiro. Muitos tamanhos em rem escalam a partir daqui. */
body {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(216, 108, 61, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(37, 78, 65, 0.16), transparent 22%),
        linear-gradient(180deg, #f8f4ed 0%, #f1ece3 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--nav-height);
    backdrop-filter: blur(18px);
    background: rgba(16, 16, 16, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar.is-scrolled {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

/* Largura padrao das secoes internas. */
.navbar-container,
.section-shell,
.footer-content,
.footer-bottom {
    width: min(var(--container), calc(100% - 3.5rem));
    margin: 0 auto;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--nav-height);
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.brand-mark {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    padding: 0.25rem;
}

.brand-text {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.18rem;
    color: #fff7ef;
}

/* Logo do menu superior. Ajuste aqui se quiser aumentar ou reduzir so a navbar. */
.navbar .brand-mark {
    width: 64px;
    height: 64px;
}

.navbar .brand-text {
    font-size: 1.14rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 247, 239, 0.88);
    font-size: 0.95rem;
    position: relative;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-menu a:hover::after,
.nav-menu a.is-active::after {
    transform: scaleX(1);
}

.hamburger {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.28rem;
    cursor: pointer;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: #fff7ef;
    transition: 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hero-home,
.page-main {
    padding-top: 1.25rem;
}

/* Grid principal da home. grid-template-columns controla o tamanho das duas colunas. */
.hero-shell {
    width: min(var(--container-wide), calc(100% - 3.5rem));
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-height) - 2rem);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.8fr);
    gap: 2rem;
    align-items: stretch;
    padding: 2rem 0 4.25rem;
}

.hero-copy,
.page-hero-shell,
.info-card,
.article-card,
.about-card,
.article-page,
.article-aside {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-copy,
.page-hero-shell,
.article-page {
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.95), rgba(255, 247, 238, 0.88));
    border-radius: var(--radius-lg);
}

/* Card principal da home. padding e min-height alteram o tamanho visual do container. */
.hero-copy {
    padding: clamp(2rem, 3vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 680px;
    overflow: hidden;
}

.eyebrow,
.panel-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(216, 108, 61, 0.14);
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06rem;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.article-header h1,
.section-heading h2 {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    letter-spacing: -0.04em;
}

/* Titulo principal da home. */
.hero-copy h1 {
    font-size: clamp(1.04rem, 6vw, 4.3rem);
    line-height: 0.98;
    margin: 1rem 0 1.2rem;
}

.hero-lead,
.page-hero p,
.footer-copy,
.article-body,
.intro-grid p,
.about-card p {
    color: var(--muted);
}

/* Texto de apoio logo abaixo do titulo da home. */
.hero-lead {
    font-size: clamp(1.04rem, 1.15vw, 1.18rem);
    line-height: 1.8;
    max-width: 58ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #c14f20);
    color: #fff;
    border: 1px solid transparent;
}

.btn-secondary {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.46);
}

.btn-primary:hover,
.btn-secondary:hover,
.read-more:hover {
    transform: translateY(-2px);
}

.hero-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 0;
    box-shadow: none;
}

.hero-panel-card,
.hero-panel-grid,
.article-aside {
    background: rgba(19, 19, 19, 0.92);
    color: #f6efe9;
    border-radius: var(--radius-lg);
}

.hero-panel-card {
    position: relative;
    padding: 2rem;
    flex: 1;
    overflow: hidden;
    isolation: isolate;
}

.hero-panel-card > * {
    position: relative;
    z-index: 1;
}

.hero-panel-card::after {
    content: "";
    position: absolute;
    right: -2.4rem;
    bottom: -3.2rem;
    width: min(72%, 22rem);
    aspect-ratio: 648 / 609;
    background: url("assets/branding/face-watermark.svg") center / contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* Titulo do bloco escuro da direita na home. */
.hero-panel-card h2 {
    font-size: clamp(1.9rem, 2.1vw, 2.6rem);
    line-height: 1.05;
    margin: 1rem 0;
}

.hero-panel-card p,
.article-aside p {
    color: rgba(246, 239, 233, 0.76);
    line-height: 1.8;
}

/* Lista automatica dos artigos recentes exibida na lateral da home. */
.hero-recent-list {
    display: grid;
    gap: 1rem;
    margin-top: 0.35rem;
}

.hero-recent-item {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-recent-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.hero-recent-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
}

.hero-recent-link:hover {
    color: rgba(255, 255, 255, 0.88);
}

.hero-recent-meta,
.hero-recent-empty {
    margin-top: 0.45rem;
    color: rgba(246, 239, 233, 0.68);
    font-size: 0.88rem;
    line-height: 1.6;
}

.hero-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1.2rem;
}

.mini-stat {
    background: rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 1.2rem;
}

.mini-stat strong {
    display: block;
    font-size: 1.95rem;
    color: #fff;
}

.mini-stat span {
    color: rgba(246, 239, 233, 0.72);
    font-size: 0.92rem;
}

.section-shell {
    padding-bottom: 4rem;
}

.section-heading {
    margin-bottom: 1.8rem;
}

/* Titulos das secoes como "Resumo" e "Conteudo disponivel". */
.section-heading h2 {
    font-size: clamp(2.5rem, 3.3vw, 3.8rem);
    margin-top: 0.8rem;
}

.section-heading-inline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.read-more {
    color: var(--accent-dark);
    font-weight: 700;
}

.intro-grid,
.about-grid,
.articles-grid {
    display: grid;
    gap: 1.4rem;
}

.intro-grid,
.about-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Cards de resumo e da pagina sobre. padding controla o respiro interno. */
.info-card,
.about-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.6rem;
}

.info-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
}

.info-card p,
.about-card p {
    line-height: 1.8;
}

.articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.article-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-strong);
    cursor: pointer;
    transition: transform 0.25s ease;
}

.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-4px);
}

/* Altura visual da imagem/capa dos cards de artigo. */
.article-image {
    position: relative;
    min-height: 280px;
    background-size: cover;
    background-position: center;
}

.article-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.26) 100%);
}

/* Espacamento interno da parte de texto do card de artigo. */
.article-content {
    padding: 1.45rem;
}

.article-date {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.7rem;
}

/* Titulo do card de artigo. */
.article-title {
    font-size: 1.55rem;
    line-height: 1.18;
    margin-bottom: 0.8rem;
}

/* Texto curto do card de artigo. */
.article-excerpt {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.72;
    margin-bottom: 1rem;
}

.page-hero {
    padding-bottom: 2rem;
}

/* Container do topo das paginas internas. */
.page-hero-shell {
    padding: 2.4rem;
}

/* Titulo grande das paginas internas. */
.page-hero h1 {
    font-size: clamp(3.4rem, 5vw, 5.4rem);
    line-height: 0.98;
    margin: 1rem 0 0.9rem;
}

/* Texto de apoio do topo das paginas internas. */
.page-hero p {
    max-width: 56ch;
    line-height: 1.8;
    font-size: 1.04rem;
}

/* Grid da pagina de artigo: conteudo principal + coluna lateral. */
.article-layout {
    width: min(var(--container-wide), calc(100% - 3.5rem));
    margin: 0 auto;
    padding: 1.5rem 0 4rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.6rem;
    align-items: start;
}

/* Container branco principal do artigo. */
.article-page {
    padding: clamp(1.6rem, 3vw, 2.6rem);
}

.breadcrumb {
    margin-bottom: 1.4rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.55rem;
}

.breadcrumb a {
    text-decoration: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.back-link::before {
    content: "←";
}

.article-header {
    margin-bottom: 2rem;
}

/* Titulo do artigo completo. */
.article-header h1 {
    font-size: clamp(3rem, 4.3vw, 4.8rem);
    line-height: 0.98;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.94rem;
}

/* Fonte e entrelinha do texto corrido do artigo. */
.article-body {
    font-size: 1.04rem;
    line-height: 1.9;
}

.article-body h2 {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    letter-spacing: -0.03em;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.04;
    margin: 2.5rem 0 1rem;
}

.article-body p,
.article-body figure,
.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
}

.article-body figure {
    display: grid;
    justify-items: center;
}

.article-body ul,
.article-body ol {
    padding-left: 1.2rem;
}

.article-body li + li {
    margin-top: 0.7rem;
}

.article-body img {
    margin: 0 auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
}

.article-body a {
    color: var(--accent-dark);
}

.article-body code {
    padding: 0.12rem 0.38rem;
    border-radius: 8px;
    background: rgba(216, 108, 61, 0.12);
    color: var(--accent-dark);
    font-size: 0.92em;
}

.article-body figcaption {
    margin-top: 0.8rem;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
}

/* Caixa lateral fixa do artigo. */
.article-aside {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    padding: 1.5rem;
}

.footer {
    background: #121212;
    color: #f6efe9;
    padding: 3rem 0 1.2rem;
    margin-top: 1rem;
}

/* Colunas do rodape. */
.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.brand-footer {
    margin-bottom: 1rem;
}

.footer-copy {
    line-height: 1.8;
    max-width: 40ch;
}

.footer h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.footer-links a {
    color: rgba(246, 239, 233, 0.74);
    text-decoration: none;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(246, 239, 233, 0.58);
}

/* Ajustes para telas grandes. */
@media (min-width: 1280px) {
    body {
        font-size: 16.5px;
    }

    .hero-copy {
        padding: 4.1rem 4.25rem;
    }

    .hero-lead,
    .page-hero p {
        font-size: 1.1rem;
        max-width: 60ch;
    }

    .page-hero-shell {
        padding: 2.9rem 3.2rem;
    }

    .article-content {
        padding: 1.6rem 1.7rem 1.8rem;
    }

    .section-shell {
        padding-bottom: 4.5rem;
    }

}

/* Ajustes de tablet e notebooks menores. */
@media (max-width: 1024px) {
    .hero-shell,
    .intro-grid,
    .about-grid,
    .article-layout,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .article-aside {
        position: static;
    }

    .hero-copy {
        min-height: auto;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Ajustes principais de mobile. */
@media (max-width: 768px) {
    :root {
        --nav-height: 82px;
    }

    .hamburger {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 1rem;
        right: 1rem;
        padding: 1rem;
        border-radius: 20px;
        background: rgba(18, 18, 18, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: none;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-shell {
        min-height: auto;
        padding-top: 1rem;
    }

    .hero-panel-card::after {
        right: -2rem;
        bottom: -2.6rem;
        width: min(68%, 18rem);
        opacity: 0.08;
    }

    body {
        font-size: 16px;
    }

    .hero-copy,
    .page-hero-shell,
    .article-page,
    .hero-panel-card,
    .about-card,
    .info-card {
        border-radius: 22px;
    }
}

/* Ajustes finos de celulares pequenos, incluindo reducao dos titulos. */
@media (max-width: 520px) {
    .navbar-container,
    .section-shell,
    .footer-content,
    .footer-bottom,
    .hero-shell,
    .article-layout {
        width: min(100% - 1rem, var(--container-wide));
    }

    .brand-text {
        letter-spacing: 0.14rem;
        font-size: 0.9rem;
    }

    .brand-mark {
        width: 50px;
        height: 50px;
    }

    .navbar .brand-mark {
        width: 56px;
        height: 56px;
    }

    .navbar .brand-text {
        font-size: 0.96rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .hero-copy h1 {
        font-size: clamp(3.2rem, 14vw, 4.4rem);
    }

    .section-heading h2,
    .page-hero h1,
    .article-header h1 {
        font-size: clamp(2.5rem, 11vw, 3.7rem);
    }
}
