/* BASE & TYPOGRAPHY */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: radial-gradient(circle at center, #1a365d 0%, #081121 100%);
    color: #f2f2f2;
    font-family: 'Georgia', serif; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; 
}

/* THE GATE */
#gate {
    text-align: center;
    z-index: 10;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    max-width: 600px;
    padding: 20px;
}
h1 {
    font-size: 2.2rem;
    letter-spacing: 6px;
    font-weight: 400;
    color: #d4af37;
    margin-bottom: 10px;
}
.subtitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #8fa6d6;
    margin-bottom: 40px;
    font-family: 'Helvetica Neue', sans-serif;
}

/* THE TERMINAL */
.terminal {
    background: rgba(11, 25, 44, 0.8);
    border: 1px solid #d4af37;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
}
#question-text {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #e2e8f0;
    min-height: 50px;
}
input[type="text"] {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #4a6fa5;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus {
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.btn-submit {
    background: #d4af37;
    color: #081121;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}
.btn-submit:hover {
    background: #f4d068;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}
#status-text {
    margin-top: 15px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    height: 15px; 
}

/* THE VAULT */
#vault {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    padding: 10vh 5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 2s ease 0.5s;
}

/* THE SCROLL ANIMATIONS & CARDS */
.royal-card {
    background: rgba(11, 25, 44, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    padding: 50px;
    max-width: 900px; /* Widened to utilize iPad screen */
    width: 100%;
    text-align: center;
    margin-bottom: 120px; 
    
    transform: translateY(80px);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 1.2s ease, 
                border-color 1s ease;
}

.royal-card.visible {
    transform: translateY(0);
    opacity: 1;
    border-color: rgba(212, 175, 55, 1);
}

.gold-accent {
    color: #d4af37;
    font-size: 1.5rem;
    letter-spacing: 5px;
    margin-bottom: 40px;
    
    transform: translateY(20px);
    opacity: 0;
    transition: all 1s ease 0.3s; 
}

.royal-card.visible .gold-accent {
    transform: translateY(0);
    opacity: 1;
}

/* THE LAYOUT ENGINE */
.card-layout {
    display: flex;
    align-items: center; 
    justify-content: space-between;
    gap: 40px; 
    text-align: left; 
}

.image-wrapper, .text-wrapper {
    flex: 1; 
    width: 100%;
}

.royal-card:nth-child(even) .card-layout {
    flex-direction: row-reverse;
}

.image-wrapper {
    overflow: hidden;
    border: 2px solid #2b4c7e;
    border-radius: 8px;
}

.vault-image {
    width: 100%;
    display: block;
    transform: scale(1.15); 
    transition: transform 2.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.royal-card.visible .vault-image {
    transform: scale(1); 
}

.royal-card p {
    line-height: 2;
    font-size: 1.15rem; /* Slightly larger for iPad readability */
    color: #e2e8f0;
    
    transform: translateY(20px);
    opacity: 0;
    transition: all 1s ease 0.5s;
}

.royal-card.visible p {
    transform: translateY(0);
    opacity: 1;
}

/* iPAD PORTRAIT & MOBILE BREAKPOINT */
@media (max-width: 850px) {
    .card-layout, 
    .royal-card:nth-child(even) .card-layout {
        flex-direction: column;
        text-align: center; 
        gap: 30px;
    }
    .royal-card {
        padding: 40px 20px;
    }
}