/* style.css – swipe with fade, slide animation only at ends */

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

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

body {
    background: #ffffff;
    font-family: 'Georgia', 'Times New Roman', 'Palatino', 'Brush Script MT', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* name gate */
.gate {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem;
}

.gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.gate-label {
    font-family: 'Georgia', 'Times New Roman', 'Palatino', cursive;
    font-size: 1.3rem;
    color: #1a1a1a;
    letter-spacing: 0.02em;
}

.gate-input {
    width: 100%;
    font-family: 'Georgia', 'Times New Roman', 'Palatino', cursive;
    font-size: 1.4rem;
    text-align: center;
    color: #1a1a1a;
    background: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 0.5rem 0.25rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.gate-input:focus {
    border-color: #333;
}

.gate-error {
    min-height: 1.2em;
    font-size: 0.85rem;
    color: #b3382c;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gate-error.visible {
    opacity: 1;
}

.gate.hiding {
    animation: gateFadeOut 0.5s ease forwards;
    pointer-events: none;
}

@keyframes gateFadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.container {
    width: 100%;
    height: 100vh;
    max-width: 900px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    touch-action: none;
}

.slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* used only when a swipe hits the very first/last slide with no next slide */
.slides-wrapper.edge-bounce {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.reveal-text {
    font-family: 'Georgia', 'Times New Roman', 'Palatino', 'Brush Script MT', cursive;
    font-size: 2.4rem;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
    padding: 0.5rem;
}

.reveal-text em {
    font-style: italic;
    font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
    font-size: 1.05em;
    color: #222;
}

.reveal-text strong {
    font-weight: 600;
    font-family: 'Georgia', 'Times New Roman', 'Palatino', cursive;
    letter-spacing: 0.03em;
    color: #0e0e0e;
}

/* swipe text */
.swipe-text {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-family: 'Georgia', 'Times New Roman', 'Palatino', cursive;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    font-style: italic;
    z-index: 5;
    pointer-events: none;
    user-select: none;
    opacity: 0.6;
}

/* dots */
.dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.7rem;
    z-index: 5;
}

.dot {
    display: block;
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    cursor: pointer;
}

.dot:hover {
    background: #bbb;
    transform: scale(1.2);
}

.dot.active {
    background: #333;
    width: 28px;
    border-radius: 4px;
}

/* responsive */
@media (max-width: 600px) {
    .reveal-text {
        font-size: 1.6rem;
        line-height: 1.6;
    }
    .slide {
        padding: 1.5rem;
    }
    .swipe-text {
        font-size: 0.75rem;
        bottom: 3.5rem;
    }
    .dots {
        bottom: 2rem;
        gap: 0.6rem;
    }
    .dot {
        width: 8px;
        height: 8px;
    }
    .dot.active {
        width: 22px;
    }
}

@media (max-width: 400px) {
    .reveal-text {
        font-size: 1.3rem;
    }
}
