/* ==========================================================================
   Corporativo Cortázar — Cinematic Dark Theme
   ========================================================================== */

/* ==========================================================================
   1. Variables y base
   ========================================================================== */
:root {
    color-scheme: dark;
    --cc-ink: #080a0f;
    --cc-ink-soft: #151922;
    --cc-paper: #f4f5f7;
    --cc-muted: #b8bdc7;
    --cc-red: #d92332;
    --cc-gold: #d9a62c;
}

html {
    min-width: 320px;
    background: var(--cc-ink);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--cc-paper);
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background:
        radial-gradient(
            ellipse at 17% 43%,
            rgba(75, 89, 112, 0.22),
            transparent 37%
        ),
        radial-gradient(
            ellipse at 84% 68%,
            rgba(154, 22, 34, 0.13),
            transparent 34%
        ),
        linear-gradient(
            118deg,
            #080a0f 0%,
            #11151d 48%,
            #090b10 100%
        );
}

/* ==========================================================================
   2. Fondo y layout del landing
   ========================================================================== */
.landing-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

/* Viñeta cinematográfica estática */
.landing-shell::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.018) 50%,
            transparent 100%
        ),
        radial-gradient(
            ellipse at center,
            transparent 28%,
            rgba(0, 0, 0, 0.46) 100%
        );
}

/* Aros decorativos estáticos */
.landing-shell::after {
    position: absolute;
    z-index: -1;
    right: -12rem;
    bottom: -20rem;
    width: 42rem;
    height: 42rem;
    content: "";
    border: 1px solid rgba(217, 35, 50, 0.10);
    border-radius: 50%;
    box-shadow:
        0 0 0 5rem rgba(217, 35, 50, 0.018),
        0 0 0 10rem rgba(217, 35, 50, 0.012);
    pointer-events: none;
}

.landing-content {
    width: min(100%, 1180px);
}

/* ==========================================================================
   3. Emblema
   ========================================================================== */
.brand-emblem {
    display: block;
    width: min(100%, 490px);
    max-height: 82vh;
    object-fit: contain;
    margin-inline: auto;
}

/* ==========================================================================
   4. Tipografía de marca
   ========================================================================== */
.brand-copy {
    position: relative;
    padding-block: 2rem;
}

.brand-kicker {
    color: var(--cc-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.42em;
}

.brand-title {
    color: #fff;
    font-size: clamp(2.5rem, 6vw, 5.8rem);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 0.98;
    text-wrap: balance;
    text-shadow: 0 3px 30px rgba(0, 0, 0, 0.42);
}

.brand-lead {
    max-width: 34rem;
    margin-inline: auto;
    color: var(--cc-muted);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    line-height: 1.6;
    text-wrap: pretty;
}

.brand-rule {
    width: 6rem;
    height: 0.28rem;
    border-radius: 99px;
    background: linear-gradient(
        90deg,
        var(--cc-red) 0 72%,
        var(--cc-gold) 72% 100%
    );
    box-shadow: 0 0 22px rgba(217, 35, 50, 0.20);
}

/* ==========================================================================
   5. Secciones generales
   ========================================================================== */
.cc-section {
    padding-block: clamp(3rem, 8vw, 6rem);
}

.cc-section-header {
    max-width: 52rem;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.cc-section-kicker {
    color: var(--cc-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.42em;
    margin-bottom: 0.75rem;
}

.cc-section-title {
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.cc-section-lead {
    color: var(--cc-muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.7;
    margin-bottom: 0;
    text-wrap: pretty;
}

/* ==========================================================================
   6. Cards (Quiénes somos y Contacto)
   ========================================================================== */
.cc-card {
    background: rgba(21, 25, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.cc-card:hover {
    border-color: rgba(217, 35, 50, 0.35);
    transform: translateY(-2px);
}

.cc-card-title {
    color: var(--cc-gold);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.cc-card-text {
    color: var(--cc-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.cc-card--contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Tarjeta de radio
   ========================================================================== */
.cc-radio-card {
    background: rgba(21, 25, 34, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.cc-radio-station {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

/* Botón circular de play/pause */
.cc-radio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12rem;
    height: 4.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--cc-red);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(217, 35, 50, 0.35);
    transition: background-color 0.2s ease, transform 0.2s ease,
        box-shadow 0.2s ease;
}

.cc-radio-btn:hover,
.cc-radio-btn:focus-visible {
    background: #b81c29;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 30px rgba(217, 35, 50, 0.5);
    outline: none;
}

.cc-radio-btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(217, 35, 50, 0.35),
        0 14px 30px rgba(217, 35, 50, 0.5);
}

.cc-radio-icon {
    display: block;
    width: 28px;
    height: 28px;
}

/* Alterna entre play y pause según el estado del botón */
.cc-radio-btn .cc-radio-icon--pause {
    display: none;
}

.cc-radio-btn.is-playing .cc-radio-icon--play {
    display: none;
}

.cc-radio-btn.is-playing .cc-radio-icon--pause {
    display: block;
}

/* Metadata */
.cc-radio-now-playing {
    margin: 1.25rem 0 0;
    color: var(--cc-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cc-radio-label {
    color: var(--cc-gold);
    font-weight: 700;
    margin-right: 0.35rem;
}

.cc-radio-track {
    color: var(--cc-paper);
}

@media (max-width: 575.98px) {
    .cc-radio-btn {
        width: 3.75rem;
        height: 3.75rem;
    }

    .cc-radio-icon {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================================================
   7. Enlaces y botones
   ========================================================================== */
.cc-link {
    color: var(--cc-paper);
    text-decoration: none;
    border-bottom: 1px solid rgba(217, 166, 44, 0.5);
    padding-bottom: 1px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cc-link:hover,
.cc-link:focus-visible {
    color: var(--cc-gold);
    border-bottom-color: var(--cc-gold);
}

.cc-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, transform 0.2s ease;
}

.cc-btn:hover,
.cc-btn:focus-visible {
    transform: translateY(-1px);
}

.cc-btn--solid {
    background: var(--cc-red);
    color: #fff;
    border: 1px solid var(--cc-red);
}

.cc-btn--solid:hover,
.cc-btn--solid:focus-visible {
    background: #b81c29;
    border-color: #b81c29;
    color: #fff;
}

.cc-btn--outline {
    background: transparent;
    color: var(--cc-paper);
    border: 1px solid rgba(217, 166, 44, 0.7);
}

.cc-btn--outline:hover,
.cc-btn--outline:focus-visible {
    background: rgba(217, 166, 44, 0.12);
    color: var(--cc-gold);
    border-color: var(--cc-gold);
}

/* ==========================================================================
   8. Botón flotante de WhatsApp con efecto de ondas
   ========================================================================== */
.cc-whatsapp-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        background-color 0.2s ease;
    isolation: isolate;
}

.cc-whatsapp-float:hover,
.cc-whatsapp-float:focus-visible {
    background: #1ebe5b;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    color: #fff;
}

.cc-whatsapp-icon {
    width: 1.6rem;
    height: 1.6rem;
    display: block;
    position: relative;
    z-index: 2;
}

/* Anillos de pulso */
.cc-whatsapp-float::before,
.cc-whatsapp-float::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.55);
    z-index: 1;
    pointer-events: none;
    animation: cc-whatsapp-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.cc-whatsapp-float::after {
    animation-delay: 1.2s;
}

@keyframes cc-whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    70% {
        transform: scale(1.9);
        opacity: 0;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* Pausa el pulso al pasar el ratón */
.cc-whatsapp-float:hover::before,
.cc-whatsapp-float:hover::after,
.cc-whatsapp-float:focus-visible::before,
.cc-whatsapp-float:focus-visible::after {
    animation-play-state: paused;
}

/* ==========================================================================
   9. Animaciones del hero
   ========================================================================== */
@keyframes reveal {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes emblem-glow {
    0%, 100% {
        filter:
            drop-shadow(0 24px 30px rgba(0, 0, 0, 0.65))
            drop-shadow(0 0 18px rgba(217, 35, 50, 0.75))
            drop-shadow(0 0 38px rgba(217, 35, 50, 0.45));
    }

    50% {
        filter:
            drop-shadow(0 24px 30px rgba(0, 0, 0, 0.65))
            drop-shadow(0 0 32px rgba(217, 35, 50, 1))
            drop-shadow(0 0 70px rgba(217, 35, 50, 0.75))
            drop-shadow(0 0 100px rgba(120, 10, 20, 0.4));
    }
}

@media (prefers-reduced-motion: no-preference) {
    .brand-emblem {
        animation:
            reveal 0.8s ease-out both,
            emblem-glow 3.5s ease-in-out 0.8s infinite;
    }

    .brand-copy {
        animation: reveal 0.8s ease-out 0.15s both;
    }
}

/* ==========================================================================
   10. Media queries
   ========================================================================== */

/* Tabletas y pantallas medianas */
@media (max-width: 991.98px) {
    .landing-content {
        row-gap: 1rem !important;
    }

    .brand-emblem {
        width: min(76vw, 370px);
        max-height: 54vh;
    }

    .brand-copy {
        padding-block: 0.25rem 1rem;
    }

    .brand-title {
        font-size: clamp(2.45rem, 9vw, 4rem);
    }
}

/* Teléfonos */
@media (max-width: 575.98px) {
    .brand-emblem {
        width: min(78vw, 315px);
    }

    .brand-kicker {
        font-size: 0.7rem;
        letter-spacing: 0.34em;
    }

    /* Evita que el botón flotante tape el último contenido */
    body {
        padding-bottom: 4.5rem;
    }
}

/* Escritorio: ajustes del botón flotante */
@media (min-width: 992px) {
    .brand-lead {
        margin-inline: 0;
    }

    .cc-whatsapp-float {
        right: 1.5rem;
        bottom: 1.5rem;
        width: 3.75rem;
        height: 3.75rem;
    }

    .cc-whatsapp-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* ==========================================================================
   11. Respeto a las preferencias de movimiento
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .brand-emblem,
    .brand-copy {
        animation: none;
    }

    .cc-whatsapp-float::before,
    .cc-whatsapp-float::after {
        animation: none;
    }

    .cc-card,
    .cc-btn,
    .cc-link,
    .cc-whatsapp-float {
        transition: none;
    }
}
