/* ============================================
   Python UIO — Design tokens
   ============================================ */
:root {
    --bg: #0A0E14;
    --bg-elev: #10151E;
    --surface: rgba(255, 255, 255, 0.028);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #E6EDF3;
    --text-dim: #8B97A8;

    --blue: #4B8BBE;
    --blue-bright: #6BA8D8;
    --yellow: #FFD43B;
    --green: #7EE787;
    --purple: #D2A8FF;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-code: 'Fira Code', ui-monospace, monospace;

    --radius: 14px;
    --radius-lg: 20px;
    --container: 1140px;

    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Efecto PowerPoint: Fuerza el encaje exacto en la sección */
    scroll-snap-type: y mandatory;
    
    /* Oculta la barra de scroll en Firefox */
    scrollbar-width: none; 
}

/* Oculta la barra de scroll en Chrome, Safari y Edge */
::-webkit-scrollbar {
    display: none;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: rgba(255, 212, 59, 0.28); color: #fff; }

/* ============================================
   Ambiente: orbes + rejilla
   ============================================ */
.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.5;
}

.orb-blue {
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(75, 139, 190, 0.55), transparent 70%);
    top: -180px; left: -140px;
    animation: float-a 22s ease-in-out infinite;
}

.orb-yellow {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(255, 212, 59, 0.24), transparent 70%);
    top: 8%; right: -160px;
    animation: float-b 26s ease-in-out infinite;
}

@keyframes float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(70px, 60px) scale(1.12); }
}
@keyframes float-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-60px, 80px) scale(1.08); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

main { position: relative; z-index: 1; }

/* Configuración de las "Diapositivas" (Slide) */
.section,
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(56px, 8vh, 112px) 0;
    scroll-snap-align: start; /* Ancla la vista a la parte superior de la sección */
}

.text-center { text-align: center; }

.section-head { max-width: 860px; margin-bottom: clamp(34px, 5vh, 62px); }
.text-center .section-head { margin-left: auto; margin-right: auto; }

/* ============================================
   Tipografía
   ============================================ */
.eyebrow {
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: var(--blue-bright);
    letter-spacing: 0.06em;
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(1.95rem, min(4.4vw, 5.6vh), 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(100deg, #FFD43B 0%, #FFE9A0 44%, #7FC4F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 62ch;
    margin-bottom: 18px;
}
.lead-center { margin-left: auto; margin-right: auto; }

/* ============================================
   Botones
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.97rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.22s ease, box-shadow 0.22s ease,
                background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn .arrow { transition: transform 0.22s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

.btn-primary {
    background: var(--yellow);
    color: #0A0E14;
    box-shadow: 0 6px 24px rgba(255, 212, 59, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(255, 212, 59, 0.34);
}

.btn-outline {
    border-color: var(--border-strong);
    color: var(--text);
    background: var(--surface);
}
.btn-outline:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    transform: translateY(-2px);
}

.btn-ghost {
    color: var(--text-dim);
    padding-left: 8px;
    padding-right: 8px;
}
.btn-ghost:hover { color: var(--yellow); }

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 16px 32px;
    background: rgba(10, 14, 20, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.site-header.scrolled {
    background: rgba(10, 14, 20, 0.88);
    border-bottom-color: var(--border);
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-code);
    font-weight: 600;
    font-size: 1.02rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand-mark { filter: drop-shadow(0 0 10px rgba(255, 212, 59, 0.45)); }
.brand-accent { color: var(--yellow); }

.site-nav {
    display: flex;
    gap: 30px;
    margin-left: auto;
}
.site-nav a {
    font-size: 0.93rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}
.site-nav a:hover { color: #fff; }

.header-cta { flex-shrink: 0; }

/* ============================================
   Hero
   ============================================ */
.hero {
    padding: clamp(88px, 12vh, 144px) 0 clamp(48px, 7vh, 88px);
}

.hero-inner { text-align: center; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}
.badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero-title {
    font-size: clamp(2.5rem, min(7vw, 8.8vh), 5.2rem);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: clamp(16px, 2.6vh, 26px);
}

.hero-sub {
    font-size: clamp(1.02rem, min(1.9vw, 2.4vh), 1.32rem);
    line-height: 1.6;
    color: var(--text-dim);
    max-width: 680px;
    margin: 0 auto clamp(24px, 4vh, 42px);
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: clamp(20px, 3.4vh, 34px);
}

.hero-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 28px;
    list-style: none;
    margin-top: clamp(24px, 4.4vh, 46px);
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-dim);
}
.hero-meta li { display: flex; align-items: center; gap: 9px; }
.hero-meta li::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--blue);
}

/* ============================================
   Terminal / code
   ============================================ */
.terminal,
.code-card {
    background: rgba(3, 6, 12, 0.82);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.terminal {
    max-width: 640px;
    margin: 0 auto;
}

.code-card-center {
    max-width: 720px;
    margin: 0 auto;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 15px;
    background: rgba(255, 255, 255, 0.035);
    border-bottom: 1px solid var(--border);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red    { background: #FF5F57; }
.dot.yellow { background: #FEBC2E; }
.dot.green  { background: #28C840; }

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    padding-right: 40px;
    font-family: var(--font-code);
    font-size: 0.76rem;
    color: #6E7A8C;
}

.terminal-body {
    padding: 20px 22px;
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: var(--green);
    min-height: 62px;
    word-break: break-word;
}
.prompt { color: var(--blue-bright); }
.cursor { animation: blink 1.1s step-end infinite; color: var(--green); }
@keyframes blink { 50% { opacity: 0; } }

.code-body {
    padding: 22px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--text);
    overflow-x: auto;
}
.c-kw   { color: #FF7B72; }
.c-cls  { color: var(--yellow); }
.c-fn   { color: var(--purple); }
.c-str  { color: #A5D6FF; }
.c-cmt  { color: #6E7A8C; font-style: italic; }
.c-self { color: #FFA657; }
.c-op   { color: #FF7B72; }

/* ============================================
   Cards
   ============================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: clamp(13px, 2.2vh, 20px);
}

.card {
    position: relative;
    padding: clamp(20px, 3vh, 30px) 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(75, 139, 190, 0.14), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
.card:hover::before { opacity: 1; }

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(75, 139, 190, 0.13);
    border: 1px solid rgba(75, 139, 190, 0.24);
    font-size: 1.35rem;
    margin-bottom: clamp(11px, 1.9vh, 18px);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 9px;
    letter-spacing: -0.01em;
}
.card p {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin: 0;
}

.card-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    background: linear-gradient(150deg, rgba(255, 212, 59, 0.11), rgba(75, 139, 190, 0.07));
    border-color: rgba(255, 212, 59, 0.24);
}
.card-cta .btn { margin-top: 14px; }

/* ============================================
   Panels (speakers / CTA final)
   ============================================ */
.panel {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 56px;
    align-items: center;
    padding: 60px;
    background: linear-gradient(150deg, var(--bg-elev), rgba(10, 14, 20, 0.7));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--yellow), var(--blue), transparent);
}
.panel .lead { margin-bottom: 22px; }
.panel-aside { display: flex; justify-content: center; }

.check-list {
    list-style: none;
    margin-bottom: 30px;
}
.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 0.97rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.check-list li::before {
    content: "✓";
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
}

.final-cta .hero-actions { justify-content: flex-start; margin-top: 26px; }

/* QR */
.qr-card {
    background: #fff;
    padding: 18px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
}
.qr-card:hover { transform: scale(1.03) rotate(-1deg); }
.qr-img { width: 190px; height: auto; border-radius: 8px; margin: 0 auto; }
.qr-label {
    margin-top: 12px;
    font-family: var(--font-code);
    font-size: 0.82rem;
    font-weight: 600;
    color: #0A0E14;
}

/* ============================================
   Sponsors
   ============================================ */
.sponsors {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(16px, 2.6vh, 28px);
    margin: clamp(30px, 5.4vh, 60px) 0 clamp(26px, 4.6vh, 52px);
}
.sponsor {
    width: clamp(240px, 27vw, 340px);
    height: clamp(150px, 17vw, 210px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, background 0.3s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
}
.sponsor:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translateY(-6px);
}
.sponsor img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

/* Partner confirmado: destaca sobre los espacios libres */
.sponsor-featured {
    background: linear-gradient(150deg, rgba(75, 139, 190, 0.10), rgba(255, 212, 59, 0.05));
    border-color: rgba(75, 139, 190, 0.30);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}
.sponsor-featured:hover {
    border-color: var(--yellow);
    box-shadow: 0 18px 50px rgba(255, 212, 59, 0.14);
}

.sponsor-empty {
    border-style: dashed;
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: #5A6577;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 44px 0;
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a {
    font-size: 0.92rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--yellow); }
.footer-note { font-size: 0.88rem; color: #5A6577; }

/* ============================================
   Animaciones de entrada
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

.cards .reveal:nth-child(2) { transition-delay: 0.07s; }
.cards .reveal:nth-child(3) { transition-delay: 0.14s; }
.cards .reveal:nth-child(4) { transition-delay: 0.21s; }
.cards .reveal:nth-child(5) { transition-delay: 0.28s; }
.cards .reveal:nth-child(6) { transition-delay: 0.35s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 940px) {
    .panel {
        grid-template-columns: 1fr; /* ¡Esta línea estaba desaparecida y rompía tu imagen! */
        gap: 40px;
        padding: 44px 32px;
        text-align: center;
    }
    .panel .lead, .panel .lead-center { margin-left: auto; margin-right: auto; }
    .check-list { display: inline-block; text-align: left; }
    .final-cta .hero-actions,
    .panel .hero-actions { justify-content: center; }
}

@media (max-width: 860px) {
    .site-nav { display: none; }
}

/* En pantallas bajas o angostas deshabilitamos el encaje mandatory para que no corte el contenido */
@media (max-height: 700px), (max-width: 640px) {
    html { scroll-snap-type: none; }
    .section, .hero { min-height: auto; }
}

@media (max-width: 640px) {
    .section { padding: 84px 0; }
    .site-header { padding: 14px 20px; }
    .hero { padding: 120px 0 70px; }
    .panel { padding: 36px 22px; }
    .btn { padding: 13px 22px; font-size: 0.92rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { justify-content: center; }
    .terminal-body { font-size: 0.82rem; padding: 17px; }
    .code-body { font-size: 0.74rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .hero-meta { gap: 8px 18px; font-size: 0.8rem; }
}

/* Accesibilidad: respeta preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ============================================
   Footer Persistente de Patrocinadores (Estilo PowerPoint)
   ============================================ */
.presentation-footer {
    position: fixed;
    bottom: 24px;
    right: 32px;
    z-index: 90; /* Por encima de las diapositivas, debajo del header */
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(10, 14, 20, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 22px;
    border-radius: 100px;
    border: 1px solid var(--border);
    opacity: 0.7; /* Ligeramente transparente para no distraer */
    transition: all 0.3s ease;
}

.presentation-footer:hover {
    opacity: 1;
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.presentation-sponsor-text {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.presentation-sponsor-logo {
    height: 22px;
    width: auto;
    /* Efecto para que resalte sutilmente */
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.presentation-footer:hover .presentation-sponsor-logo {
    filter: brightness(1.1);
}

/* Adaptación para pantallas pequeñas (celulares) */
@media (max-width: 640px) {
    .presentation-footer {
        bottom: 16px;
        right: 16px;
        padding: 8px 16px;
    }
    
    .presentation-sponsor-text {
        /* Ocultamos el texto en móvil para que el logo no ocupe mucho espacio */
        display: none; 
    }
    
    .presentation-sponsor-logo {
        height: 18px;
    }
}