/* Landing Page — Calm + Pantone */

:root {
    --bg: #F5F0EB;
    --text: #3C3C3C;
    --accent: #C4A77D;
    --border: #E8DDD3;
    --muted: #A09688;
}

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

html {
    scroll-behavior: auto;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
}

/* --- LOADING SCREEN --- */
#loading {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s ease;
}

#loading.done {
    opacity: 0;
    pointer-events: none;
}

#loading-text {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}

#loading-bar {
    width: 120px;
    height: 2px;
    background: var(--border);
    margin-top: 16px;
    border-radius: 1px;
    overflow: hidden;
}

#loading-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.2s ease;
}

/* --- SCROLL ANIMATION SECTION --- */
#scroll-section {
    height: 400vh;
    position: relative;
}

#canvas-wrap {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#mrt-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* --- OVERLAY CONTENT (hovers over animation) --- */
#overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px 60px;
    gap: 24px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#overlay-content.visible {
    opacity: 1;
}

#overlay-content .btn,
#overlay-content footer {
    pointer-events: auto;
}

/* --- SCROLL HINT --- */
#scroll-hint {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.5s ease;
    z-index: 10;
    pointer-events: none;
}

#scroll-hint.hidden {
    opacity: 0;
}

#scroll-hint span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

#scroll-hint .arrow {
    width: 1px;
    height: 24px;
    background: var(--muted);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- SECTION TITLE --- */
.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    color: #fff;
    text-align: center;
    font-weight: 400;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 2px;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
    color: #fff;
}

.btn--primary {
    background: rgba(255,255,255,0.85);
    color: var(--text);
    border-color: transparent;
}

.btn--primary:hover {
    background: #fff;
    border-color: transparent;
    color: var(--text);
}

/* --- FOOTER --- */
footer {
    padding: 16px 24px 0;
    text-align: center;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    #scroll-section {
        height: 300vh;
    }

    #overlay-content {
        padding-bottom: 40px;
    }
}
