/*
 * Literatura Maranhense — home
 * Visual moderno, vibrante e totalmente responsivo. A imagem entra
 * como banner cinematográfico abaixo do texto, com camadas de
 * gradiente quente baseadas no laranja-terracota do Maranhão
 * (--site-primary). A "estrela" da bandeira aparece como acento
 * sutil no topo do hero.
 */

.lm-home {
    --lm-ink: #1a1d22;
    --lm-ink-soft: #44494f;
    --lm-ink-muted: #6c7280;
    --lm-rule: #ecd9c8;
    --lm-surface: #ffffff;
    --lm-surface-warm: #fff7ed;
    --lm-shadow-warm: 0 30px 80px -30px rgba(154, 52, 18, .25);
    --lm-shadow-card: 0 12px 30px -12px rgba(28, 24, 20, .15);

    color: var(--lm-ink);
    overflow-x: hidden;
    padding-bottom: 1rem;
}

/* ───── Hero ─────────────────────────────────────────── */

.lm-hero {
    position: relative;
    padding: clamp(3rem, 7vw, 6rem) 1rem clamp(3rem, 6vw, 5rem);
    isolation: isolate;
}

.lm-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, var(--site-soft) 0%, transparent 60%),
        linear-gradient(180deg, #fffaf3 0%, #ffffff 85%);
    z-index: -1;
    overflow: hidden;
}

.lm-hero-bg::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--lm-rule) 30%,
        var(--lm-rule) 70%,
        transparent 100%);
}

.lm-hero-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
}

.lm-hero-bg-glow-a {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, var(--site-primary-light) 0%, transparent 70%);
    opacity: .25;
}

.lm-hero-bg-glow-b {
    width: 360px;
    height: 360px;
    top: -60px;
    right: -80px;
    background: radial-gradient(circle, var(--site-primary) 0%, transparent 70%);
    opacity: .15;
}

.lm-hero-inner {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.lm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.lm-eyebrow-star {
    width: 16px;
    height: 16px;
    background: var(--site-primary);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 14.9,9 22,9.3 16.4,13.8 18.3,21 12,16.9 5.7,21 7.6,13.8 2,9.3 9.1,9'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,2 14.9,9 22,9.3 16.4,13.8 18.3,21 12,16.9 5.7,21 7.6,13.8 2,9.3 9.1,9'/></svg>") center/contain no-repeat;
}

.lm-eyebrow-line {
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, var(--site-primary), transparent);
    border-radius: 2px;
}

.lm-hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw + 1rem, 3.75rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--lm-ink);
    margin: 0 0 1.5rem;
    background: linear-gradient(135deg, var(--lm-ink) 0%, var(--site-primary-dark) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lm-hero-lead {
    font-size: clamp(1rem, .6vw + .9rem, 1.2rem);
    line-height: 1.65;
    color: var(--lm-ink-soft);
    margin: 0 auto;
    max-width: 680px;
}

/* ───── Banner cinematográfico ───────────────────────── */

.lm-banner {
    padding: 0 1rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 1;
}

.lm-banner-figure {
    position: relative;
    margin: 0;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--lm-shadow-warm);
    background: var(--site-soft);
    transition: transform .4s ease, box-shadow .4s ease;
}

.lm-banner-figure:hover {
    transform: translateY(-4px);
    box-shadow: 0 36px 90px -30px rgba(154, 52, 18, .35);
}

.lm-banner-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

.lm-banner-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 247, 237, 0) 65%, rgba(255, 247, 237, .35) 100%),
        linear-gradient(90deg, rgba(154, 52, 18, .12) 0%, transparent 35%, transparent 65%, rgba(154, 52, 18, .12) 100%);
    mix-blend-mode: multiply;
}

.lm-banner-meta {
    max-width: 780px;
    margin: 2rem auto 0;
    padding: 0 .5rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--lm-ink-soft);
    text-align: center;
}

.lm-link {
    color: var(--site-primary);
    font-weight: 600;
    text-decoration: none;
    background-image: linear-gradient(transparent 60%, rgba(234, 88, 12, .18) 60%);
    transition: color .2s ease, background-image .2s ease;
}

.lm-link:hover,
.lm-link:focus {
    color: var(--site-primary-dark);
    background-image: linear-gradient(transparent 0%, rgba(234, 88, 12, .25) 0%);
}

/* ───── Ficha técnica ────────────────────────────────── */

.lm-credits-section {
    padding: clamp(3rem, 6vw, 5rem) 1rem 1rem;
}

.lm-credits-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--site-primary);
    margin: 0 0 1.5rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.lm-credits-title::before,
.lm-credits-title::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lm-rule), transparent);
}

.lm-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 820px;
    margin: 0 auto;
}

.lm-credits-card {
    position: relative;
    background: var(--lm-surface);
    border: 1px solid var(--lm-rule);
    border-radius: 1rem;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    box-shadow: var(--lm-shadow-card);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    overflow: hidden;
}

.lm-credits-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.25rem;
    bottom: 1.25rem;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--site-primary), var(--site-primary-light));
}

.lm-credits-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -16px rgba(28, 24, 20, .22);
    border-color: var(--site-primary-light);
}

.lm-credits-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--site-primary);
    margin-bottom: .5rem;
}

.lm-credits-value {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--lm-ink);
    margin: 0;
}

/* ───── Acervo ───────────────────────────────────────── */

.lm-acervo {
    padding: clamp(2rem, 5vw, 3.5rem) 1rem 2rem;
}

/* ───── Responsivo ──────────────────────────────────── */

@media (max-width: 991.98px) {
    .lm-banner { margin-top: -1.5rem; }
    .lm-banner-img { aspect-ratio: 16 / 9; }
    .lm-banner-figure { border-radius: 1.25rem; }
}

@media (max-width: 767.98px) {
    .lm-hero { padding: 2.5rem 1rem 3rem; }
    .lm-eyebrow { margin-bottom: 1rem; }
    .lm-hero-lead { font-size: 1rem; }
    .lm-banner { margin-top: -1rem; }
    .lm-banner-img { aspect-ratio: 4 / 3; }
    .lm-banner-figure { border-radius: 1rem; }
    .lm-banner-meta {
        font-size: .95rem;
        margin-top: 1.5rem;
    }
    .lm-credits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .lm-credits-card { padding: 1.25rem 1.25rem 1.25rem 1.5rem; }
}

@media (max-width: 575.98px) {
    .lm-hero { padding: 2rem .75rem 2.5rem; }
    .lm-banner { padding: 0 .75rem; margin-top: 0; }
    .lm-banner-img { aspect-ratio: 3 / 2; }
    .lm-banner-overlay {
        background:
            linear-gradient(180deg, rgba(255, 247, 237, 0) 50%, rgba(255, 247, 237, .5) 100%);
    }
    .lm-credits-section { padding: 2.5rem .75rem .5rem; }
    .lm-acervo { padding: 1.5rem .75rem 1.5rem; }
    .lm-credits-title::before,
    .lm-credits-title::after { max-width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .lm-banner-figure,
    .lm-credits-card,
    .lm-link {
        transition: none;
    }
    .lm-banner-figure:hover,
    .lm-credits-card:hover {
        transform: none;
    }
}
