/* sora.quest — Dopamine aesthetic, immersive scroll, honeyed-neutral palette */
/* Fonts: Space Grotesk (display), Playfair Display (serif accent), Inter (body) */
/* Colors: Honeyed neutrals with sky blue and warm amber accents */

:root {
    --honey-cream: #FAF3E8;
    --honey-warm: #E8D5B7;
    --honey-deep: #D4A574;
    --honey-dark: #A67B5B;
    --earth-brown: #6B4E37;
    --sky-blue: #7BAFD4;
    --sky-pale: #B8D4E8;
    --amber-glow: #F4C542;
    --amber-warm: #E8944A;
    --sand: #C4956A;
    --charcoal: #2C2420;
    --white-warm: #FFFDF9;
    --bubble-1: rgba(123, 175, 212, 0.15);
    --bubble-2: rgba(244, 197, 66, 0.12);
    --bubble-3: rgba(212, 165, 116, 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    background-color: var(--honey-cream);
    color: var(--charcoal);
    overflow-x: hidden;
    line-height: 1.7;
}

/* Bubble Background Canvas */
#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: bubbleFloat linear infinite;
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Screens */
.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    scroll-snap-align: start;
}

/* Intro Section */
#intro {
    background: linear-gradient(180deg, var(--sky-pale) 0%, var(--honey-cream) 60%, var(--honey-warm) 100%);
    flex-direction: column;
    text-align: center;
}

.intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-shell-icon {
    width: 120px;
    height: 120px;
}

.shell-svg {
    width: 100%;
    height: 100%;
}

.shell-spiral {
    stroke: var(--honey-deep);
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawSpiral 3s ease-out 0.5s forwards;
}

@keyframes drawSpiral {
    to {
        stroke-dashoffset: 0;
    }
}

.intro-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--charcoal);
    line-height: 1;
}

.intro-title .dot {
    color: var(--amber-glow);
    font-weight: 700;
}

.intro-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--honey-dark);
    font-style: italic;
    max-width: 500px;
}

.scroll-indicator {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--sand);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

.scroll-arrow svg {
    display: block;
}

/* Section Common Styles */
.section-inner {
    max-width: 1100px;
    width: 100%;
    padding: 4rem 2rem;
    margin: 0 auto;
    position: relative;
}

.section-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(5rem, 12vw, 10rem);
    font-weight: 700;
    color: var(--honey-warm);
    opacity: 0.3;
    position: absolute;
    top: 1rem;
    right: 2rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 3rem;
    line-height: 1.1;
}

.title-en {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    color: var(--honey-dark);
    font-size: 0.5em;
    display: block;
    margin-top: 0.25em;
}

/* Sky Section */
#sky-section {
    background: linear-gradient(180deg, var(--honey-cream) 0%, var(--white-warm) 50%, var(--sky-pale) 100%);
}

.sky-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sky-illustration {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.sky-illustration.visible {
    opacity: 1;
    transform: translateX(0);
}

.sky-svg {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(123, 175, 212, 0.2);
}

.sun-circle {
    animation: sunPulse 4s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(244, 197, 66, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(244, 197, 66, 0.7)); }
}

.sun-ring {
    animation: ringExpand 6s ease-in-out infinite;
}

.ring-2 {
    animation-delay: -3s;
}

@keyframes ringExpand {
    0%, 100% { opacity: 0.2; transform-origin: 200px 120px; transform: scale(1); }
    50% { opacity: 0.5; transform-origin: 200px 120px; transform: scale(1.1); }
}

.sky-text {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.sky-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.lead-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--earth-brown);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sky-text p:last-child,
.shell-text p:last-child {
    font-size: 1rem;
    color: var(--honey-dark);
    line-height: 1.8;
}

.sky-text em,
.shell-text em {
    color: var(--amber-warm);
    font-style: italic;
}

/* Shell Section */
#shell-section {
    background: linear-gradient(180deg, var(--sky-pale) 0%, var(--honey-cream) 40%, var(--honey-warm) 100%);
}

.shell-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.shell-text {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.shell-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.shell-illustration {
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateX(40px) rotate(-10deg);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.shell-illustration.visible {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
}

.shell-detail-svg {
    width: 280px;
    height: 280px;
}

.shell-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 2s ease;
}

.shell-illustration.visible .shell-path {
    stroke-dashoffset: 0;
}

.shell-center {
    opacity: 0;
    transition: opacity 0.5s ease 2s;
}

.shell-illustration.visible .shell-center {
    opacity: 1;
}

/* Quest Section */
#quest-section {
    background: linear-gradient(180deg, var(--honey-warm) 0%, var(--honey-cream) 50%, var(--white-warm) 100%);
}

.quest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.quest-card {
    background: var(--white-warm);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(166, 123, 91, 0.08);
    cursor: default;
}

.quest-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.quest-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(166, 123, 91, 0.15);
}

.quest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--sky-blue), var(--amber-glow), var(--amber-warm));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quest-card:hover::before {
    opacity: 1;
}

.quest-card[data-index='0'] { transition-delay: 0s; }
.quest-card[data-index='1'] { transition-delay: 0.15s; }
.quest-card[data-index='2'] { transition-delay: 0.3s; }
.quest-card[data-index='3'] { transition-delay: 0.45s; }

.card-icon {
    margin-bottom: 1.5rem;
}

.quest-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.quest-card p {
    font-size: 0.95rem;
    color: var(--honey-dark);
    line-height: 1.7;
}

/* Horizon Section */
#horizon-section {
    background: linear-gradient(180deg, var(--white-warm) 0%, var(--honey-cream) 30%, var(--honey-deep) 100%);
}

.horizon-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.horizon-visual {
    width: 100%;
    height: 2px;
    position: relative;
    margin: 2rem 0;
}

.horizon-line {
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--amber-glow), var(--amber-warm), transparent);
    margin: 0 auto;
    transition: width 1.5s ease;
    position: relative;
}

.horizon-line.visible {
    width: 100%;
}

.horizon-glow {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(244, 197, 66, 0.3), transparent);
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.horizon-line.visible ~ .horizon-glow {
    opacity: 1;
}

.horizon-quote {
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.horizon-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.horizon-quote p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-style: italic;
    color: var(--earth-brown);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.horizon-quote cite {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--sand);
    font-style: normal;
    letter-spacing: 0.05em;
}

.horizon-stats {
    display: flex;
    gap: 4rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.horizon-stats.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--honey-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Footer */
#footer {
    background: var(--charcoal);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-shell svg {
    opacity: 0.6;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: var(--honey-warm);
    letter-spacing: 0.05em;
}

.footer-sub {
    font-size: 0.85rem;
    color: var(--honey-dark);
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .sky-content,
    .shell-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .quest-grid {
        grid-template-columns: 1fr;
    }

    .section-number {
        font-size: 4rem;
        right: 1rem;
        top: 0.5rem;
    }

    .section-inner {
        padding: 3rem 1.5rem;
    }

    .horizon-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .sky-illustration {
        order: -1;
    }
}

@media (max-width: 480px) {
    .intro-title {
        font-size: 2.5rem;
    }

    .quest-card {
        padding: 1.75rem;
    }
}