/* UdeSA MCP · sitio del proyecto. Paleta del sitio institucional de UdeSA (azul #00529B, azul
   oscuro #003B6F, tinta #122535, verde #2DA343, grises) y el rosa del cardo del logo (#C887B9).
   Tipografía: Libertinus (OFL), servida desde este sitio. Movimiento: sólo transform y opacity,
   curvas propias, nada que tape la interacción; con «reducir movimiento», sólo opacidad. */

@font-face { font-family: "Libertinus Serif"; src: url("fonts/libertinus-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Serif"; src: url("fonts/libertinus-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libertinus Serif"; src: url("fonts/libertinus-serif-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Sans"; src: url("fonts/libertinus-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Sans"; src: url("fonts/libertinus-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libertinus Mono"; src: url("fonts/libertinus-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
    --bg: #ffffff;
    --bg-soft: #f3f4f4;
    --surface: #ffffff;
    --ink: #122535;
    --text: #353535;
    --muted: #656f77;
    --line: #dae0e4;
    --blue: #00529b;
    --blue-strong: #003b6f;
    --on-blue: #ffffff;
    --green: #2da343;
    --pink: #c887b9;
    --pill-bg: #faf1f7;
    --pill-ink: #7c3f6f;
    --code-bg: #122535;
    --code-ink: #e3e5e5;
    --nav-bg: rgb(255 255 255 / 0.72);
    --chat-bg: rgb(255 255 255 / 0.82);
    --shadow: 0 1px 2px rgb(18 37 53 / 0.06), 0 8px 24px rgb(18 37 53 / 0.06);

    --serif: "Libertinus Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --sans: "Libertinus Sans", "Gill Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "Libertinus Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1622;
        --bg-soft: #0f1d2c;
        --surface: #122535;
        --ink: #f3f4f4;
        --text: #dae0e4;
        --muted: #a3afb8;
        --line: #23384b;
        --blue: #8cbbea;
        --blue-strong: #b4d3f2;
        --on-blue: #0b1622;
        --pink: #d9a6cc;
        --pill-bg: #2a1d2a;
        --pill-ink: #e7c3de;
        --code-bg: #07111b;
        --code-ink: #dae0e4;
        --nav-bg: rgb(11 22 34 / 0.72);
        --chat-bg: rgb(15 29 44 / 0.86);
        --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0b1622;
    --bg-soft: #0f1d2c;
    --surface: #122535;
    --ink: #f3f4f4;
    --text: #dae0e4;
    --muted: #a3afb8;
    --line: #23384b;
    --blue: #8cbbea;
    --blue-strong: #b4d3f2;
    --on-blue: #0b1622;
    --pink: #d9a6cc;
    --pill-bg: #2a1d2a;
    --pill-ink: #e7c3de;
    --code-bg: #07111b;
    --code-ink: #dae0e4;
    --nav-bg: rgb(11 22 34 / 0.72);
    --chat-bg: rgb(15 29 44 / 0.86);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1.125rem/1.55 var(--serif);
    font-optical-sizing: auto;
    font-variant-numeric: oldstyle-nums proportional-nums;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-strong); }
abbr[title] { text-decoration: none; font-variant-caps: all-small-caps; letter-spacing: 0.04em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 1rem; top: -3rem; z-index: 20; padding: 0.5rem 0.9rem; background: var(--ink); color: var(--bg); font: 700 0.95rem var(--sans); border-radius: 6px; }
.skip:focus { top: 0.75rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 44rem; }

/* ---------- Navegación: capa translúcida sobre el contenido ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
.nav::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity 200ms ease; }
.nav[data-scrolled]::after { opacity: 1; }
.nav-inner { max-width: 68rem; margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font: 400 1.05rem var(--sans); letter-spacing: 0.01em; }
.brand b { font-weight: 700; color: var(--blue); }
.nav nav { display: flex; align-items: center; gap: 1.25rem; font: 400 0.95rem var(--sans); letter-spacing: 0.01em; }
.nav nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0; }
.nav nav a:hover { color: var(--ink); }
.nav nav .nav-gh { color: var(--ink); }
@media (max-width: 40rem) { .nav nav a:not(.nav-gh) { display: none; } }

.gh { width: 1.05em; height: 1.05em; flex: none; }
.nav nav .nav-gh, .btn, .foot-links a { display: inline-flex; align-items: center; gap: 0.45rem; }
.theme { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-left: -0.35rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.theme:active { transform: scale(0.94); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) { .theme:hover { color: var(--ink); background: var(--bg-soft); } }
.theme svg { grid-area: 1 / 1; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.theme .i-moon { opacity: 0; transform: rotate(-45deg) scale(0.8); }
:root[data-theme-now="dark"] .theme .i-sun { opacity: 0; transform: rotate(45deg) scale(0.8); }
:root[data-theme-now="dark"] .theme .i-moon { opacity: 1; transform: none; }
.theme-fade, .theme-fade * { transition: background-color 250ms ease, color 250ms ease, box-shadow 250ms ease !important; }

/* ---------- Portada ---------- */
.hero { max-width: 68rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(2.5rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 56rem) { .hero { grid-template-columns: 1fr; } }
.eyebrow { margin: 0 0 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font: 400 0.95rem var(--sans); color: var(--muted); letter-spacing: 0.02em; }
.pill { display: inline-block; padding: 0.15rem 0.65rem; border: 1px solid var(--pink); border-radius: 999px; background: var(--pill-bg); color: var(--pill-ink); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 600; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--text); max-width: 34rem; margin: 1.25rem 0 2rem; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 10px; font: 700 1rem var(--sans); letter-spacing: 0.01em; text-decoration: none; transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, box-shadow 200ms ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.btn-primary { background: var(--blue); color: var(--on-blue); box-shadow: var(--shadow); }
.btn-quiet { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover { background: var(--blue-strong); color: var(--on-blue); }
    .btn-quiet:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted); }
}

/* Portada: la conversación es la pieza visual y el logo va pegado en su esquina, como un sticker
   (contorno blanco que sigue la forma; la sombra sigue el contorno). Se lee igual en claro y oscuro. */
.visual { position: relative; padding-top: 4.5rem; }
.sticker { position: absolute; top: 0; left: -1.75rem; z-index: 1; width: clamp(8rem, 14vw, 10.5rem); height: auto; transform: rotate(-7deg); filter: drop-shadow(0 1px 1px rgb(18 37 53 / 0.18)) drop-shadow(0 10px 18px rgb(18 37 53 / 0.16)); }
.visual .chat { margin-left: 1rem; }
@media (max-width: 56rem) {
    .visual { padding-top: 3.5rem; max-width: 30rem; }
    .sticker { width: 7.5rem; left: -0.5rem; }
    .visual .chat { margin-left: 0.75rem; }
}

/* Conversación ilustrativa */
.chat { margin: 0; padding: 1rem; border-radius: 18px; background: var(--chat-bg); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); font-family: var(--sans); font-size: 0.98rem; line-height: 1.45; }
.msg { border-radius: 14px; padding: 0.75rem 0.95rem; }
.msg-user { margin-left: auto; width: fit-content; max-width: 85%; background: var(--blue); color: var(--on-blue); border-bottom-right-radius: 4px; }
.msg-bot { margin-top: 0.75rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.msg-bot p { margin: 0.45rem 0; }
.tool { display: inline-flex; align-items: center; gap: 0.4rem; font: 400 0.82rem var(--mono); color: var(--muted); padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--bg-soft); }
.tool-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--green); }
.due { list-style: none; margin: 0.5rem 0; padding: 0; }
.due li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.due li:first-child { border-top: 0; }
.due time { color: var(--muted); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.src { font-size: 0.85rem; color: var(--muted); }

/* Barra tricolor del banner: azul, verde y rosa */
.tribar { display: flex; height: 6px; }
.tribar span:nth-child(1) { flex: 6; background: #00529b; }
.tribar span:nth-child(2) { flex: 3; background: #2da343; }
.tribar span:nth-child(3) { flex: 1; background: #c887b9; }

/* ---------- Secciones ---------- */
.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band-soft { background: var(--bg-soft); }
.kicker { margin: 0 0 0.6rem; font: 400 1rem var(--serif); font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--blue); }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 48rem) { .cols { grid-template-columns: 1fr; } }
.card { padding: 1.6rem 1.6rem 1.4rem; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.card-sub { margin: 0.25rem 0 1rem; font: 400 0.95rem var(--sans); color: var(--muted); }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0.4rem 0 0.4rem 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.95rem; width: 0.7rem; height: 0.38rem; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 56rem) { .steps { grid-template-columns: 1fr; } }
.step { padding: 1.5rem; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.step p { margin: 0.6rem 0 0; }
.num { font-style: italic; font-weight: 400; color: var(--muted); margin-right: 0.15rem; }
.ico { width: 44px; height: 44px; margin-bottom: 1rem; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.facts { margin: 0; display: grid; gap: 0.25rem; }
.facts > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-weight: 600; color: var(--ink); font-size: 1.15rem; }
.facts dd { margin: 0.3rem 0 0; }

.code { position: relative; margin: 1.5rem 0; border-radius: 14px; background: var(--code-bg); color: var(--code-ink); }
.code pre { margin: 0; padding: 1.25rem 1.25rem 1.25rem 1.4rem; overflow-x: auto; font: 400 0.98rem/1.7 var(--mono); }
@media (max-width: 40rem) { .code pre { padding-top: 3.25rem; } }
.copy { position: absolute; top: 0.6rem; right: 0.6rem; min-height: 2.25rem; padding: 0 0.85rem; border: 0; border-radius: 8px; background: rgb(255 255 255 / 0.1); color: var(--code-ink); font: 700 0.85rem var(--sans); letter-spacing: 0.02em; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.copy:active { transform: scale(0.97); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) { .copy:hover { background: rgb(255 255 255 / 0.18); } }
.copy[data-done] { background: var(--green); color: #fff; }

/* ---------- Pie ---------- */
.foot { background: var(--bg); }
.foot-inner { padding-top: 2.25rem; padding-bottom: 3rem; font: 400 0.95rem/1.55 var(--sans); color: var(--muted); }
.foot-inner p { margin: 0 0 1rem; max-width: 46rem; }
.foot-inner strong { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.made { margin: 1.5rem 0 0; }
.me { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.85rem; color: var(--muted); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); transition: color 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out); }
.me:active { transform: scale(0.97); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) { .me:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted); } }

/* ---------- Movimiento ----------
   Entrada de la portada: una vez, opacidad + 8 px, escalonada 60 ms. Secciones: revelado único
   al entrar en pantalla. Nada bloquea la interacción ni se repite. */
.js [data-enter] { opacity: 0; transform: translateY(8px); }
.js [data-enter].is-in { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.js [data-reveal] { opacity: 0; transform: translateY(12px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms); }

@media (prefers-reduced-motion: reduce) {
    .js [data-enter], .js [data-reveal] { transform: none; }
    .js [data-enter].is-in, .js [data-reveal].is-in { transition: opacity 200ms ease; transition-delay: 0ms; }
    .btn, .copy, .theme, .me { transition: background-color 200ms ease, color 200ms ease; }
    .btn:active, .copy:active, .theme:active, .me:active { transform: none; }
    .theme svg { transition: opacity 200ms ease; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
    .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .chat { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    :root { --line: currentColor; --muted: var(--text); }
    .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
