/* ============================================
   RESET E VARIÁVEIS
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f5f1ea;
    --color-bg-alt: #ffffff;
    --color-bg-dark: #0a0a0a;
    --color-text: #1a1a1a;
    --color-text-muted: #4a4a4a;
    --color-text-light: #888;
    --color-yellow: #f5c150;
    --color-yellow-hover: #ecb33a;
    --color-border: #e5e0d6;
    --color-border-light: #ebe6dc;

    --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-serif: 'Lora', Georgia, serif;

    --max-width: 1180px;
    --header-height: 80px;
    --sticky-height: 64px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);

    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

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

ul {
    list-style: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   BOTÃO PADRÃO
   ============================================ */
.btn {
    display: inline-block;
    padding: 14px 24px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--color-text);
    text-align: center;
    border-radius: 4px;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--yellow {
    background-color: var(--color-yellow);
}

.btn--yellow:hover {
    background-color: var(--color-yellow-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 193, 80, 0.35);
}

.btn--full {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 14px;
}

/* ============================================
   1. STICKY NEWSLETTER (TOPO)
   ============================================ */
.sticky-newsletter {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    transform: translateY(0);
    transition: transform 300ms ease-out;
    box-shadow: var(--shadow-sm);
}

.sticky-newsletter.is-hidden {
    transform: translateY(-100%);
}

.sticky-newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 60px 12px 24px;
    min-height: var(--sticky-height);
    position: relative;
}

.sticky-newsletter__text {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
    margin: 0;
}

.sticky-newsletter__text strong {
    font-weight: 700;
}

.sticky-newsletter__form {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.sticky-newsletter__form input {
    width: 280px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: var(--color-bg-alt);
    outline: none;
    transition: border-color var(--transition);
}

.sticky-newsletter__form input:focus {
    border-color: var(--color-yellow);
}

.sticky-newsletter__form .btn {
    border-radius: 0 4px 4px 0;
    padding: 10px 22px;
}

.sticky-newsletter__close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-text);
    opacity: 0.5;
    transition: opacity var(--transition);
    border-radius: 50%;
}

.sticky-newsletter__close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   HEADER PRINCIPAL
   ============================================ */
.site-header {
    background-color: var(--color-bg);
    padding-top: var(--sticky-height);
    transition: padding-top 300ms ease-out;
}

.site-header.no-sticky {
    padding-top: 0;
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--color-text);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.main-nav a {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 4px 0;
}

.main-nav a:hover {
    color: var(--color-text-muted);
}

.main-nav a.active {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 8px;
}

.about-link {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
}

.about-link:hover {
    color: var(--color-text-muted);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-nav {
    display: none;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav ul {
    padding: 16px 24px;
}

.mobile-nav li {
    border-bottom: 1px solid var(--color-border-light);
}

.mobile-nav li:last-child {
    border-bottom: none;
}

.mobile-nav a {
    display: block;
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
}

/* ============================================
   2. HERO
   ============================================ */
.hero {
    padding: 60px 24px 100px;
    background-color: var(--color-bg);
}

.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    align-items: start;
}

.hero__content {
    max-width: 560px;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -1px;
}

.hero__text {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: 24px;
}

.hero__text em {
    font-style: italic;
}

/* ============================================
   NEWSLETTER CARD (REUTILIZÁVEL)
   ============================================ */
.newsletter-card {
    background: var(--color-bg-alt);
    padding: 44px 36px;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(var(--sticky-height) + 24px);
    transition: top 300ms ease-out;
}

.newsletter-card__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    margin-bottom: 32px;
    color: var(--color-text);
}

.newsletter-card__form {
    margin-bottom: 24px;
}

.newsletter-card__form input {
    display: block;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 2px solid var(--color-yellow);
    border-radius: 4px;
    outline: none;
    transition: border-color var(--transition);
    text-align: center;
}

.newsletter-card__form input::placeholder {
    color: var(--color-text-light);
}

.newsletter-card__form input:focus {
    border-color: var(--color-yellow-hover);
}

.newsletter-card__note {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text-muted);
    margin: 0;
}

/* ============================================
   3. TODOS OS ARTIGOS
   ============================================ */
.all-articles {
    background-color: var(--color-bg-alt);
    padding: 100px 24px;
}

.all-articles__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.all-articles__header h2 {
    font-family: var(--font-display);
    font-size: clamp(34px, 4vw, 44px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.all-articles__header p {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--color-text-muted);
}

.categories-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
    row-gap: 60px;
}

.category h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.category h3 a:hover {
    color: var(--color-text-muted);
}

.category ul {
    margin-bottom: 24px;
}

.category li {
    border-bottom: 1px solid var(--color-border-light);
}

.category li a {
    display: block;
    padding: 16px 0;
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    transition: color var(--transition), padding-left var(--transition);
}

.category li a:hover {
    color: var(--color-text-muted);
    padding-left: 6px;
}

.category__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text);
    margin-top: 12px;
    transition: gap var(--transition);
}

.category__more:hover {
    gap: 14px;
}

/* ============================================
   4. CHALLENGE (30 DIAS)
   ============================================ */
.challenge {
    background-color: var(--color-bg);
    padding: 100px 24px;
}

.challenge__container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    align-items: start;
}

.challenge__content {
    max-width: 560px;
}

.challenge__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.challenge__list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.challenge__list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.65;
}

.challenge__list strong {
    font-weight: 700;
    color: var(--color-text);
}

.challenge__list em {
    font-style: italic;
    color: var(--color-text-muted);
}

.challenge__check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--color-yellow);
    border-radius: 50%;
    margin-top: 4px;
}

.challenge__newsletter {
    position: sticky;
    top: calc(var(--sticky-height) + 24px);
}

/* ============================================
   5. FOOTER
   ============================================ */
.site-footer {
    background-color: var(--color-bg-dark);
    color: #fff;
    padding: 100px 24px 48px;
}

.footer-products {
    max-width: var(--max-width);
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.product-card {
    display: block;
    text-align: center;
    transition: transform var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
}

.product-card__image {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: box-shadow var(--transition);
}

.product-card:hover .product-card__image {
    box-shadow: 0 8px 30px rgba(245, 193, 80, 0.25);
}

.product-card__placeholder {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--color-text);
    text-align: center;
    line-height: 1.2;
    padding: 16px;
}

.product-card h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: #b8b8b8;
    transition: color var(--transition);
}

.product-card:hover h4 {
    color: #fff;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 48px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    display: inline-block;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 13px;
    color: #888;
}

.footer-links a {
    color: #888;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-links .separator {
    color: #444;
}

/* ============================================
   TOAST DE FEEDBACK
   ============================================ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: #fff;
    padding: 14px 24px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.is-success {
    background: #2d7d3f;
}

.toast.is-error {
    background: #c93838;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1024px) {
    .hero__container,
    .challenge__container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .newsletter-card {
        position: static;
        max-width: 480px;
        margin: 0 auto;
    }

    .categories-grid {
        column-gap: 48px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    /* Sticky bar - colapsa pra exibir só o form */
    .sticky-newsletter__inner {
        flex-direction: column;
        gap: 8px;
        padding: 10px 50px 10px 16px;
    }

    .sticky-newsletter__text {
        font-size: 12px;
        text-align: center;
    }

    .sticky-newsletter__form {
        width: 100%;
    }

    .sticky-newsletter__form input {
        width: 100%;
        font-size: 13px;
        padding: 8px 10px;
    }

    .sticky-newsletter__form .btn {
        font-size: 11px;
        padding: 8px 14px;
    }

    .sticky-newsletter__close {
        right: 10px;
        top: 8px;
        transform: none;
        width: 28px;
        height: 28px;
    }

    :root {
        --sticky-height: 100px;
    }

    /* Header */
    .site-header__inner {
        grid-template-columns: 1fr auto;
        gap: 16px;
        padding: 20px 16px;
    }

    .main-nav,
    .about-link {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 40px 20px 60px;
    }

    .hero__text {
        font-size: 16px;
    }

    .newsletter-card {
        padding: 32px 24px;
    }

    /* Articles */
    .all-articles {
        padding: 60px 20px;
    }

    .all-articles__header {
        margin-bottom: 48px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        row-gap: 48px;
    }

    /* Challenge */
    .challenge {
        padding: 60px 20px;
    }

    .challenge__list li {
        font-size: 15px;
    }

    /* Footer */
    .site-footer {
        padding: 60px 20px 32px;
    }

    .footer-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-bottom: 60px;
    }

    .product-card__image {
        margin-bottom: 16px;
    }

    .footer-links {
        font-size: 12px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 36px;
    }

    .all-articles__header h2 {
        font-size: 30px;
    }

    .challenge__title {
        font-size: 24px;
    }

    .footer-products {
        grid-template-columns: 1fr;
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
