:root {
    --bg: #0a0d12;
    --bg-2: #10151d;
    --surface: #111823;
    --surface-2: #161f2c;
    --surface-3: #1d2735;
    --text: #edf2f7;
    --muted: #97a6b7;
    --line: rgba(255, 255, 255, 0.09);
    --primary: #d6b36a;
    --primary-strong: #f0cc82;
    --accent: #83f28f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    --radius: 26px;
    --radius-sm: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(214, 179, 106, 0.10), transparent 22%),
        radial-gradient(circle at top right, rgba(131, 242, 143, 0.08), transparent 20%),
        linear-gradient(180deg, #0a0d12 0%, #0c1117 38%, #0d1219 100%);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    width: min(860px, calc(100% - 32px));
}

.premium-shell {
    position: relative;
}

.premium-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(10, 13, 18, 0.84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    min-height: 84px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-logo,
.footer-logo {
    height: 36px;
    width: auto;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

.nav a,
.site-footer nav a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav a:hover,
.site-footer nav a:hover,
.card-body h3 a:hover,
.article-content a:hover,
.brand-grid a:hover,
.topic-card:hover strong {
    color: var(--primary-strong);
}

.search-form input {
    width: 220px;
    padding: 13px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
}

.search-form input::placeholder {
    color: var(--muted);
}

.menu-button {
    display: none;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--surface-2);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 20px;
}

.hero,
.page-hero,
.article-header {
    padding: 80px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    align-self: center;
}

.hero-feature,
.showcase-card,
.article-card,
.topic-card,
.source-box,
.empty-state,
.article-cover,
.search-form input,
.button {
    box-shadow: var(--shadow);
}

.hero-feature,
.showcase-card,
.article-card,
.topic-card,
.source-box,
.empty-state {
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.hero-feature {
    display: grid;
    min-height: 100%;
}

.hero-feature-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}

.hero-feature-media img,
.showcase-media img,
.card-image img,
.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-feature-media::after,
.showcase-media::after,
.card-image::after,
.article-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(10, 13, 18, 0.72));
}

.hero-badge {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 1;
    display: inline-flex;
    padding: 8px 12px;
    color: #0b0f14;
    background: var(--primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-feature-content,
.showcase-content,
.card-body {
    padding: 22px;
}

.hero-feature-content h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.showcase-card {
    display: grid;
    grid-template-columns: 360px 1fr;
}

.showcase-media {
    position: relative;
    min-height: 240px;
}

.section {
    padding: 56px 0;
}

.section-tight {
    padding-top: 0;
}

.section.muted {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.subtle {
    margin-bottom: 8px;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

h1 {
    font-size: clamp(42px, 7vw, 74px);
}

h2 {
    font-size: clamp(30px, 4vw, 46px);
}

h3 {
    font-size: clamp(22px, 3vw, 28px);
}

.hero p,
.page-hero p,
.lead,
.card-body p,
.showcase-content p,
.topic-card span,
.site-footer p {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
    background: var(--surface);
}

.button.primary {
    color: #090c11;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}

.card-body h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.card-meta,
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.pill {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    color: #0b0f14;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.topic-card {
    min-height: 180px;
    padding: 24px;
}

.topic-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    transition: color 0.2s ease;
}

.brand-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-grid a {
    padding: 11px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.article-cover {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    aspect-ratio: 16 / 8;
    background: var(--surface-2);
    border-radius: 32px;
}

.article-content {
    padding-top: 40px;
    padding-bottom: 56px;
    font-size: 19px;
}

.article-content > p,
.article-content li,
.article-content blockquote {
    color: #e5ebf2;
}

.article-content p {
    margin: 0 0 22px;
}

.article-content h2,
.article-content h3 {
    margin: 34px 0 16px;
}

.article-content ul,
.article-content ol {
    padding-left: 22px;
    margin: 0 0 24px;
}

.article-content blockquote {
    margin: 0 0 24px;
    padding: 18px 20px;
    border-left: 3px solid var(--primary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content a {
    color: var(--primary-strong);
    font-weight: 800;
}

.source-box,
.empty-state {
    margin-top: 34px;
    padding: 22px;
}

.source-box strong,
.site-footer nav strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-strong);
    letter-spacing: -0.02em;
}

.site-footer {
    padding: 42px 0 48px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.site-footer nav {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

@media (max-width: 1080px) {
    .hero-grid,
    .showcase-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .menu-button {
        display: inline-block;
        justify-self: end;
    }

    .nav,
    .search-form {
        display: none;
    }

    .menu-open .nav,
    .menu-open .search-form {
        display: flex;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 18px;
    }

    .search-form input {
        width: 100%;
    }

    .cards-grid,
    .topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hero,
    .page-hero,
    .article-header {
        padding-top: 46px;
    }

    .cards-grid,
    .topic-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .brand-logo,
    .footer-logo {
        height: 30px;
    }

    .article-cover {
        aspect-ratio: 16 / 11;
    }
}

/* Editorial home refinements */
.editorial-hero {
    padding-bottom: 54px;
}

.editorial-hero-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.compact-head {
    margin-bottom: 18px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    color: var(--primary-strong);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

.editorial-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.editorial-strip .article-card .card-body h3 {
    font-size: 20px;
}

.editorial-strip .article-card .card-body p {
    display: none;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(2, minmax(0, 0.9fr));
    gap: 22px;
}

.feature-grid .article-card:first-child {
    grid-row: span 2;
}

.feature-grid .article-card:first-child .card-image {
    aspect-ratio: 16 / 12;
}

.feature-grid .article-card:first-child .card-body h3 {
    font-size: clamp(28px, 3.6vw, 40px);
}

.dense-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dense-grid .article-card .card-body h3 {
    font-size: 21px;
}

.race-section {
    position: relative;
    background:
        linear-gradient(90deg, rgba(131, 242, 143, 0.05), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.race-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%);
    background-size: 34px 34px;
    opacity: 0.35;
}

.race-section > * {
    position: relative;
}

@media (max-width: 1080px) {
    .editorial-hero-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid .article-card:first-child {
        grid-row: auto;
    }

    .editorial-strip,
    .dense-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .editorial-strip,
    .dense-grid {
        grid-template-columns: 1fr;
    }
}

/* Two-column editorial spacing adjustment */
.section {
    padding: 72px 0;
}

.section-tight {
    padding-top: 32px;
}

.section-head {
    margin-bottom: 34px;
}

.cards-grid,
.feature-grid,
.dense-grid,
.editorial-strip {
    gap: 30px;
}

.feature-grid,
.dense-grid,
.cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid .article-card:first-child {
    grid-row: auto;
}

.feature-grid .article-card:first-child .card-image {
    aspect-ratio: 16 / 10;
}

.feature-grid .article-card:first-child .card-body h3 {
    font-size: 24px;
}

.editorial-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-strip .article-card .card-body p {
    display: block;
}

.article-card {
    height: 100%;
}

.card-body {
    padding: 26px;
}

.card-body h3 {
    font-size: 24px;
}

.dense-grid .article-card .card-body h3,
.editorial-strip .article-card .card-body h3 {
    font-size: 23px;
}

.hero-feature-content,
.showcase-content {
    padding: 28px;
}

@media (max-width: 760px) {
    .cards-grid,
    .feature-grid,
    .dense-grid,
    .editorial-strip {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section {
        padding: 52px 0;
    }
}


/* Readable logo patch */
.brand-logo {
    display: block;
    width: auto;
    height: 46px;
    max-width: 300px;
    object-fit: contain;
}

.footer-logo {
    display: block;
    width: auto;
    height: 42px;
    max-width: 300px;
    object-fit: contain;
}

@media (max-width: 640px) {
    .brand-logo {
        height: 38px;
        max-width: 230px;
    }

    .footer-logo {
        height: 36px;
        max-width: 240px;
    }
}


/* Search fix patch */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form button,
.search-page-form button {
    cursor: pointer;
    border: 0;
    color: #090c11;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border-radius: 999px;
    font-weight: 900;
}

.search-form button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
}

.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 28px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.search-page-form input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
    font: inherit;
}

.search-page-form input::placeholder {
    color: var(--muted);
}

.search-page-form button {
    min-height: 50px;
    padding: 0 22px;
}

.search-count {
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 800;
}

.search-empty {
    max-width: 720px;
}

.search-results-grid {
    margin-top: 0;
}

@media (max-width: 960px) {
    .menu-open .search-form {
        display: grid;
        grid-template-columns: 1fr auto;
    }
}

@media (max-width: 640px) {
    .search-page-form {
        grid-template-columns: 1fr;
        border-radius: var(--radius-sm);
    }

    .search-page-form button {
        width: 100%;
    }
}

/* Search robustness patch */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form button,
.search-page-form button {
    min-height: 42px;
    padding: 0 16px;
    color: #0b0f14;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
}

.search-page-form {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.search-page-form input {
    flex: 1;
    min-height: 52px;
    padding: 0 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
}

.search-count {
    margin-bottom: 24px;
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 960px) {
    .menu-open .search-form {
        display: flex;
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .search-page-form,
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Remove busca do header no mobile */
@media (max-width: 960px) {
    .site-header .search-form,
    .menu-open .site-header .search-form {
        display: none !important;
    }
}

/* Força a remoção da busca do header no mobile */
@media (max-width: 960px) {
    .desktop-search-only,
    .site-header .desktop-search-only,
    .site-header .search-form,
    body.menu-open .site-header .search-form,
    body.menu-open .desktop-search-only {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
}
