/* ==========================================================================
   guia-luz-azul.com — editorial cream broadsheet (DESIGN.md ref: MetaMusic)
   Paper Cream canvas · Brand Blue single accent · Deep Indigo panels
   Hard 4px black offset shadow on interactive controls only
   Inter (Maison Neue substitute) + Space Grotesk 700 (Spoof accent, 1/page)
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/space-grotesk-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Colors */
    --brand-blue: #0066cc;
    --deep-indigo: #0e2575;
    --midnight-card: #213680;
    --ink: #101820;
    --cream: #f4f1ea;
    --white: #ffffff;
    --lavender: #e6e0f8;
    --ice: #e9f4ff;
    --peach: #f7e1d5;
    --ash: #d6d6d6;

    /* Type */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-accent: 'Space Grotesk', var(--font-sans);

    /* Layout */
    --max-w: 1280px;
    --gap-section: 80px;
    --pad-card: 40px;
    --gap-el: 24px;

    /* Radii (strict three-tier system) */
    --r-card: 24px;
    --r-pill: 9999px;
    --r-input: 8px;

    /* Elevation: the only shadow in the system */
    --shadow-offset: 0px 4px 0px 0px #000000;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-blue); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--brand-blue);
    outline-offset: 2px;
}
h1, h2, h3, h4 { margin: 0 0 16px; font-weight: 600; line-height: 1.2; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--white);
    color: var(--ink);
    padding: 12px 24px;
    z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------ layout -- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 800px; }
.band { padding: var(--gap-section) 0; }

/* Universal fallback classes (shared legal views + autor.php) */
.section { padding: var(--gap-section) 0; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; }
.legal-updated { color: rgba(16, 24, 32, .6); font-size: 14px; }

/* --------------------------------------------------------- typography -- */
.eyebrow {
    color: var(--brand-blue);
    font-size: 17px;
    font-weight: 500;
    margin: 0 0 12px;
}
.eyebrow-light { color: #9db8ff; }
.accent-type { font-family: var(--font-accent); font-size: 22px; line-height: .9; letter-spacing: -0.02em; }
.display-sm {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* -------------------------------------------------------------- pills -- */
.pill {
    display: inline-block;
    border-radius: var(--r-pill);
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-offset);
    transition: transform .08s ease;
}
.pill:active { transform: translateY(3px); box-shadow: 0px 1px 0px 0px #000; }
.pill-solid { background: var(--brand-blue); color: var(--white); border: 1px solid var(--brand-blue); }
.pill-outline { background: var(--white); color: var(--ink); border: 1px solid #000; }

.arrow-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #000;
    color: var(--white);
    font-size: 18px;
}

/* -------------------------------------------------------------- topbar -- */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--ash);
}
.topbar-in {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 64px;
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark-word { font-weight: 500; font-size: 19px; letter-spacing: -0.01em; }
.mark-word b { font-weight: 600; color: var(--brand-blue); }
.mark-inverse, .mark-inverse .mark-word b { color: var(--white); }
.topnav { display: flex; align-items: center; gap: 24px; flex: 1; }
.topnav-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 6px 2px;
}
.topnav-link:hover, .topnav-link.is-here { color: var(--brand-blue); }
.topnav-cta { margin-left: auto; padding: 12px 24px; }
.burger { display: none; }

/* --------------------------------------------------------------- hero -- */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero-title {
    font-size: clamp(40px, 8vw, 96px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    font-weight: 600;
    max-width: 15ch;
    margin: 0 0 24px;
}
.hero-sub { font-size: 19px; line-height: 1.4; max-width: 620px; margin: 0 0 40px; }
.hero-cards { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    width: min(360px, 100%);
    padding: var(--pad-card);
    border-radius: var(--r-card);
    text-decoration: none;
}
.hero-card-txt { display: flex; flex-direction: column; gap: 8px; }
.hero-card-txt strong { font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.hero-card-txt span { font-size: 14px; line-height: 1.5; }
.hero-card-blue { background: var(--brand-blue); color: var(--white); }
.hero-card-white { background: var(--white); color: var(--ink); border: 1px solid var(--ash); }
.hero-doodle {
    position: absolute;
    top: 88px;
    right: max(24px, calc((100vw - var(--max-w)) / 2));
    width: 180px;
    height: 180px;
}

/* ------------------------------------------------------------- splits -- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split-lead .display-sm { max-width: 14ch; }
.stack { display: grid; gap: 24px; }
.topic-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--r-card);
    padding: var(--pad-card);
}
.topic-card h3 { font-size: 19px; font-weight: 500; margin: 0 0 6px; }
.topic-card p { margin: 0; font-size: 16px; line-height: 1.5; }
.icon-dot {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--peach);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-dot svg { width: 24px; height: 24px; }

/* ------------------------------------------------------- indigo panel -- */
.band-indigo { background: var(--deep-indigo); color: var(--white); }
.band-indigo .display-sm { color: var(--white); margin-bottom: 40px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.midnight-card {
    background: var(--midnight-card);
    border-radius: var(--r-card);
    padding: var(--pad-card);
}
.midnight-card h3 { font-size: 22px; font-weight: 500; color: var(--white); margin: 16px 0 8px; }
.midnight-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--white); }
.num-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
}

/* ---------------------------------------------------------- post grid -- */
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--white); border-radius: var(--r-card); overflow: hidden; }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.post-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 32px; flex: 1; }
.post-card-body h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin: 0; line-height: 1.2; }
.post-card-meta { font-size: 12px; color: rgba(16,24,32,.55); }
.post-card-desc { font-size: 14px; line-height: 1.5; color: rgba(16,24,32,.75); }
.post-card .arrow-dot { margin-top: auto; align-self: flex-end; }
.post-card-link:hover h3 { color: var(--brand-blue); }

/* ------------------------------------------------------------ wash -- */
.wash-card { background: var(--ice); border-radius: var(--r-card); padding: 56px var(--pad-card); }
.wash-card p { max-width: 640px; }

/* ------------------------------------------------------- index rows -- */
.index-rows { margin-top: 40px; }
.index-row { border-top: 1px solid var(--ash); }
.index-row:last-child { border-bottom: 1px solid var(--ash); }
.index-row-link { display: block; padding: 32px 8px; text-decoration: none; color: var(--ink); }
.index-row-link h2 {
    font-size: clamp(24px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 6px 0 10px;
    max-width: 26ch;
}
.index-row-link p { margin: 0 0 12px; max-width: 620px; color: rgba(16,24,32,.75); }
.index-row-meta { font-size: 12px; color: rgba(16,24,32,.55); }
.index-row-cta { color: var(--brand-blue); font-weight: 500; }
.index-row-link:hover h2 { color: var(--brand-blue); }

/* -------------------------------------------------------- breadcrumbs -- */
.breadcrumb { margin: 0 0 32px; font-size: 14px; }
.breadcrumb-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb-list li + li::before { content: '/'; margin-right: 6px; color: rgba(16,24,32,.4); }
.breadcrumb-list a { color: rgba(16,24,32,.6); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--brand-blue); }
.breadcrumb-list [aria-current] { color: var(--ink); }

/* ------------------------------------------------------------ article -- */
.article-head { margin-bottom: 40px; }
.article-title {
    font-size: clamp(32px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}
.article-standfirst { font-size: 19px; line-height: 1.4; color: rgba(16,24,32,.78); max-width: 640px; margin: 0 0 28px; }
.article-byline { display: flex; align-items: center; gap: 14px; }
.byline-avatar { border-radius: 50%; }
.byline-txt { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-weight: 500; color: var(--ink); text-decoration: none; }
.byline-name:hover { color: var(--brand-blue); }
.byline-meta { font-size: 13px; color: rgba(16,24,32,.55); }
.article-cover { margin: 0 0 40px; }
.article-cover img { border-radius: var(--r-card); width: 100%; display: block; }

.toc-card { background: var(--ice); border-radius: var(--r-card); padding: 32px var(--pad-card); margin: 0 0 40px; }
.toc-card .eyebrow { margin-bottom: 8px; }
.toc-list { margin: 0; padding: 0 0 0 20px; columns: 2; column-gap: 40px; }
.toc-list li { margin: 6px 0; break-inside: avoid; }
.toc-list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.toc-list a:hover { color: var(--brand-blue); }

/* --------------------------------------------------------------- prose -- */
.prose { font-size: 17px; line-height: 1.65; }
.prose h2 {
    font-size: clamp(26px, 3.2vw, 32px);
    letter-spacing: -0.01em;
    margin: 48px 0 16px;
    scroll-margin-top: 24px;
}
.prose h3 { font-size: 22px; letter-spacing: -0.01em; font-weight: 500; margin: 36px 0 12px; scroll-margin-top: 24px; }
.prose h4 { font-size: 19px; font-weight: 500; margin: 28px 0 10px; scroll-margin-top: 24px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--brand-blue); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.prose img { border-radius: var(--r-card); margin: 8px 0; }
.prose blockquote {
    margin: 28px 0;
    padding: 24px 28px;
    background: var(--lavender);
    border-radius: var(--r-input);
    border-left: 4px solid var(--deep-indigo);
    font-size: 15px;
}
.prose blockquote p { margin: 0; }
.prose table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
    background: var(--white);
    border-radius: var(--r-input);
}
.prose th, .prose td { text-align: left; padding: 12px 14px; border: 1px solid var(--ash); vertical-align: top; }
.prose th { background: var(--ice); font-weight: 600; }
/* mobile-scrolling tables: engine wraps or raw <table>; make both scroll */
.prose .table-wrap { overflow-x: auto; }
@media (max-width: 767px) {
    .prose table { display: block; overflow-x: auto; white-space: nowrap; }
}
.prose hr { border: 0; border-top: 1px solid var(--ash); margin: 40px 0; }
.prose svg { max-width: 100%; height: auto; }

.prose-intro { font-size: 17px; line-height: 1.65; }
.prose-intro p { margin: 0 0 18px; }

/* ---------------------------------------------------------- newsletter -- */
.band-news { padding-top: 0; }
.news-card { background: var(--white); border: 1px solid var(--ash); border-radius: var(--r-card); padding: 56px var(--pad-card); }
.news-card h2 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.01em; max-width: 22ch; }
.news-sub { max-width: 560px; margin: 0 0 24px; line-height: 1.5; }
.news-form { display: flex; gap: 16px; max-width: 520px; flex-wrap: wrap; }
.news-form input[type="email"] {
    flex: 1 1 260px;
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--r-input);
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--ink);
}
.news-form input[type="email"]:focus { border-color: var(--brand-blue); outline: none; }
.news-form .pill { border-width: 0; }
.news-note { font-size: 12px; color: rgba(16,24,32,.55); margin: 14px 0 0; }
.newsletter-ok { font-weight: 500; color: var(--brand-blue); }

/* -------------------------------------------------------------- footer -- */
.deepfoot { background: var(--deep-indigo); color: var(--white); padding: 64px 0 32px; }
.deepfoot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.deepfoot-brand p { color: rgba(255,255,255,.75); max-width: 340px; font-size: 14px; line-height: 1.5; }
.deepfoot-col { display: flex; flex-direction: column; gap: 10px; }
.deepfoot-col h3 { font-size: 14px; font-weight: 600; text-transform: none; color: #9db8ff; margin: 0 0 4px; }
.deepfoot-col a { color: var(--white); text-decoration: none; font-size: 15px; }
.deepfoot-col a:hover { text-decoration: underline; }
.deepfoot-base {
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}

/* ---------------------------------------------------------- cookie bar -- */
.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    display: none;
    background: var(--white);
    border: 1px solid #000;
    border-radius: var(--r-card);
    box-shadow: var(--shadow-offset);
    max-width: 720px;
    margin: 0 auto;
}
.cookie-bar.is-visible { display: block; }
.cookie-bar-in { display: flex; gap: 24px; align-items: center; padding: 20px 28px; flex-wrap: wrap; }
.cookie-bar-in p { margin: 0; font-size: 14px; line-height: 1.5; flex: 1 1 320px; }
.cookie-bar-actions { display: flex; gap: 12px; }
.cookie-bar-actions .pill { padding: 10px 22px; font-size: 14px; }

/* ------------------------------------------------------- author pages -- */
/* autor.php + author-callout use inline scoped styles + universal classes */

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-doodle { display: none; }
}

@media (max-width: 767px) {
    :root { --gap-section: 56px; --pad-card: 24px; }
    .split { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .toc-list { columns: 1; }
    .deepfoot-grid { grid-template-columns: 1fr; gap: 32px; }

    /* mobile nav: white sheet under topbar */
    .burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        margin-left: auto;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: var(--white);
        border: 1px solid #000;
        border-radius: var(--r-input);
        cursor: pointer;
    }
    .burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .15s ease, opacity .15s ease; }
    .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .burger.is-open span:nth-child(2) { opacity: 0; }
    .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .topnav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 90;
        flex-direction: column;
        align-items: stretch;
        background: var(--white);
        border-bottom: 1px solid var(--ash);
        padding: 16px 24px 24px;
        gap: 4px;
    }
    .topnav.is-open { display: flex; }
    .topbar { position: relative; }
    .topnav-link { padding: 12px 4px; font-size: 19px; }
    .topnav-cta { margin: 12px 0 0; text-align: center; }
    body.nav-locked { overflow: hidden; }
}
