/* ═══════════════════════════════════════════════════════════════
   IMAGINEai — Revista de IA no Cinema
   Design System: Roxo + Preto
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:             #08070d;
    --surface:        #110f1a;
    --surface-bright: #1a1726;
    --border:         rgba(160,120,255,0.10);
    --accent:         #a855f7;
    --accent-glow:    rgba(168,85,247,0.25);
    --accent-soft:    #c084fc;
    --text:           #f0eef8;
    --muted:          #7a6f8a;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9999;
    pointer-events: none; opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* ─── NAV ──────────────────────────────────────────────────── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 48px;
    background: rgba(8,7,13,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; }
.nav-logo span { color: var(--accent); }

.nav-center { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.nav-center::-webkit-scrollbar { display: none; }
.nav-link {
    font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 6px 10px;
    border-radius: 100px; color: var(--muted);
    white-space: nowrap; transition: all 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface-bright); }
.nav-link.active { color: var(--accent); background: rgba(168,85,247,0.08); }

.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.lang-btn {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; padding: 5px 14px;
    border-radius: 100px; border: 1px solid transparent;
    color: var(--muted); transition: all 0.2s;
}
.lang-btn:hover { color: var(--text); border-color: var(--border); }
.lang-btn.active { color: var(--accent); border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.08); }

.nav-status { display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); animation: pulse 2s infinite; }
.dot.live { background: var(--accent); animation: none; box-shadow: 0 0 8px var(--accent-glow); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
#status-text { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.studio-link {
    font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--accent); opacity: 0.5;
    text-decoration: none; transition: opacity .2s;
}
.studio-link:hover { opacity: 1; }

/* ─── SHIMMER ──────────────────────────────────────────────── */
.shimmer {
    background: linear-gradient(90deg, var(--surface) 25%, #1e1a2e 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: sh 1.8s infinite linear;
}
@keyframes sh { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── MAIN ─────────────────────────────────────────────────── */
main { padding-top: 56px; max-width: 1280px; margin: 0 auto; padding-left: 48px; padding-right: 48px; padding-bottom: 80px; }

/* ─── PAGE HEADER ──────────────────────────────────────────── */
.page-header { padding: 40px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-category { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.page-title { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.04em; color: var(--text); line-height: 1; }
.page-subtitle { font-family: 'Lora', serif; font-style: italic; font-size: 1rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ─── HERO ─────────────────────────────────────────────────── */
#hero { margin: 48px 0 56px; }
.hero-card {
    position: relative; height: 560px; border-radius: 20px;
    overflow: hidden; cursor: pointer;
    border: 1px solid var(--border);
}
.hero-card img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.04); transition: transform 2.4s ease;
    opacity: 0.5;
}
.hero-card:hover img { transform: scale(1.08); }
.hero-card:hover { border-color: rgba(168,85,247,0.25); }
.hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(8,7,13,0.5) 50%, transparent 100%);
}
.hero-content { position: absolute; bottom: 44px; left: 48px; right: 48px; max-width: 720px; }
.hero-source {
    font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700;
    line-height: 1.1; letter-spacing: -0.03em;
    color: var(--text); margin-bottom: 16px;
}
.hero-desc {
    font-family: 'Lora', serif; font-size: 1rem;
    color: var(--muted); line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 28px; max-width: 600px;
}
.hero-btn {
    display: inline-block; padding: 12px 28px;
    background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    border-radius: 100px; transition: all 0.3s;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }

/* ─── SECTION DIVIDER ──────────────────────────────────────── */
.section-label { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.section-label h2 {
    font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.section-label hr { flex: 1; border: none; border-top: 1px solid var(--border); }

/* ─── GRID ─────────────────────────────────────────────────── */
#grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
    background: var(--surface);
    border-radius: 16px; overflow: hidden;
    cursor: pointer; border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(168,85,247,0.2); box-shadow: 0 8px 32px rgba(168,85,247,0.08); }
.card-img { height: 180px; overflow: hidden; }
.card-img img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(15%) saturate(0.9);
    transition: transform 0.6s, filter 0.4s;
}
.card:hover .card-img img { transform: scale(1.05); filter: grayscale(0) saturate(1); }
.card-body { padding: 20px 22px 22px; }
.card-source {
    font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.card-title {
    font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
}
.card:hover .card-title { color: var(--accent-soft); }

/* ─── PLACEHOLDERS ─────────────────────────────────────────── */
.ph-hero { height: 560px; border-radius: 20px; }
.ph-card { height: 300px; border-radius: 16px; }

/* ═══════════════════════════════════════════════════════════════
   REDAÇÃO PERSONNA — Seção Editorial
   ═══════════════════════════════════════════════════════════════ */
.redacao-section {
    margin-top: 80px;
    padding-top: 64px;
    border-top: 1px solid var(--border);
    position: relative;
}

/* Glow line on top */
.redacao-section::before {
    content: '';
    position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    width: 200px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
}

.redacao-header {
    text-align: center;
    margin-bottom: 48px;
}

.redacao-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: 100px;
    padding: 8px 20px;
    color: var(--accent);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.redacao-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 12px;
}

.redacao-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── AGENTS PIPELINE ─────────────────────────────────────── */
.redacao-agents {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.agent-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    transition: all 0.3s;
}

.agent-card:hover {
    border-color: rgba(168,85,247,0.3);
    box-shadow: 0 4px 20px rgba(168,85,247,0.08);
    transform: translateY(-2px);
}

.agent-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.agent-icon.scout  { background: rgba(59,130,246,0.12); color: #60a5fa; }
.agent-icon.writer { background: rgba(168,85,247,0.12); color: var(--accent-soft); }
.agent-icon.visual { background: rgba(236,72,153,0.12); color: #f472b6; }
.agent-icon.editor { background: rgba(34,197,94,0.12);  color: #4ade80; }

.agent-info { display: flex; flex-direction: column; gap: 2px; }
.agent-name {
    font-size: 14px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--text);
}
.agent-role {
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.04em; color: var(--muted);
    text-transform: uppercase;
}

.agent-divider {
    color: var(--muted);
    font-size: 18px;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ─── STATUS BAR ──────────────────────────────────────────── */
.redacao-status-bar {
    display: flex; align-items: center; gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 12px 24px;
    border-radius: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.redacao-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--muted);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.redacao-status-bar.active .redacao-pulse {
    background: #4ade80;
    animation: none;
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

.redacao-status-bar.idle .redacao-pulse {
    background: var(--muted);
    animation: pulse 3s infinite;
}

#redacao-status-text {
    font-size: 12px; font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* ─── EDITORIAL GRID ──────────────────────────────────────── */
.editorial-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

/* ── Featured Article (large) ─────────────────────────────── */
.editorial-featured {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    height: 420px;
    transition: all 0.3s;
}

.editorial-featured:hover {
    border-color: rgba(168,85,247,0.25);
    box-shadow: 0 8px 40px rgba(168,85,247,0.1);
}

.editorial-featured-img {
    position: absolute; inset: 0;
}

.editorial-featured-img img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.4;
    transform: scale(1.02);
    transition: transform 2s ease, opacity 0.4s;
}

.editorial-featured:hover .editorial-featured-img img {
    transform: scale(1.06);
    opacity: 0.5;
}

.editorial-featured-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(8,7,13,0.6) 50%, transparent 100%);
}

.editorial-featured-body {
    position: absolute;
    bottom: 40px; left: 40px; right: 40px;
    max-width: 640px;
}

.editorial-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.editorial-featured-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
}

.editorial-featured-desc {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    max-width: 500px;
}

.editorial-date {
    font-size: 11px; color: var(--muted);
    letter-spacing: 0.06em;
}

/* ── Regular Editorial Card ───────────────────────────────── */
.editorial-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.3s, box-shadow 0.3s;
}

.editorial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168,85,247,0.2);
    box-shadow: 0 8px 32px rgba(168,85,247,0.08);
}

.editorial-card-img {
    height: 180px; overflow: hidden;
}

.editorial-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(10%) saturate(0.9);
    transition: transform 0.6s, filter 0.4s;
}

.editorial-card:hover .editorial-card-img img {
    transform: scale(1.05);
    filter: grayscale(0) saturate(1);
}

.editorial-card-body {
    padding: 20px 22px 22px;
}

.editorial-card-title {
    font-size: 1rem; font-weight: 600;
    line-height: 1.4; letter-spacing: -0.01em;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    transition: color 0.2s;
}

.editorial-card:hover .editorial-card-title {
    color: var(--accent-soft);
}

/* ── Empty State ──────────────────────────────────────────── */
.editorial-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
}

.editorial-empty p {
    font-size: 14px;
    letter-spacing: 0.02em;
}

.editorial-empty-sub {
    font-size: 12px !important;
    opacity: 0.5;
}

/* ─── FOOTER ───────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
footer p { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
footer .footer-slogan { font-size: 1.15rem; letter-spacing: -0.01em; text-transform: none; font-weight: 600; color: var(--text); font-family: 'Lora', serif; font-style: italic; margin-bottom: 4px; }
footer span { color: var(--accent); }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) { .nav-center { display: none; } }
@media (max-width: 900px) {
    #grid, .editorial-cards { grid-template-columns: repeat(2,1fr); }
    main { padding-left: 24px; padding-right: 24px; }
    nav { padding: 0 24px; }
    .redacao-agents { gap: 8px; }
    .agent-card { padding: 10px 14px; }
    .agent-divider { font-size: 14px; }
    .editorial-featured { height: 360px; }
    .editorial-featured-body { left: 28px; right: 28px; bottom: 28px; }
}
@media (max-width: 580px) {
    #grid, .editorial-cards { grid-template-columns: 1fr; }
    .hero-card { height: 380px; }
    .hero-content { left: 24px; right: 24px; bottom: 28px; }
    .redacao-agents { flex-direction: column; }
    .agent-divider { transform: rotate(90deg); }
    .editorial-featured { height: 320px; }
    .editorial-featured-body { left: 20px; right: 20px; bottom: 24px; }
    .editorial-featured-title { font-size: 1.4rem; }
    .redacao-status-bar { max-width: 100%; }
}
