/* ============================================
   Casino Escazú · Ambiente de Desarrollo
   Hoja de estilos
   ============================================ */

:root {
    /* Paleta */
    --color-bg:         #0b1410;
    --color-bg-deep:    #050a08;
    --color-surface:    #f4ecd8;
    --color-surface-2:  #ebe0c4;
    --color-ink:        #1a2420;
    --color-ink-soft:   #4a5550;
    --color-emerald:    #0f5132;
    --color-emerald-2:  #1a7a4c;
    --color-gold:       #c9a961;
    --color-gold-soft:  #e0c787;
    --color-gold-deep:  #8a6d2e;
    --color-warning:    #d97757;
    --color-line:       rgba(201, 169, 97, 0.25);

    /* Tipografía */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Cormorant Garamond', Georgia, serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
    min-height: 100vh;
}

body {
    font-family: var(--font-body);
    background:
        radial-gradient(ellipse at top, rgba(26, 122, 76, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at bottom, rgba(201, 169, 97, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-deep) 100%);
    color: var(--color-surface);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    padding: 56px 24px 64px;
}

/* Textura de ruido para dar carácter */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
}

/* =====================
   Barra de estado
   ===================== */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(217, 119, 87, 0.18) 0%, rgba(217, 119, 87, 0.05) 100%);
    border-bottom: 1px solid rgba(217, 119, 87, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #f4ddd1;
}

.status-bar__left,
.status-bar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-bar__label {
    opacity: 0.65;
}

.status-bar__value {
    font-weight: 500;
    color: #ffe3d5;
}

.status-bar__divider {
    opacity: 0.3;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-warning);
    box-shadow: 0 0 12px var(--color-warning);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

/* =====================
   Escenario principal
   ===================== */
.stage {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Ornamentos en las esquinas del stage */
.ornament {
    position: absolute;
    width: 80px;
    height: 80px;
    border-color: var(--color-gold);
    opacity: 0.4;
    pointer-events: none;
}
.ornament--tl { top: 20px;    left: -20px;   border-top: 1px solid;    border-left: 1px solid; }
.ornament--tr { top: 20px;    right: -20px;  border-top: 1px solid;    border-right: 1px solid; }
.ornament--bl { bottom: 40px; left: -20px;   border-bottom: 1px solid; border-left: 1px solid; }
.ornament--br { bottom: 40px; right: -20px;  border-bottom: 1px solid; border-right: 1px solid; }

/* =====================
   Tarjeta central
   ===================== */
.card {
    position: relative;
    width: 100%;
    background:
        linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
    color: var(--color-ink);
    padding: 64px 56px 48px;
    border: 1px solid var(--color-gold);
    box-shadow:
        0 0 0 1px rgba(201, 169, 97, 0.2),
        0 0 0 8px var(--color-bg-deep),
        0 0 0 9px rgba(201, 169, 97, 0.4),
        0 30px 60px -15px rgba(0, 0, 0, 0.8),
        0 0 80px -20px rgba(26, 122, 76, 0.3);
    animation: cardEnter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cinta superior */
.card__ribbon {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-warning);
    color: #2a0f07;
    padding: 6px 24px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card__eyebrow {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-gold-deep);
    margin-bottom: 16px;
    animation: fadeInUp 1s 0.4s both;
}

.card__title {
    font-family: var(--font-display);
    font-weight: 900;
    text-align: center;
    color: var(--color-ink);
    line-height: 0.95;
    margin-bottom: 28px;
    animation: fadeInUp 1s 0.5s both;
}

.card__title-line {
    display: block;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
}

.card__title-line--accent {
    font-style: italic;
    font-weight: 400;
    color: var(--color-emerald);
    margin-top: 4px;
    letter-spacing: -0.01em;
}

/* Divisor ornamental */
.card__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    animation: fadeInUp 1s 0.6s both;
}

.card__divider span {
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold-deep), transparent);
}

.card__body {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-ink);
    text-align: center;
    max-width: 56ch;
    margin: 0 auto 16px;
    animation: fadeInUp 1s 0.7s both;
}

.card__body--small {
    font-size: 1rem;
    color: var(--color-ink-soft);
    font-style: italic;
    animation: fadeInUp 1s 0.8s both;
}

.card__body strong {
    color: var(--color-emerald);
    font-weight: 700;
}

.card__body em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.9em;
    background: rgba(15, 81, 50, 0.08);
    padding: 1px 8px;
    border-radius: 2px;
    color: var(--color-emerald);
}

/* Grid de información */
.info-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    margin: 40px 0 32px;
    background: var(--color-line);
    border: 1px solid var(--color-line);
    animation: fadeInUp 1s 0.9s both;
}

.info-grid__item {
    background: var(--color-surface);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-grid__label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-ink-soft);
}

.info-grid__value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-emerald-2);
    box-shadow: 0 0 0 0 rgba(26, 122, 76, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(26, 122, 76, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(26, 122, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 122, 76, 0); }
}

/* Footer de la tarjeta */
.card__footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s 1s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: var(--color-emerald);
    color: var(--color-gold-soft);
    border-color: var(--color-emerald);
}

.btn--primary:hover {
    background: var(--color-ink);
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(0,0,0,0.5);
}

.btn--ghost {
    background: transparent;
    color: var(--color-ink-soft);
    border-color: var(--color-line);
}

.btn--ghost:hover {
    color: var(--color-emerald);
    border-color: var(--color-emerald);
}

/* Nota al pie */
.footnote {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(244, 236, 216, 0.45);
    text-align: center;
    max-width: 50ch;
    line-height: 1.6;
    animation: fadeInUp 1s 1.1s both;
}

/* Footer de página */
.page-footer {
    position: relative;
    z-index: 2;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(201, 169, 97, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 236, 216, 0.4);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.page-footer__dot {
    color: var(--color-gold-deep);
}

/* Animación compartida */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 600px) {
    body {
        padding: 72px 16px 48px;
    }

    .status-bar {
        padding: 10px 14px;
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .status-bar__left,
    .status-bar__right {
        gap: 6px;
    }

    .card {
        padding: 56px 24px 32px;
    }

    .card__title-line {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .card__body {
        font-size: 1.05rem;
    }

    .ornament {
        display: none;
    }

    .card__footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
