:root {
    --background: #000000;
    --card: #1c1c1e;
    --text: #ffffff;
    --secondary: #8e8e93;
    --accent: #ff3b30;
    --moment-duration: 5s;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
        "SF Pro Text", sans-serif;

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
}

.app {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.presence {
    width: 100%;
    max-width: 360px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.signal {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;

    opacity: 0;

    animation: fadeIn 2s ease forwards;
}

h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -3px;

    opacity: 0;

    animation: fadeIn 2s ease forwards;
    animation-delay: .5s;
}

.card {
    position: relative;
    will-change: transform, opacity;
    width: 100%;
    background: var(--card);
    border-radius: 28px;
    padding: 48px 30px;
    text-align: center;
    opacity: 0;
    transform: translateY(25px);
    animation: cardAppear 1.8s ease forwards;
    animation-delay: 1.2s;
}
.prompt {
    
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}

.whisper {
    margin-top: 18px;

    color: var(--secondary);

    font-size: 18px;

    line-height: 1.5;
}

button {
    width: 100%;

    padding: 18px;

    border: 1px solid rgba(255, 255, 255, .18);

    border-radius: 18px;

    background: rgba(18, 18, 18, .75);

    color: white;

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);

    font-size: 18px;

    font-weight: 600;

    cursor: pointer;

    opacity: 1;

    animation: fadeIn 2s ease forwards;
    animation-delay: 2.2s;

    transition: opacity .5s ease, transform .5s ease;

    animation: buttonBreath 4.5s ease-in-out infinite;
    animation-play-state: paused;
}

button:hover {
    transform: scale(1.015);
}

button:active {
    transform: scale(.97);
    transition: transform .12s ease;
}

.footer {
    color: var(--secondary);

    font-size: 14px;

    opacity: 0;

    animation: fadeIn 2s ease forwards;
    animation-delay: 2.8s;
}

@keyframes fadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.prompt,
.whisper {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.prompt.changing,
.whisper.changing {
    opacity: 0;
    transform: translateY(8px);
}

.card.changing {
    animation: breathe 0.6s ease;
}

@keyframes breathe {

    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

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

}

.progress {
    height: 2px;
    background: rgba(255, 255, 255, .05);
    border-radius: 999px;
    overflow: hidden;
}

#progressBar {
    height: 100%;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}

.progress.active {
    opacity: 1;
}

button.hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;

}

button:not(.hidden) {

    animation-play-state: running;

}

body.final-black {
    background: #000000;
}

body.final-black .signal,
body.final-black .card,
body.final-black .progress,
body.final-black button,
body.final-black .footer {
    display: none;
}

body.final-black .app {
    min-height: 100vh;
    justify-content: center;
}

body.final-black h1 {
    font-size: clamp(48px, 8vw, 96px);
    margin: 0;
}

.egg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.egg {

    width: 160px;
    height: 210px;

    margin: 0 auto;


    opacity: 0;
    transform: scale(0.3) translateY(20px);
    animation: eggAppear 0.8s ease forwards;

}

@keyframes eggAppear {
    from {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }

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


.egg.tense {

    animation-name: pulseEgg;
    animation-duration: 3.8s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;

}

.egg.break {
    transform: scale(1.015);

}

@keyframes pulseEgg {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }

}

@keyframes breakEgg {

    0% {
        transform: scale(1) rotate(0deg);
    }

    20% {
        transform: scale(1.03) rotate(-2deg);
    }

    40% {
        transform: scale(1.03) rotate(2deg);
    }

    60% {
        transform: scale(1.04) rotate(-3deg);
    }

    80% {
        transform: scale(1.04) rotate(3deg);
    }

    100% {
        transform: scale(1.08) rotate(0deg);
        opacity: 1;
    }
}

@keyframes crackFlash {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }

    25% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.03);
    }
}

#crack {
    opacity: 0;
    stroke: #fff2a8;
    stroke-dasharray: 230;
    stroke-dashoffset: 230;
    filter: drop-shadow(0 0 8px rgba(255, 220, 120, 0.9));
}

.egg.break #crack {
    opacity: 1;
    animation: drawCrack 2.2s cubic-bezier(.22, .61, .36, 1) forwards;
}

@keyframes drawCrack {
    0% {
        stroke-dashoffset: 230;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    70% {
        stroke-dashoffset: 0;
        stroke: #fff2a8;
    }

    100% {
        stroke-dashoffset: 0;
        stroke: rgba(60, 35, 10, 0.75);
        filter: drop-shadow(0 0 2px rgba(255, 220, 120, 0.25));
    }
}

/* ===========================
   EASTER EGG
=========================== */

.egg-stage {
    position: relative;
    width: 220px;
    height: 280px;
    margin: 0 auto;
}

.magic-egg {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 35% 25%,
            #fff7c8 0%,
            #ffd34d 42%,
            #b87a16 100%);

    border-radius: 50% 50% 45% 45%;
    box-shadow:
        inset -8px -10px 18px rgba(0, 0, 0, .18),
        inset 8px 10px 18px rgba(255, 255, 255, .20),
        0 20px 35px rgba(255, 195, 40, .25);

    overflow: hidden;
}

.magic-egg::before {

    content: "";
    position: absolute;

    top: 22%;
    left: 27%;

    width: 32%;
    height: 18%;

    background: rgba(255, 255, 255, .35);

    border-radius: 50%;

    filter: blur(5px);

}

/* Respiración */

.magic-egg.breathing {

    animation: breatheEgg 3.8s ease-in-out infinite;

}

@keyframes breatheEgg {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }

}

/* Ocultar huevo */

.magic-egg.hide {

    opacity: 0;
    transition: opacity .25s;

}

/* Mitades */

.egg-half {

    position: absolute;

    top: 0;

    width: 110px;
    height: 280px;

    display: none;

    background:
        linear-gradient(135deg,
            #ffe27b,
            #f4c542,
            #b87a16);

    box-shadow: 0 10px 25px rgba(0, 0, 0, .35);

}

.egg-half-left {

    left: 0;

    border-radius: 100% 0 0 100%;

    transform-origin: right center;

}

.egg-half-right {

    right: 0;

    border-radius: 0 100% 100% 0;

    transform-origin: left center;

}

.egg-half.show {

    display: block;

}

.egg-half-left.open {

    transform:
        translateX(-40px) rotate(-25deg);

    transition: .6s ease;

}

.egg-half-right.open {

    transform:
        translateX(40px) rotate(25deg);

    transition: .6s ease;

}

/* Grietas */

.crack {

    position: absolute;

    inset: 0;

    opacity: 0;

}

.crack.show {

    opacity: 1;

    transition: .35s;

}

.crack-light::before {

    content: "";

    position: absolute;

    left: 49%;
    top: 24%;

    width: 5px;
    height: 120px;

    background: white;

    clip-path: polygon(40% 0,
            100% 12%,
            55% 32%,
            90% 55%,
            35% 74%,
            70% 100%,
            0 82%,
            30% 55%,
            0 28%);

}

.crack-dark::before {

    content: "";

    position: absolute;

    left: 49%;
    top: 24%;

    width: 8px;
    height: 120px;

    background: #3a2505;

    clip-path: polygon(40% 0,
            100% 12%,
            55% 32%,
            90% 55%,
            35% 74%,
            70% 100%,
            0 82%,
            30% 55%,
            0 28%);

}


.easter-final {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    animation: finalFade 1.4s ease forwards;
}

.easter-final h2 {
    color: #fff;
    font-size: 44px;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.easter-final p {
    color: rgba(255, 255, 255, .65);
    font-size: 17px;
}

@keyframes finalFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.black-final {

    width: 100%;
    height: 100%;

    display: flex;

    justify-content: center;
    align-items: center;

    background: #000;

    animation: blackFade 2s ease forwards;

}

.black-final h1 {

    color: white;

    font-size: 56px;

    letter-spacing: -2px;

    opacity: 0;

    animation: logoFade 2s ease forwards;

}

@keyframes blackFade {

    from {

        background: transparent;

    }

    to {

        background: #000;

    }

}

@keyframes logoFade {

    from {

        opacity: 0;

    }

    to {

        opacity: 1;

    }

}

.matrix-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}

/* splash */

#internalSplash {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s ease;
}

#internalSplash.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    font-size: 64px;
    font-weight: 900;
    color: white;
    letter-spacing: -4px;
}

.splash-dot {
    color: #ff3b30;
    display: inline-block;
    transition: opacity 0.45s ease;
}

.splash-letters {
    display: inline-block;
    transition: opacity 0.45s ease;
}

#internalSplash.leaving .splash-letters {
    opacity: 0;
}

#internalSplash.leaving-dot .splash-dot {
    opacity: 0;
}

.title-dot {

    color: #ff3b30 !important;

    display: inline-block;

    transform-origin: center;

    animation: dotPulse 5.2s ease-in-out infinite;

}

@keyframes buttonBreath {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes dotPulse {

    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.06);
        opacity: .92;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }

}
@keyframes dotPresence {

    0%,
    100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.18);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.14);
    }

    60% {
        transform: scale(1);
    }

}
.share-button{
    position:absolute;
    top:18px;
    right:18px;

    width:34px;
    height:34px;

    border:none;
    background:rgba(255,255,255,.05);

    color:rgba(255,255,255,.42);

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:17px;

    opacity:.38;

    transition:
        opacity .25s ease,
        transform .20s ease,
        background .25s ease,
        color .25s ease;
        
}
.share-button:hover,
.share-button:active{

    opacity:.90;

    color:white;

    background:rgba(255,255,255,.10);

    transform:scale(1.08);

}

