/**
 * Número Magia — Estilos Globais
 * Tipografia, reset seletivo, header, footer, seções e responsividade base.
 *
 * @package NumeroMagia
 */

/* ═══════════════════════════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════════════════════════ */

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

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

body {
    font-family: var(--nm-font-sans);
    font-size: var(--nm-text-base);
    line-height: 1.75;
    color: var(--nm-text);
    background: var(--nm-bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

::selection {
    background: var(--nm-purple-light);
    color: var(--nm-navy);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TIPOGRAFIA
═══════════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nm-font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--nm-text);
    letter-spacing: -0.01em;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(30px, 5vw, 54px); }
h2 { font-size: clamp(24px, 3.5vw, 42px); }
h3 { font-size: clamp(20px, 2.5vw, 30px); }
h4 { font-size: clamp(16px, 2vw,   22px); }
h5 { font-size: 18px; }
h6 { font-size: 16px; font-family: var(--nm-font-sans); font-weight: 500; }

p {
    font-size: var(--nm-text-base);
    line-height: 1.75;
    color: var(--nm-text-muted);
    margin-top: 0;
    margin-bottom: 1em;
}

p:last-child { margin-bottom: 0; }

a {
    color: var(--nm-purple);
    text-decoration: none;
    transition: var(--nm-transition);
}

a:hover { color: var(--nm-purple-mid); }

strong, b { font-weight: 500; color: var(--nm-text); }
em, i     { font-style: italic; }
small     { font-size: var(--nm-text-sm); }

/* Rótulo de seção (eyebrow) */
.nm-eyebrow {
    display: inline-block;
    font-family: var(--nm-font-sans);
    font-size: var(--nm-text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nm-purple);
    margin-bottom: 10px;
}
.nm-eyebrow--light { color: #C4B5FD; }
.nm-eyebrow--gold  { color: var(--nm-gold-mid); }

/* Prose — conteúdo de posts e páginas */
.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.entry-content li {
    margin-bottom: 0.4em;
    font-size: var(--nm-text-base);
    color: var(--nm-text-muted);
}

.entry-content blockquote {
    margin: 2em 0;
    padding: 20px 28px;
    border-left: 3px solid var(--nm-purple);
    background: var(--nm-purple-xlight);
    border-radius: 0 var(--nm-radius-md) var(--nm-radius-md) 0;
}

.entry-content blockquote p {
    font-family: var(--nm-font-serif);
    font-size: clamp(17px, 2vw, 20px);
    font-style: italic;
    color: var(--nm-text);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LAYOUT — Seções e containers
═══════════════════════════════════════════════════════════════════════════════ */

.nm-section {
    padding: var(--nm-section-padding) 5%;
    position: relative;
    overflow: hidden;
}

.nm-section--alt   { background: var(--nm-bg-soft); }
.nm-section--dark  { background: var(--nm-navy); }
.nm-section--navy  { background: var(--nm-navy-mid); }
.nm-section--tight { padding-top: 52px; padding-bottom: 52px; }

.nm-container {
    max-width: var(--nm-content-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.nm-container--prose {
    max-width: var(--nm-prose-width);
    margin-left: auto;
    margin-right: auto;
}

.nm-center { text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER — Kadence customizado
═══════════════════════════════════════════════════════════════════════════════ */

.site-header {
    background: var(--nm-bg-white);
    border-bottom: 1px solid var(--nm-border);
    transition: box-shadow .3s ease;
}

.site-header.nm-scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

/* Logo */
.site-logo img,
.custom-logo {
    max-height: 44px;
    width: auto;
}

/* Menu de navegação */
.main-navigation a,
.kadence-navigation a {
    font-family: var(--nm-font-sans);
    font-size: var(--nm-text-sm);
    font-weight: 400;
    color: var(--nm-text-muted);
    padding: 6px 14px;
    border-radius: var(--nm-radius-sm);
    transition: var(--nm-transition);
}

.main-navigation a:hover,
.kadence-navigation a:hover {
    color: var(--nm-purple);
    background: var(--nm-purple-xlight);
}

/* Ícones de carrinho e conta no header */
.header-cart-link,
.header-account-link {
    color: var(--nm-text-mid);
    transition: var(--nm-transition);
}

.header-cart-link:hover,
.header-account-link:hover {
    color: var(--nm-purple);
}

/* Badge de quantidade do carrinho */
.cart-count-bubble,
.header-cart-link .count {
    background: var(--nm-purple);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--nm-radius-pill);
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER — Kadence customizado
═══════════════════════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--nm-navy);
    color: var(--nm-text-light-soft);
    border-top: none;
}

.site-footer * { color: inherit; }

.site-footer a {
    color: var(--nm-text-light-soft);
    font-size: var(--nm-text-sm);
    transition: var(--nm-transition);
}

.site-footer a:hover {
    color: var(--nm-bg-white);
}

.site-footer .footer-logo img {
    max-height: 36px;
    opacity: .9;
}

.site-footer .widget-title,
.site-footer h6 {
    font-family: var(--nm-font-sans);
    font-size: var(--nm-text-sm);
    font-weight: 500;
    color: var(--nm-bg-white);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

/* Copyright strip */
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    margin-top: 40px;
    font-size: var(--nm-text-xs);
    color: rgba(255,255,255,.35);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE BASE
═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .nm-section {
        padding-top:    var(--nm-section-padding-sm);
        padding-bottom: var(--nm-section-padding-sm);
    }

    /* Espaço para sticky CTA mobile */
    body { padding-bottom: 70px; }

    /* Ajuste tipografia mobile */
    p { font-size: var(--nm-text-md); }
}

@media (max-width: 480px) {
    body { font-size: var(--nm-text-md); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BLOG — Posts e archive
═══════════════════════════════════════════════════════════════════════════════ */

/* Archive de posts */
.post-card {
    border: 1px solid var(--nm-border);
    border-radius: var(--nm-radius-lg);
    overflow: hidden;
    transition: var(--nm-transition);
    background: var(--nm-bg-white);
}

.post-card:hover {
    box-shadow: var(--nm-shadow-md);
    transform: translateY(-2px);
    border-color: rgba(109,40,217,.15);
}

/* Post único */
.single .entry-header {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--nm-border);
}

.single .entry-title {
    font-family: var(--nm-font-serif);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 600;
    color: var(--nm-text);
    line-height: 1.2;
    margin-bottom: 16px;
}

/* Categoria do post */
.entry-category a {
    font-size: var(--nm-text-xs);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--nm-purple);
    background: var(--nm-purple-xlight);
    padding: 3px 10px;
    border-radius: var(--nm-radius-pill);
    text-decoration: none;
}

/* Leitura confortável no mobile */
@media (max-width: 768px) {
    .single .entry-title { font-size: 28px; }
    .entry-content p, .entry-content li { font-size: var(--nm-text-md); }
}
