/* AgentFactoria — Sitio público */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-muted: #eef2f7;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.09);
    --primary: #0c59e6;
    --primary-dark: #0a4bc4;
    --primary-soft: rgba(12, 89, 230, 0.1);
    --success: #059669;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
    --container: 1380px;
    --font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
}
.logo {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}
.brand-logo:hover { opacity: 0.92; }
.brand-logo__img {
    display: block;
    width: auto;
    object-fit: contain;
}
.brand-logo--sm .brand-logo__img { height: 30px; max-width: 150px; }
.brand-logo--md .brand-logo__img { height: 38px; max-width: 190px; }
.brand-logo--lg .brand-logo__img { height: 52px; max-width: 260px; }
.brand-logo--header .brand-logo__img {
    height: 44px;
    max-width: 170px;
}

@media (min-width: 768px) {
    .site-header__inner {
        min-height: 88px;
    }

    .brand-logo--header .brand-logo__img {
        height: 72px;
        max-width: 280px;
    }
}

@media (min-width: 1100px) {
    .site-header__inner {
        min-height: 116px;
    }

    .brand-logo--header .brand-logo__img {
        height: 100px;
        max-width: 382px;
    }
}
.logo__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}
.site-nav { display: flex; gap: 8px; align-items: center; }
.site-nav a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
}
.site-nav a:hover, .site-nav a.is-active {
    color: var(--text);
    background: var(--surface-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.15s ease;
}
.btn--primary {
    background: var(--primary);
    color: #fff;
}
.btn--primary:hover { background: var(--primary-dark); color: #fff; }
.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn--ghost:hover { background: var(--surface-muted); }
.btn--lg { padding: 16px 28px; font-size: 1rem; }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.hero {
    padding: 56px 0 72px;
    background:
        radial-gradient(ellipse at 80% 0%, rgba(12, 89, 230, 0.08) 0%, transparent 55%),
        var(--bg);
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}
.hero__badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.hero h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    line-height: 1.08;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}
.hero__lead {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 28px;
    max-width: 54ch;
    line-height: 1.7;
}
.hero__price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.hero__price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.hero__price-old {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.hero__price-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    background: #ecfdf5;
    color: var(--success);
    border-radius: 999px;
}
.hero__stats {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hero__stat strong {
    font-size: 1.35rem;
    font-weight: 800;
}
.hero__stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.hero__list {
    list-style: none;
    display: grid;
    gap: 10px;
}
.hero__list li {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.hero__list li::before {
    content: '✓';
    color: var(--success);
    margin-right: 10px;
    font-weight: 800;
}
.hero-card {
    padding: 36px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}
.hero-card__header h2 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}
.hero-card__header p {
    color: var(--text-muted);
    margin-bottom: 24px;
}
.hero-card .btn--ghost { margin-top: 12px; }
.hero-card__trust {
    list-style: none;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.section { padding: 64px 0; }
.section--muted { background: var(--surface-muted); }
.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 40px;
}
.section-head--left { text-align: left; margin-left: 0; }
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 10px;
    padding: 4px 12px;
    background: var(--primary-soft);
    border-radius: 999px;
    border: 1px solid rgba(12, 89, 230, 0.15);
}
.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.section-head p { color: var(--text-muted); }

.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.curriculum-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.curriculum-card ul {
    list-style: none;
    display: grid;
    gap: 10px;
}
.curriculum-card li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-muted);
}
.curriculum-card li span:first-child { color: var(--text); font-weight: 500; }
.curriculum-card__time {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card__icon {
    font-size: 1.75rem;
    margin-bottom: 14px;
    display: block;
}
.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.about-card__body { max-width: 72ch; }

.video-section { padding-top: 0; }
.video-section__grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 48px;
    align-items: center;
}
.video-section__copy h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.video-section__copy p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}
.video-section__points {
    list-style: none;
    display: grid;
    gap: 10px;
}
.video-section__points li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 22px;
    position: relative;
}
.video-section__points li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}
.video-player { padding: 12px; overflow: hidden; }
.video-player__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
}
.video-player__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cta-band { padding-bottom: 80px; }
.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 48px;
    background: #0c59e6;
    border: none;
    color: #fff;
}
.cta-band__inner h2 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.5rem;
}
.cta-band__inner p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}
.cta-band__inner .btn--primary {
    background: #fff;
    color: var(--primary);
    flex-shrink: 0;
}
.cta-band__inner .btn--primary:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}

.auth-wrap {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
    padding: 48px 0;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { margin-bottom: 8px; }
.auth-card p { color: var(--text-muted); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 4px; display: block; }

.campus-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 32px 0 64px;
    align-items: start;
}
.campus-sidebar {
    position: sticky;
    top: 96px;
    padding: 20px;
}
.campus-sidebar h2 {
    font-size: 1rem;
    margin-bottom: 16px;
}
.campus-progress {
    margin-bottom: 20px;
}
.progress-bar {
    height: 8px;
    background: var(--surface-muted);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar__fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}
.module-block + .module-block { margin-top: 18px; }
.module-block h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.lesson-link {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.92rem;
}
.lesson-link:hover { background: var(--surface-muted); }
.lesson-link.is-active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 700;
}
.lesson-link.is-done::after {
    content: none;
}
.lesson-link.is-done .lesson-link__title::after {
    content: ' ✓';
    color: var(--success);
}
.lesson-link__time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.lesson-content h1 { margin-bottom: 12px; }
.lesson-content__body {
    color: var(--text);
    line-height: 1.75;
    font-size: 1rem;
}
.lesson-content__body h2 {
    font-size: 1.35rem;
    margin: 1.5em 0 0.6em;
    letter-spacing: -0.02em;
}
.lesson-content__body h3 {
    font-size: 1.1rem;
    margin: 1.25em 0 0.5em;
    color: var(--text);
}
.lesson-content__body p + p { margin-top: 1em; }
.lesson-content__body ul,
.lesson-content__body ol {
    margin: 0.75em 0 1em 1.25em;
}
.lesson-content__body li { margin-bottom: 0.35em; }
.lesson-content__body pre {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 1em 0;
}
.lesson-content__body strong { color: var(--text); }
.lesson-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.status-page {
    min-height: 50vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 64px 0;
}
.status-page h1 { margin-bottom: 12px; }
.status-page p { color: var(--text-muted); margin-bottom: 24px; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.flash {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 60;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    border-radius: 10px;
    max-width: 360px;
    animation: flash-in 0.25s ease;
}
.flash.is-hiding { opacity: 0; transition: opacity 0.3s ease; }

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}
.site-nav__user {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 8px;
}
.site-nav__logout { display: inline; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

.lesson-header { margin-bottom: 20px; }
.lesson-header__meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}
.lesson-done-badge {
    color: var(--success);
    font-weight: 700;
    align-self: center;
}

.campus-main { display: flex; flex-direction: column; gap: 20px; }
.campus-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.campus-stat {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.campus-stat__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.campus-stat strong { font-size: 1.35rem; }
.campus-complete {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: var(--primary-soft);
    border-radius: 12px;
}
.campus-complete__icon { font-size: 1.5rem; }
.campus-complete__hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.checkout-page { padding-top: 32px; }
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}
.checkout-course { margin-top: 24px; }
.checkout-course__summary { color: var(--text-muted); margin: 8px 0 16px; }
.checkout-course__includes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checkout-course__includes li::before { content: '✓ '; color: var(--success); font-weight: 700; }
.checkout-summary h2 { margin-bottom: 20px; font-size: 1.1rem; }
.checkout-summary__row,
.checkout-summary__total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}
.checkout-summary__total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    font-size: 1.1rem;
}
.checkout-form { margin-top: 20px; }
.checkout-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}
.checkout-trust {
    list-style: none;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}
.testimonial-card p { font-style: italic; color: var(--text); line-height: 1.65; }
.testimonial-card footer {
    margin-top: auto;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 800px; }
.faq-item { padding: 0; overflow: hidden; }
.faq-item summary {
    padding: 18px 22px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    float: right;
    color: var(--primary);
    font-weight: 800;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
    padding: 0 22px 18px;
    color: var(--text-muted);
    line-height: 1.65;
}

.cta-band__guarantee {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.account-page { padding-top: 32px; }
.account-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}
.account-profile,
.account-access { margin-top: 24px; }
.account-dl {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}
.account-dl dt {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.account-access__meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 8px 0 16px;
}
.order-list { list-style: none; margin-top: 16px; }
.order-list__item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.order-list__item:last-child { border-bottom: 0; }
.order-list__date {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.order-list__meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.order-status {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.order-status--paid { color: var(--success); }
.order-status--pending { color: var(--text-muted); }
.order-status--cancelled { color: var(--danger); }
.account-orders__empty { color: var(--text-muted); margin-top: 12px; }

.site-footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    text-align: left;
    padding-bottom: 20px;
}
.site-footer__brand p {
    margin-top: 6px;
    font-size: 0.88rem;
}
.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}
.site-footer__links a { color: var(--text-muted); font-weight: 600; font-size: 0.88rem; }
.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
}


@media (max-width: 900px) {
    .hero__grid, .campus-layout, .video-section__grid,
    .checkout-grid, .account-grid { grid-template-columns: 1fr; }
    .curriculum-grid, .features-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .campus-stats { grid-template-columns: 1fr; }
    .cta-band__inner { flex-direction: column; text-align: center; }
    .cta-band__inner .btn--primary { width: 100%; }
    .hero__stats { flex-wrap: wrap; gap: 16px; }
    .campus-sidebar { position: static; }
    .site-footer__grid { flex-direction: column; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .checkout-page { padding-top: 20px; }
    .checkout-summary { order: -1; }
}
