/* ============================================================
   Linktree CJA — CSS puro (sin Tailwind)
   ============================================================ */

/* ----- Variables ----- */
:root {
    --bg:            #0f172a;
    --bg-deep:       #0a1020;
    --primary:       #3b82f6;
    --primary-soft:  rgba(59, 130, 246, 0.2);
    --text:          #f1f5f9;
    --text-muted:    #94a3b8;
    --card-bg:       rgba(255, 255, 255, 0.05);
    --card-border:   rgba(255, 255, 255, 0.1);
    --btn-bg:        #ffffff;
    --btn-text:      #0f172a;
    --btn-hover:     #f1f5f9;
    --radius-xl:     1.5rem;
    --radius-lg:     1rem;
    --radius-pill:   9999px;
    --shadow-lg:     0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --nav-bg:        rgba(255, 255, 255, 0.85);
    --transition:    200ms ease;
    --max-width:     28rem;     /* 448px */
}

/* ----- Reset / base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Fondo con gradiente radial azul (igual al React) */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(
        circle at 50% 0%,
        var(--primary-soft) 0%,
        transparent 75%
    );
}

/* ----- Layout principal ----- */
.main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 7rem 1rem 2rem;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ----- Navbar fija ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 1rem;
    pointer-events: none;
}

.navbar__inner {
    pointer-events: auto;
    max-width: 80rem;
    margin: 0 auto;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar__logo {
    height: 2.5rem;
    width: auto;
    display: block;
}

.navbar__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    gap: 2.5rem;
}

.navbar__link {
    color: #475569;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.navbar__link:hover {
    color: #0f172a;
}

.navbar__link.is-active {
    color: var(--primary);
    font-weight: 700;
}

.navbar__link.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* ----- Logo y títulos ----- */
.brand-logo {
    height: 9rem;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 1.5rem auto 0;
}

.title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 1.75rem 0 0;
    color: var(--text);
}

.subtitle {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
}

.coordination {
    margin: 1rem 0 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-pill);
}

.coordination::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.coordination--home {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.coordination--home::before {
    background: var(--text-muted);
    box-shadow: 0 0 6px rgba(148, 163, 184, 0.5);
}

/* ----- Card contenedor (los 4 botones) ----- */
.card {
    width: 100%;
    max-width: var(--max-width);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-top: 1.5rem;
}

.links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ----- Botones de links ----- */
.link-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 700;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    transition: background var(--transition), transform 120ms ease;
    will-change: transform;
}

.link-btn:hover {
    background: var(--btn-hover);
}

.link-btn:active {
    transform: scale(0.98);
}

.link-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.link-btn__icon {
    position: absolute;
    left: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--btn-text);
}

.link-btn__icon .icon {
    width: 1.4rem;
    height: 1.4rem;
}

.link-btn__label {
    line-height: 1;
}

/* ----- Footer ----- */
.footer {
    background: #ffffff;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.footer__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer__credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0;
    color: #4b5563;
    font-size: 0.875rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.footer__credit:hover .footer__logo {
    transform: scale(1.15) rotate(8deg);
}

.footer__logo {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 200ms ease;
}

/* ----- Confetti ----- */
.confetti-piece {
    position: fixed;
    width: var(--size, 8px);
    height: var(--size, 8px);
    z-index: 9999;
    pointer-events: none;
    top: 0;
    left: 0;
    border-radius: 2px;
    animation: confetti-fall var(--duration, 2s) ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--r, 360deg));
        opacity: 0;
    }
}

/* ----- Animaciones (clases usadas por animations.js) ----- */
.fade-in,
.stagger-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.fade-in.is-visible,
.stagger-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.is-loaded .fade-in,
body.is-loaded .stagger-in {
    /* Fallback: si JS no carga, se ve igual */
    opacity: 1;
    transform: none;
}

/* ----- Responsive ----- */
@media (min-width: 768px) {
    .navbar__links {
        display: flex;
    }
    .brand-logo {
        height: 11rem;
    }
    .title {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }
    .navbar__inner {
        padding: 0.4rem 1rem;
    }
    .navbar__logo {
        height: 2rem;
    }
    .brand-logo {
        height: 6rem;
    }
    .title {
        font-size: 1.5rem;
    }
    .card {
        padding: 1.25rem;
    }
    .main {
        padding-top: 5.5rem;
    }
}

/* Accesibilidad: respetar usuarios con reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .fade-in,
    .stagger-in {
        opacity: 1 !important;
        transform: none !important;
    }
}
