/* ============================================
   saram.quest — Fairycore Enchanted Forest
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --golden-hour: #F5E6C8;
    --warm-honey: #D4A050;
    --fairy-pink: #FF9BE3;
    --enchanted-mint: #7DFFBD;
    --deep-amber: #C8A060;
    --forest-shadow: #4A3828;
    --petal-white: #FFF8F0;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.85;
    color: var(--forest-shadow);
    background-color: var(--golden-hour);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Commissioner', serif;
}

h2 {
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 56px);
    line-height: 1.2;
    color: var(--forest-shadow);
}

h3 {
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.3;
}

/* --- Glow Points (Bioluminescent) --- */
.glow-point {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.glow-pink {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(255, 155, 227, 0.25) 0%, rgba(255, 155, 227, 0) 70%);
}

.glow-mint {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(125, 255, 189, 0.22) 0%, rgba(125, 255, 189, 0) 70%);
}

.glow-point.visible {
    opacity: 1;
}

/* --- The Clearing (Hero Section) --- */
.clearing {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--golden-hour);
    overflow: hidden;
}

.glow-points {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Fairy-path SVG */
.fairy-paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fairy-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0.5;
}

.fairy-path.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

/* Wordmark */
.wordmark {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.wordmark.visible {
    opacity: 1;
    transform: scale(1);
}

.wordmark-title {
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-size: clamp(40px, 7vw, 80px);
    color: var(--forest-shadow);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.wordmark-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--deep-amber);
    letter-spacing: 0.04em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 1s ease 2s;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-label {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 12px;
    color: var(--deep-amber);
    text-transform: lowercase;
    letter-spacing: 0.08em;
}

.scroll-arrow {
    width: 16px;
    height: 16px;
    border-right: 1.5px solid var(--warm-honey);
    border-bottom: 1.5px solid var(--warm-honey);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* --- Forest Sections --- */
.forest-section {
    position: relative;
    width: 100%;
    min-height: 80vh;
    padding: 120px 10vw;
    overflow: hidden;
}

.layer {
    position: relative;
}

.layer-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.layer-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.layer-fg {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* Section label (accent monospace) */
.section-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 12px;
    color: var(--deep-amber);
    text-transform: lowercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-label.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-heading {
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.section-heading.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-body {
    color: var(--forest-shadow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.section-body.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Treasure Hall --- */
.treasure-hall {
    position: relative;
    width: 100%;
    padding: 120px 6vw;
    overflow: hidden;
    background: linear-gradient(180deg, var(--golden-hour) 0%, var(--petal-white) 40%, var(--golden-hour) 100%);
}

/* Artifact Grid */
.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Artifact Card */
.artifact-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.artifact-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.artifact-frame {
    position: relative;
    background: var(--petal-white);
    border: 1px solid rgba(212, 160, 80, 0.25);
    border-radius: 16px;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow:
        0 0 30px rgba(255, 155, 227, 0.15),
        0 0 60px rgba(125, 255, 189, 0.1);
    transition: box-shadow 0.4s ease, transform 0.3s ease;
}

.artifact-frame:hover {
    box-shadow:
        0 0 40px rgba(255, 155, 227, 0.25),
        0 0 80px rgba(125, 255, 189, 0.18);
    transform: translateY(-4px);
}

/* Futuristic frame corner decorations */
.artifact-frame::before,
.artifact-frame::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--warm-honey);
    border-style: solid;
    opacity: 0.4;
}

.artifact-frame::before {
    top: 8px;
    left: 8px;
    border-width: 1px 0 0 1px;
    border-radius: 4px 0 0 0;
}

.artifact-frame::after {
    bottom: 8px;
    right: 8px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 4px 0;
}

.artifact-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: block;
}

.artifact-name {
    font-family: 'Commissioner', serif;
    font-weight: 600;
    font-size: clamp(20px, 2vw, 26px);
    color: var(--forest-shadow);
    margin-bottom: 14px;
}

.artifact-description {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.75;
    color: var(--forest-shadow);
    opacity: 0.85;
    margin-bottom: 20px;
}

.artifact-label {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 11px;
    color: var(--deep-amber);
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border: 1px solid rgba(212, 160, 80, 0.3);
    border-radius: 20px;
}

/* --- Deeper Forest Section --- */
.deeper-forest {
    padding-top: 140px;
    padding-bottom: 140px;
}

.forest-quote {
    position: relative;
    margin-top: 48px;
    padding: 32px 40px;
    font-family: 'Commissioner', serif;
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.8;
    color: var(--forest-shadow);
    background: rgba(255, 248, 240, 0.5);
    border-left: 3px solid var(--warm-honey);
    border-radius: 0 12px 12px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.45s, transform 0.6s ease 0.45s;
}

.forest-quote.revealed {
    opacity: 1;
    transform: translateY(0);
}

.quote-mark {
    font-family: 'Commissioner', serif;
    font-size: 1.4em;
    color: var(--fairy-pink);
    opacity: 0.6;
}

/* --- Starlight Footer --- */
.starlight-footer {
    position: relative;
    width: 100%;
    padding: 80px 10vw;
    background: linear-gradient(180deg, var(--deep-amber) 0%, #4A3828 100%);
    overflow: hidden;
    text-align: center;
}

.footer-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.star-point {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fairy-pink);
    box-shadow: 0 0 8px rgba(255, 155, 227, 0.5), 0 0 16px rgba(125, 255, 189, 0.3);
    animation: starTwinkle 3s ease-in-out infinite;
}

.star-point:nth-child(2n) {
    background: var(--enchanted-mint);
    box-shadow: 0 0 8px rgba(125, 255, 189, 0.5), 0 0 16px rgba(255, 155, 227, 0.3);
    animation-delay: 1.2s;
}

.star-point:nth-child(3n) {
    animation-delay: 0.6s;
}

.star-point:nth-child(5n) {
    animation-delay: 2s;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.footer-paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.footer-fairy-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease;
}

.footer-fairy-path.drawn {
    stroke-dashoffset: 0;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-wordmark {
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--petal-white);
    margin-bottom: 8px;
}

.footer-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(13px, 1.2vw, 16px);
    color: var(--golden-hour);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .forest-section {
        padding: 80px 6vw;
    }

    .artifact-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .forest-quote {
        padding: 24px 20px;
    }

    .deeper-forest {
        padding-top: 100px;
        padding-bottom: 100px;
    }

    .starlight-footer {
        padding: 60px 6vw;
    }
}

@media (max-width: 480px) {
    .wordmark-title {
        font-size: clamp(32px, 10vw, 48px);
    }

    .artifact-frame {
        padding: 28px 20px 24px;
    }

    .clearing {
        min-height: 500px;
    }
}
