@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
    --bg:          #08080f;
    --surface:     #0e0e1c;
    --surface-2:   #141428;
    --border:      rgba(139, 92, 246, 0.12);
    --border-hover:rgba(139, 92, 246, 0.35);
    --accent:      #8b5cf6;
    --accent-2:    #06b6d4;
    --gradient:    linear-gradient(135deg, #8b5cf6, #06b6d4);
    --text:        #f0eeff;
    --text-muted:  #9090b8;
    --text-dim:    #4a4a70;
    --radius:      14px;
    --radius-sm:   8px;
    --shadow:      0 4px 32px rgba(139,92,246,0.08);
    --shadow-hover:0 8px 48px rgba(139,92,246,0.18);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; }

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(8,8,15,0.8);
    border-bottom: 1px solid var(--border);
}
.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav__logo {
    font-weight: 800;
    font-size: 1.1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav__links a {
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }

.badge-rss {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    color: #f97316;
    border: 1px solid rgba(249,115,22,.3);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all .2s;
}
.badge-rss:hover { background: rgba(249,115,22,.08); color: #f97316; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    text-align: center;
}
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}
.hero__orb--1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
    top: -100px; left: -100px;
}
.hero__orb--2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,.2), transparent 70%);
    bottom: -80px; right: -80px;
    animation-delay: -4s;
}
@keyframes float {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-20px) scale(1.05); }
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(6,182,212,.08);
    border: 1px solid rgba(6,182,212,.2);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 28px;
}
.hero__title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: 24px;
}
.hero__title .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* ── Subscribe Form ────────────────────────────────────── */
.subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.subscribe-form input[type="email"]::placeholder { color: var(--text-dim); }
.subscribe-form input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}
.btn--primary {
    background: var(--gradient);
    color: #fff;
}
.btn--primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(139,92,246,.3); color: #fff; }
.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface); }

.form-msg { margin-top: 12px; font-size: .85rem; min-height: 1.2em; }
.form-msg--ok  { color: #34d399; }
.form-msg--err { color: #f87171; }

/* ── Stats row ─────────────────────────────────────────── */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat__label { font-size: .8rem; color: var(--text-dim); letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }

/* ── Section ───────────────────────────────────────────── */
.section { padding: 80px 0; }
.section--alt { background: var(--surface); }

.section__header { text-align: center; margin-bottom: 48px; }
.section__tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.section__title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 12px;
}
.section__sub { color: var(--text-muted); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* ── Digest Cards ──────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity .25s;
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card:hover::before { opacity: .03; }

.card__edition {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(6,182,212,.08);
    border: 1px solid rgba(6,182,212,.15);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.card__date { color: var(--text-dim); font-size: .78rem; margin-left: 8px; }
.card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--text); }
.card__summary { font-size: .88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.card__link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap .2s;
}
.card__link:hover { gap: 10px; }

/* ── Features ──────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.feature {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color .2s;
}
.feature:hover { border-color: var(--border-hover); }
.feature__icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature__title { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.feature__desc { font-size: .83rem; color: var(--text-muted); line-height: 1.5; }

/* ── Digest Page (edicion.php) ─────────────────────────── */
.digest-header {
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 56px;
}
.breadcrumb { font-size: .82rem; color: var(--text-dim); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }
.digest-edition-badge {
    display: inline-block;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(6,182,212,.08);
    border: 1px solid rgba(6,182,212,.15);
    padding: 4px 12px; border-radius: 20px;
    margin-bottom: 16px;
}
.digest-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 16px; }
.digest-meta { font-size: .85rem; color: var(--text-dim); }

/* Contenido del digest generado por IA */
.digest-content { max-width: 720px; }

.digest-content .digest-section {
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.digest-content .digest-section:last-child { border-bottom: none; }

.digest-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 20px;
    color: var(--text);
}
.digest-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 24px 0 8px;
}
.digest-content p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.75; }
.digest-content strong { color: var(--text); }
.digest-content a { color: var(--accent); font-weight: 500; }
.digest-content a:hover { color: var(--accent-2); }
.digest-content ul, .digest-content ol { color: var(--text-muted); padding-left: 24px; margin-bottom: 16px; }
.digest-content li { margin-bottom: 8px; line-height: 1.65; }
.digest-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 20px 0;
    background: rgba(139,92,246,.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Ad Banner ─────────────────────────────────────────── */
.ad-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin: 40px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: .8rem;
}

/* ── Archive ───────────────────────────────────────────── */
.archive-list { display: flex; flex-direction: column; gap: 1px; }
.archive-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .2s;
    margin-bottom: 8px;
}
.archive-item:hover { border-color: var(--border-hover); transform: translateX(4px); }
.archive-item__num { font-size: .75rem; font-weight: 700; color: var(--accent); min-width: 60px; }
.archive-item__title { flex: 1; font-weight: 600; font-size: .95rem; }
.archive-item__date { font-size: .8rem; color: var(--text-dim); white-space: nowrap; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
    margin-top: 80px;
}
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer__brand { font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer__text { font-size: .82rem; color: var(--text-dim); margin-top: 4px; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { font-size: .85rem; color: var(--text-dim); transition: color .2s; }
.footer__links a:hover { color: var(--accent); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero { padding: 70px 0 60px; }
    .nav__links { gap: 4px; }
    .nav__links li:not(:last-child) a { display: none; }
    .stats { gap: 24px; }
    .footer__inner { flex-direction: column; text-align: center; }
    .footer__links { justify-content: center; }
}
