/* ============================================
   DESTINO PAGE - Identico alla Homepage
   Updated: 2025-06-16_r1
   ============================================ */

/* --- Colore lettere custom per titoli e numeri --- */
.slide-title .fate-letter {
    color: rgba(112, 38, 25, 0.7);
}

.slide-number .number-prefix {
    color: rgba(104, 102, 102, 0.7);
}

/* --- Background layer stile Enclave --- */
.destiny-bg {
    position: relative;
    overflow: hidden;
    background: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 5% 5% 5% 0;
    z-index: 1;
}

/* --- Container per la moneta 3D --- */
.minimal-coin-container {
    width: 60%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    perspective: 1200px;
    position: relative;
    opacity: 0.7;
    filter: brightness(0.9) contrast(1.1);
}

/* --- Moneta 3D minimalista --- */
.minimal-coin {
    width: 65%;
    height: 65%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    min-width: 150px;
    min-height: 150px;
    max-width: 250px;
    max-height: 250px;
}

/* --- Facce della moneta --- */
.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    overflow: hidden;
    background: transparent;
}

.coin-side.heads { transform: rotateY(0deg); }
.coin-side.tails { transform: rotateY(180deg); }

/* --- Immagini delle facce (testa/croce) --- */
.coin-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    filter: none;
    box-shadow: none;
    border: none;
}

/* --- Hover sulla moneta --- */
.minimal-coin:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* --- Pulsante "Invocare il Fato" durante l'animazione --- */
.slide-link.fate-button.flipping {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   RISULTATO DEL LANCIO - DESIGN IDENTICO A DESCRIPTION
   ============================================ */

/* --- Box del risultato (occupato lo spazio della descrizione) --- */
.result-display {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
}

/* --- Mostra il risultato con animazione --- */
.result-display.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Titolo del risultato: stile identico alla slide-description --- */
.result-display .result-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 1.5vw, 1rem);
    color: rgba(255,255,255,0.9);
    line-height: 1.7;
    margin-bottom: 1.1rem;
    max-width: 500px;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    font-style: italic;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid rgba(139,75,75,0.4);
    text-transform: none;
}

/* --- Sottotitolo/descrizione del risultato --- */
.result-display .result-description {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.2vw, 1.05rem);
    color: rgba(255,255,255,0.82);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0.2rem;
    margin-top: 0.2rem;
    padding-left: 2.5rem;
    max-width: 480px;
    border: none;
    text-shadow: none;
    font-weight: 300;
}

/* --- Colore unificato per il risultato (opzionale) --- */
.result-display.heads .result-text,
.result-display.tails .result-text {
    color: rgba(255,255,255,0.9);
}

/* --- Animazione flipping della moneta --- */
@keyframes minimalFlip {
    0%   { transform: rotateY(0deg) translateY(0px) scale(1); }
    50%  { transform: rotateY(900deg) translateY(-100px) scale(1.1); }
    100% { transform: rotateY(1800deg) translateY(0px) scale(1); }
}

.minimal-coin.flipping {
    animation: minimalFlip 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* --- Tablet --- */
@media (max-width: 1024px) {
    .minimal-coin-container { width: 55%; height: 55%; }
    .minimal-coin { width: 70%; height: 70%; min-width: 120px; min-height: 120px; max-width: 200px; max-height: 200px; }
    .destiny-bg ~ .slide-content-layer .slide-text { padding: 8rem 2rem 3rem 2rem; }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .minimal-coin-container { width: 50%; height: 50%; }
    .minimal-coin { width: 75%; height: 75%; min-width: 100px; min-height: 100px; max-width: 150px; max-height: 150px; }
    .destiny-bg ~ .slide-content-layer .slide-text { padding: 6rem 1.5rem 2.5rem 1.5rem; }
}

/* --- Smartphone piccolo --- */
@media (max-width: 480px) {
    .minimal-coin-container { width: 45%; height: 45%; }
    .minimal-coin { width: 80%; height: 80%; min-width: 80px; min-height: 80px; max-width: 120px; max-height: 120px; }
    .destiny-bg ~ .slide-content-layer .slide-text { padding: 5rem 1rem 2rem 1rem; }
}

/* --- Allineamento testo destino --- */
body.homepage .slide-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem;
    background: transparent;
    position: relative;
    z-index: 3;
}

/* --- Override altezza contenuto su DESTINO --- */
.destiny-bg ~ .slide-content-layer .slide-text {
    justify-content: flex-start;
    padding: 10rem 2rem 4rem 2rem;
    transform: translateY(0);
}

/* --- Spaziatura subtitle --- */
.destiny-bg ~ .slide-content-layer .slide-subtitle {
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}
