/* =========================================================================
   Tutoriales de ConnectCampus — Universidad Central
   Paleta institucional (paleta_de_color.jpg):
     #183c5a azul marino · #6abdbc turquesa · #d7de4f lima · #da4357 rojo
   Tipografía: Nexa · Movimiento: "Entrada al campus" (motion.js)

   Regla de contraste que gobierna el uso del color:
     · Texto  → marino sobre claro, blanco/lima sobre marino.
     · Turquesa, lima y rojo → rellenos, bordes y acentos, NUNCA texto
       pequeño sobre blanco (no alcanzan 4.5:1).
   ========================================================================= */

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaThin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaThinItalic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaBook.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaBookItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaRegularItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaXBoldItalic.otf') format('opentype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaBlack.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('fonts/NexaBlackItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* Permite animar el flotado sin pisar el transform del parallax.
   Si el navegador no soporta @property, var(--floatY, 0px) cae a 0px. */
@property --floatY {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

:root {
    /* --- Paleta institucional --- */
    --brand-navy: #183c5a;
    --brand-navy-deep: #0f2a40;
    --brand-navy-soft: #2a5a7d;
    --brand-teal: #6abdbc;
    --brand-teal-deep: #4a9d9c;
    --brand-lime: #d7de4f;
    --brand-red: #da4357;
    --brand-red-deep: #b8354a;

    /* Tintes translúcidos para acentos y sombras de color */
    --tint-teal: rgba(106, 189, 188, 0.35);
    --tint-lime: rgba(215, 222, 79, 0.35);
    --tint-red: rgba(218, 67, 87, 0.30);
    --tint-navy: rgba(24, 60, 90, 0.28);

    /* --- Superficies y texto --- */
    --color-canvas: #ffffff;
    --color-surface: #f4f8f9;
    --color-surface-soft: #fafcfc;
    --color-hairline: #dde7ea;
    --color-hairline-soft: #eaf1f3;

    --color-ink: var(--brand-navy);
    --color-body: #3e5060;
    --color-muted: #6b7c89;
    --color-on-dark: #ffffff;
    --color-on-dark-muted: rgba(255, 255, 255, 0.72);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    --shadow-1: rgba(24, 60, 90, 0.06) 0px 1px 2px 0px;
    --shadow-2: rgba(24, 60, 90, 0.10) 0px 6px 18px -2px;
    --shadow-3: rgba(24, 60, 90, 0.18) 0px 24px 48px -12px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nexa', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--color-body);
    background-color: var(--color-canvas);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================================
   Barra de progreso — recorre toda la paleta
   ========================================================================= */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 200;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--brand-teal) 0%,
        var(--brand-lime) 40%,
        var(--brand-red) 75%,
        var(--brand-navy) 100%
    );
    transform: scaleX(var(--sp, 0));
    transform-origin: 0 50%;
}

/* =========================================================================
   Hero — momento focal con profundidad
   ========================================================================= */

.hero {
    --p: 0;
    --mx: 0;
    --my: 0;

    position: relative;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 20% 15%, rgba(106, 189, 188, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 85% 80%, rgba(218, 67, 87, 0.22) 0%, transparent 60%),
        linear-gradient(155deg, var(--brand-navy-deep) 0%, var(--brand-navy) 48%, #1f5570 100%);
}

/* Bruma de color que respira muy despacio. */
.hero::after {
    content: '';
    position: absolute;
    inset: -20%;
    pointer-events: none;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(215, 222, 79, 0.14) 0%,
        transparent 55%
    );
    animation: heroBreathe 18s ease-in-out infinite;
}

@keyframes heroBreathe {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.7; }
    50%      { transform: scale(1.18) translate(3%, -3%); opacity: 1; }
}

/* --- Capas de profundidad ------------------------------------------------ */

.hero-depth {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-depth > * {
    position: absolute;
    display: block;
}

.hero-glow {
    top: 50%;
    left: 50%;
    width: 120vmax;
    height: 120vmax;
    margin: -60vmax 0 0 -60vmax;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(106, 189, 188, 0.30) 0%,
        rgba(215, 222, 79, 0.10) 40%,
        transparent 68%
    );
    transform:
        translate3d(calc(var(--mx) * 6px), calc(var(--p) * -30px + var(--my) * 6px), 0)
        scale(calc(1 + var(--p) * 0.12));
}

.hero-ring {
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid;
}

.hero-ring--1 {
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    border-color: rgba(106, 189, 188, 0.75);
    box-shadow: 0 0 60px rgba(106, 189, 188, 0.20) inset;
    transform:
        translate3d(calc(var(--mx) * 10px), calc(var(--p) * -70px + var(--my) * 10px), 0)
        scale(calc(1 + var(--p) * 0.34));
    opacity: calc(1 - var(--p) * 0.9);
}

.hero-ring--2 {
    width: 760px;
    height: 760px;
    margin: -380px 0 0 -380px;
    border-color: rgba(215, 222, 79, 0.45);
    transform:
        translate3d(calc(var(--mx) * 16px), calc(var(--p) * -110px + var(--my) * 16px), 0)
        scale(calc(1 + var(--p) * 0.5));
    opacity: calc(1 - var(--p) * 0.95);
}

.hero-ring--3 {
    width: 1120px;
    height: 1120px;
    margin: -560px 0 0 -560px;
    border-color: rgba(218, 67, 87, 0.30);
    transform:
        translate3d(calc(var(--mx) * 22px), calc(var(--p) * -150px + var(--my) * 22px), 0)
        scale(calc(1 + var(--p) * 0.66));
    opacity: calc(1 - var(--p));
}

/* Tarjetas de la plataforma: cada una toma un color de la paleta. */
.hero-plate {
    width: 190px;
    height: 122px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow-2);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: plateFloat 7s ease-in-out infinite;
}

.hero-plate::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 46px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--plate-accent, var(--brand-teal));
    box-shadow: 0 0 14px var(--plate-accent, var(--brand-teal));
}

.hero-plate::after {
    content: '';
    position: absolute;
    top: 32px;
    left: 14px;
    right: 14px;
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.30);
    box-shadow: 0 12px 0 rgba(255, 255, 255, 0.20), 0 24px 0 rgba(255, 255, 255, 0.12);
}

@keyframes plateFloat {
    0%, 100% { --floatY: 0px; }
    50%      { --floatY: -16px; }
}

.hero-plate--a {
    top: 16%;
    left: 8%;
    --plate-accent: var(--brand-teal);
    animation-delay: 0s;
    transform:
        translate3d(calc(var(--mx) * 30px), calc(var(--p) * -230px + var(--my) * 26px + var(--floatY, 0px)), 0)
        rotate(-7deg)
        scale(calc(1 + var(--p) * 0.85));
    opacity: calc(1 - var(--p) * 1.5);
}

.hero-plate--b {
    top: 24%;
    right: 9%;
    --plate-accent: var(--brand-lime);
    animation-delay: -1.8s;
    transform:
        translate3d(calc(var(--mx) * -26px), calc(var(--p) * -260px + var(--my) * 22px + var(--floatY, 0px)), 0)
        rotate(6deg)
        scale(calc(1 + var(--p) * 0.95));
    opacity: calc(1 - var(--p) * 1.5);
}

.hero-plate--c {
    bottom: 15%;
    left: 14%;
    --plate-accent: var(--brand-red);
    animation-delay: -3.5s;
    transform:
        translate3d(calc(var(--mx) * 38px), calc(var(--p) * -300px + var(--my) * 30px + var(--floatY, 0px)), 0)
        rotate(5deg)
        scale(calc(1 + var(--p) * 1.1));
    opacity: calc(1 - var(--p) * 1.7);
}

.hero-plate--d {
    bottom: 20%;
    right: 12%;
    --plate-accent: var(--brand-teal);
    animation-delay: -5.2s;
    transform:
        translate3d(calc(var(--mx) * -34px), calc(var(--p) * -280px + var(--my) * 28px + var(--floatY, 0px)), 0)
        rotate(-8deg)
        scale(calc(1 + var(--p) * 1));
    opacity: calc(1 - var(--p) * 1.7);
}

/* --- Contenido del hero -------------------------------------------------- */

.hero-content {
    position: relative;
    z-index: 2;
    transform: translate3d(0, calc(var(--p) * -60px), 0) scale(calc(1 - var(--p) * 0.05));
    opacity: calc(1 - var(--p) * 1.3);
}

.header-logo {
    height: 62px;
    margin-bottom: 24px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--brand-lime);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(34px, 6vw, 68px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1.6px;
    color: var(--color-on-dark);
}

/* Cada palabra llega por separado. */
.hero h1 span {
    display: inline-block;
    animation: wordRise 700ms var(--ease-out) both;
}

.hero h1 span:nth-child(1) { animation-delay: 140ms; }
.hero h1 span:nth-child(2) { animation-delay: 220ms; }
.hero h1 span:nth-child(3) { animation-delay: 300ms; color: var(--brand-teal); }

@keyframes wordRise {
    from { opacity: 0; transform: translate3d(0, 26px, 0); }
    to   { opacity: 1; transform: none; }
}

.hero .subtitle {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-on-dark-muted);
    margin-top: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 34px;
}

.hero-content > * {
    animation: heroRise 700ms var(--ease-out) both;
}

.hero-content > .header-logo  { animation-delay: 0ms; }
.hero-content > .hero-eyebrow { animation-delay: 70ms; }
.hero-content > h1            { animation: none; }
.hero-content > .subtitle     { animation-delay: 380ms; }
.hero-content > .hero-actions { animation-delay: 460ms; }

@keyframes heroRise {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
    to   { opacity: 1; transform: none; }
}

/* --- Botones ------------------------------------------------------------- */

.btn {
    position: relative;
    display: inline-block;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 200ms var(--ease-out),
                box-shadow 200ms var(--ease-out),
                background-color 200ms var(--ease-out),
                border-color 200ms var(--ease-out),
                color 200ms var(--ease-out);
}

.btn-primary {
    background: var(--brand-red);
    color: #fff;
    box-shadow: 0 6px 20px var(--tint-red);
}

.btn-primary:hover {
    background: var(--brand-red-deep);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--tint-red);
}

.btn-secondary {
    background: transparent;
    color: var(--brand-lime);
    border-color: var(--brand-lime);
}

.btn-secondary:hover {
    background: var(--brand-lime);
    color: var(--brand-navy);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--tint-lime);
}

.btn:focus-visible {
    outline: 3px solid var(--brand-lime);
    outline-offset: 3px;
}

/* --- Indicación de scroll ------------------------------------------------ */

.hero-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: var(--color-on-dark-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: calc(1 - var(--p) * 3);
}

.hero-hint-line {
    width: 2px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, transparent 0%, var(--brand-lime) 100%);
    transform-origin: 50% 0;
    animation: hintPull 2.4s var(--ease-out) infinite;
}

@keyframes hintPull {
    0%, 100% { transform: scaleY(0.55); opacity: 0.5; }
    50%      { transform: scaleY(1);    opacity: 1; }
}

.hero.is-past .hero-hint-line {
    animation: none;
}

/* =========================================================================
   Cuerpo del sitio
   ========================================================================= */

.site-body {
    position: relative;
    z-index: 1;
    background: var(--color-canvas);
}

/* Navegación */
nav {
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-hairline);
    box-shadow: var(--shadow-1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li a {
    position: relative;
    display: block;
    color: var(--color-muted);
    text-decoration: none;
    padding: 20px 24px;
    font-size: 14px;
    font-weight: 700;
    transition: color 200ms var(--ease-out);
}

/* Subrayado que crece desde el centro. */
nav ul li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 12px;
    height: 3px;
    width: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-lime));
    transform: translateX(-50%);
    transition: width 250ms var(--ease-out);
}

nav ul li a:hover {
    color: var(--brand-navy);
}

nav ul li a:hover::after {
    width: calc(100% - 36px);
}

nav ul li a[aria-current="true"] {
    color: var(--brand-navy);
}

nav ul li a[aria-current="true"]::after {
    width: calc(100% - 36px);
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-red));
}

nav ul li a:focus-visible {
    outline: 3px solid var(--brand-teal);
    outline-offset: -4px;
    border-radius: var(--radius-sm);
}

main.container {
    padding: 72px 24px;
}

section {
    margin-bottom: 72px;
}

section[id] {
    scroll-margin-top: 76px;
}

h2 {
    position: relative;
    color: var(--brand-navy);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.6px;
    margin-bottom: 26px;
    padding-bottom: 18px;
}

/* Riel de la paleta bajo cada título, que se dibuja al aparecer. */
h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    max-width: 220px;
    border-radius: var(--radius-full);
    background: linear-gradient(
        90deg,
        var(--brand-teal) 0%,
        var(--brand-lime) 45%,
        var(--brand-red) 100%
    );
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 700ms var(--ease-out) 120ms;
}

.is-revealed h2::after {
    transform: scaleX(1);
}

/* Sin JS el riel también se ve. */
html:not(.js-motion) h2::after {
    transform: scaleX(1);
}

/* Intro */
.intro-section p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-body);
    padding: 32px 36px;
    background: linear-gradient(135deg, rgba(106, 189, 188, 0.12), rgba(215, 222, 79, 0.12));
    border-left: 5px solid var(--brand-teal);
    border-radius: var(--radius-lg);
}

/* Videos */
.section-description {
    font-size: 16px;
    color: var(--color-muted);
    margin-bottom: 32px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 26px;
    margin-top: 32px;
}

.video-card {
    background: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    border-top: 4px solid var(--accent, var(--brand-teal));
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 250ms var(--ease-out),
                transform 250ms var(--ease-out);
}

/* Cada tarjeta rota por la paleta. */
.video-card:nth-child(4n + 1) { --accent: var(--brand-teal); --accent-tint: var(--tint-teal); }
.video-card:nth-child(4n + 2) { --accent: var(--brand-lime); --accent-tint: var(--tint-lime); }
.video-card:nth-child(4n + 3) { --accent: var(--brand-red);  --accent-tint: var(--tint-red); }
.video-card:nth-child(4n + 4) { --accent: var(--brand-navy); --accent-tint: var(--tint-navy); }

.video-card:hover,
.video-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px var(--accent-tint, var(--tint-teal));
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: var(--color-surface);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 4px;
    color: var(--brand-navy);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.4;
}

/* Punto de color que crece al pasar el cursor. */
.video-card h3::before {
    content: '';
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, var(--brand-teal));
    transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.video-card:hover h3::before,
.video-card:focus-within h3::before {
    transform: scale(1.6);
    box-shadow: 0 0 0 5px var(--accent-tint, var(--tint-teal));
}

.video-card p {
    padding: 0 20px 20px;
    color: var(--color-muted);
    font-size: 14px;
}

/* Recursos */
.resources-section {
    background: linear-gradient(160deg, var(--color-surface) 0%, rgba(106, 189, 188, 0.10) 100%);
    padding: 38px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-hairline);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.resource-item {
    position: relative;
    background: var(--color-canvas);
    padding: 26px 26px 26px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-hairline);
    height: 100%;
    overflow: hidden;
    transition: box-shadow 250ms var(--ease-out),
                transform 250ms var(--ease-out);
}

/* Franja de color que se ensancha al pasar el cursor. */
.resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: var(--accent, var(--brand-teal));
    transition: width 250ms var(--ease-out);
}

.resources-grid > *:nth-child(4n + 1) { --accent: var(--brand-teal); --accent-tint: var(--tint-teal); }
.resources-grid > *:nth-child(4n + 2) { --accent: var(--brand-lime); --accent-tint: var(--tint-lime); }
.resources-grid > *:nth-child(4n + 3) { --accent: var(--brand-red);  --accent-tint: var(--tint-red); }
.resources-grid > *:nth-child(4n + 4) { --accent: var(--brand-navy); --accent-tint: var(--tint-navy); }

.resource-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.resource-item:hover,
.resource-item:has(.resource-link:focus-visible) {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px var(--accent-tint, var(--tint-teal));
}

.resource-item:hover::before,
.resource-item:has(.resource-link:focus-visible)::before {
    width: 10px;
}

.resource-link:focus-visible {
    outline: 3px solid var(--brand-navy);
    outline-offset: 3px;
    border-radius: var(--radius-md);
}

.resource-item h3 {
    color: var(--brand-navy);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
}

.resource-item p {
    color: var(--color-muted);
    font-size: 14px;
}

/* Contacto */
.contact-section {
    position: relative;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 80% at 15% 20%, rgba(106, 189, 188, 0.30) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 85% 85%, rgba(218, 67, 87, 0.22) 0%, transparent 60%),
        linear-gradient(135deg, var(--brand-navy-deep) 0%, var(--brand-navy) 60%, #1f5570 100%);
    color: var(--color-on-dark);
    padding: 72px 32px;
    border-radius: var(--radius-xl);
    margin-bottom: 0;
}

.contact-logo {
    height: 50px;
    margin-bottom: 24px;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.3));
}

.contact-section h2 {
    color: var(--color-on-dark);
    display: inline-block;
}

.contact-section h2::after {
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 50% 50%;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-lime));
}

.contact-section.is-revealed h2::after,
html:not(.js-motion) .contact-section h2::after {
    transform: translateX(-50%) scaleX(1);
}

.contact-section > p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--color-on-dark-muted);
}

.contact-info {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 26px 34px;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-top: 8px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.contact-info p {
    margin: 8px 0;
    font-size: 15px;
    color: var(--color-on-dark);
}

.contact-info strong {
    color: var(--brand-lime);
    font-weight: 700;
}

.contact-info a {
    color: var(--brand-teal);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

.contact-info a:hover {
    color: var(--brand-lime);
    border-bottom-color: var(--brand-lime);
}

/* Footer */
footer {
    position: relative;
    background: var(--brand-navy-deep);
    color: var(--color-on-dark-muted);
    text-align: center;
    padding: 38px 0;
}

/* Cinta con toda la paleta. */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--brand-teal) 0%,
        var(--brand-lime) 33%,
        var(--brand-red) 66%,
        var(--brand-teal) 100%
    );
}

footer p {
    margin: 4px 0;
    font-size: 14px;
}

footer p:first-child {
    color: var(--color-on-dark);
    font-weight: 700;
}

/* =========================================================================
   Revelado al entrar en pantalla
   ========================================================================= */

.js-motion [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 45ms);
}

.js-motion [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 900px) {
    .hero-plate,
    .hero-ring--3 {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 520px;
    }

    .header-logo {
        height: 48px;
    }

    nav ul li a {
        padding: 14px 16px;
        font-size: 13px;
    }

    nav ul li a::after {
        bottom: 8px;
    }

    main.container {
        padding: 48px 16px;
    }

    .resources-section {
        padding: 24px;
    }

    .video-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li a {
        border-bottom: 1px solid var(--color-hairline-soft);
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* =========================================================================
   Movimiento reducido: se quita el desplazamiento, se conserva el color
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero::after,
    .hero-plate,
    .hero-hint-line {
        animation: none;
    }

    .hero-glow,
    .hero-ring,
    .hero-plate,
    .hero-content {
        transform: none !important;
        opacity: 1 !important;
    }

    .hero-content > *,
    .hero h1 span {
        animation: none;
    }

    h2::after {
        transition: none;
        transform: scaleX(1);
    }

    .contact-section h2::after {
        transform: translateX(-50%) scaleX(1);
    }

    .btn:hover,
    .video-card:hover,
    .video-card:focus-within,
    .resource-item:hover,
    .resource-item:has(.resource-link:focus-visible) {
        transform: none;
    }

    .video-card:hover h3::before,
    .video-card:focus-within h3::before {
        transform: none;
    }

    .js-motion [data-reveal] {
        transform: none;
        transition: opacity 200ms linear;
        transition-delay: 0ms;
    }
}

/* Selección y scrollbar */
::selection {
    background-color: var(--brand-lime);
    color: var(--brand-navy);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: var(--radius-full);
    border: 3px solid var(--color-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-navy);
}
