/* Alfa Network Academy — hoja de estilos compartida (index, cursos) */

:root {
    --bg: #0d110d;
    --bg-soft: #141a14;
    --surface: #192019;
    --surface-2: #1f2a1f;
    --line: #2f3b2d;
    --text: #f2f5f0;
    --muted: #a8b2a4;
    --accent: #b6ff5c;
    --accent-soft: #d0ff9a;
    --radius: 14px;
    --mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

h1, h2, h3, h4, h5, h6 { font-family: inherit; color: var(--text); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .4em 0; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: .3em 0 .5em; }
h3 { font-size: 1.4rem; }
a { color: var(--accent); }
a:hover { color: var(--accent-soft); }
p { margin: 0 0 1rem; }

.accent { color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .5rem;
}

/* Accesibilidad */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    background: var(--accent); color: #0d110d; padding: 10px 16px;
    border-radius: 8px; font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: 12px; color: #0d110d; }

a:focus-visible, button:focus-visible, input:focus-visible, .collapsible-header:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Navegación */
.site-nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(13, 17, 13, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    height: 64px; line-height: 64px;
}
.site-nav .brand {
    font-weight: 700; font-size: 1.25rem; color: var(--text);
    letter-spacing: .02em;
}
.site-nav .brand span { color: var(--accent); }
.site-nav ul a { color: var(--text); font-size: .95rem; transition: background .2s, color .2s; }
.site-nav ul a:hover { background: var(--surface-2); color: var(--accent); }
.site-nav ul a[aria-current="page"] { color: var(--accent); }
.site-nav .sidenav-trigger { color: var(--text); margin: 0; }
.site-nav .btn-nav { line-height: 40px; height: 40px; margin: 12px 0 0 8px; padding: 0 18px; }
.site-nav .btn-nav:hover { color: #0d110d; background: var(--accent-soft); }

.sidenav { background: var(--bg-soft); }
.sidenav li > a { color: var(--text); }
.sidenav li > a:hover { background: var(--surface-2); color: var(--accent); }

/* Botones */
.btn, .btn-large {
    border-radius: 8px; text-transform: none; font-weight: 700;
    box-shadow: none; letter-spacing: 0; transition: transform .15s, background .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: #0d110d; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-soft); color: #0d110d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(182,255,92,.25); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(182,255,92,.1); color: var(--accent-soft); transform: translateY(-2px); }
.btn-row .btn, .btn-row .btn-large { margin: 0 12px 12px 0; }

/* Hero */
.hero {
    position: relative;
    padding: 72px 0 56px;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(182,255,92,.12), transparent 60%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 48px 48px; opacity: .15;
    mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%);
}
.hero .container { position: relative; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero-meta { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.hero-meta span + span::before { content: "·"; margin: 0 .6em; color: var(--accent); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(182,255,92,.5); } 50% { box-shadow: 0 0 0 7px rgba(182,255,92,0); } }

/* Secciones */
.block { padding: 72px 0; }
.block.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }

/* Tarjetas */
.card-x {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    display: flex; flex-direction: column;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card-x:hover { transform: translateY(-4px); border-color: #55704a; box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.card-x .body { padding: 24px; flex: 1; }
.card-x .foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-x h3, .card-x h4, .card-x h5 { margin: .3em 0 .5em; font-size: 1.2rem; }
.card-x p { color: var(--muted); }
.card-x .icon { color: var(--accent); font-size: 40px; }
.card-x .tag-id { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.row.equal { display: flex; flex-wrap: wrap; }
.row.equal > [class*="col"] { margin-bottom: 24px; display: flex; }
.row.equal > [class*="col"] > * { width: 100%; }

.steps { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.steps li { padding: 4px 0; color: var(--text); }
.steps li b { color: var(--accent); font-family: var(--mono); margin-right: 10px; font-weight: 400; }

.tag {
    display: inline-block; padding: 3px 11px; margin: 4px 4px 0 0;
    border: 1px solid #46553d; border-radius: 20px;
    color: #c5f99a; font-size: .75rem;
}

/* Terminal */
.terminal-window { background: #070a07; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4a37; display: inline-block; }
.terminal-bar .title { margin-left: 8px; }
.terminal-body { padding: 18px 20px; font-family: var(--mono); font-size: .92rem; line-height: 1.7; color: var(--text); min-height: 150px; }
.terminal-body .c { color: #6f7d6b; }
.terminal-body .k { color: var(--accent); }
.terminal-body .ok { color: var(--accent); }
.terminal-body .err { color: #ff8a80; }
.terminal-body div { white-space: pre-wrap; word-break: break-word; }
.t-line { opacity: 0; animation: show .01s forwards; animation-delay: calc(var(--i) * .45s + .3s); }
@keyframes show { to { opacity: 1; } }
.cursor { display: inline-block; width: .6em; height: 1.05em; background: var(--accent); vertical-align: -.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.repl-form { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 10px 20px; background: #0a0f0a; font-family: var(--mono); }
.repl-form label { color: var(--accent); }
.repl-form input { flex: 1; background: transparent; border: 0 !important; box-shadow: none !important; color: var(--text); font-family: var(--mono); height: 2rem; margin: 0 !important; }
.repl-form input::placeholder { color: #566352; }

/* Filtros */
.chips { margin-bottom: 28px; }
.chip-btn {
    background: transparent; border: 1px solid var(--line); color: var(--muted);
    border-radius: 20px; padding: 7px 18px; margin: 0 8px 8px 0; cursor: pointer;
    font-family: inherit; font-size: .9rem; transition: all .2s;
}
.chip-btn:hover { border-color: var(--accent); color: var(--text); }
.chip-btn[aria-pressed="true"] { background: var(--accent); color: #0d110d; border-color: var(--accent); font-weight: 700; }
.course-item[hidden] { display: none; }

/* Mentores */
.mentor-photo { width: 100%; height: 240px; object-fit: cover; object-position: center top; display: block; background: var(--surface-2); }
.mentor-role { color: var(--accent) !important; font-size: .9rem; margin-bottom: .5rem; }

/* Testimonio / métodos */
.quote { font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.4; font-weight: 600; border: 0; padding: 0; margin: 0 0 1.5rem; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); color: var(--accent); }
.method-img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.flow { font-family: var(--mono); font-size: .85rem; color: var(--accent); }
.method-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.method-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.method-list li:last-child { border-bottom: 0; }
.method-list b { color: var(--text); }
.method-list p { margin: .25rem 0 0; color: var(--muted); }
.method-list .n { color: var(--accent); font-family: var(--mono); margin-right: 8px; }

/* FAQ */
.collapsible { border: 0; box-shadow: none; margin: 0; }
.collapsible > li { background: transparent; border-bottom: 1px solid var(--line); }
.collapsible-header { background: transparent; border: 0; color: var(--text); font-weight: 600; padding: 18px 4px; min-height: 0; }
.collapsible-header::after { content: "+"; margin-left: auto; color: var(--accent); font-family: var(--mono); font-size: 1.4rem; line-height: 1; }
.collapsible > li.active .collapsible-header { color: var(--accent); }
.collapsible > li.active .collapsible-header::after { content: "−"; }
.collapsible-body { background: transparent; border: 0; color: var(--muted); padding: 0 4px 20px; }

/* CTA */
.cta { background: var(--accent); color: #0d110d; padding: 64px 0; }
.cta h2, .cta p { color: #0d110d; }
.cta .mono { font-size: .8rem; letter-spacing: .1em; }
.cta .prompt { font-family: var(--mono); font-size: 3rem; font-weight: 700; line-height: 1; }
.btn-dark { background: #0d110d; color: var(--text); }
.btn-dark:hover, .btn-dark:focus { background: #1d281d; color: var(--accent); transform: translateY(-2px); }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 48px 0 24px; color: var(--muted); }
.site-footer h5 { color: var(--text); font-size: 1.1rem; margin: 0 0 .6rem; }
.site-footer h6 { color: var(--text); font-size: .95rem; margin: 0 0 .8rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); font-size: .9rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .legal { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; font-size: .8rem; }

/* Animación de entrada */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 600px) {
    .hero { padding: 44px 0 36px; }
    .block { padding: 48px 0; }
    .btn-row .btn-large, .btn-row .btn { display: block; width: 100%; text-align: center; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .t-line { opacity: 1; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Formulario (login) */
.field { margin-bottom: 18px; }
.field label { display: block; color: var(--text); font-size: .9rem; margin-bottom: 6px; position: static; transform: none; }
.field input {
    background: #0a0f0a; color: var(--text); border: 1px solid var(--line) !important;
    border-radius: 8px !important; padding: 0 14px !important; height: 3rem; margin: 0 !important; box-sizing: border-box; width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(182,255,92,.2) !important; }
.field input[aria-invalid="true"] { border-color: #ff8a80 !important; }
.field-error { color: #ff8a80; font-size: .85rem; margin: 6px 0 0; min-height: 1.2em; }
.login-msg { color: var(--accent); margin: 16px 0 0; font-size: .9rem; }
