/* lunch.day - japanese-minimal urban lunchtime observatory */

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    --scroll-progress: 0;
}

body {
    background: #0B0F14;
    color: #E8ECF0;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
    line-height: 1.85;
    overflow-x: hidden;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2 {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: lowercase;
}

.body-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.85;
    color: #E8ECF0;
}

.caption-text {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6B7B8D;
}

/* ==================== SCROLL PROGRESS INDICATOR ==================== */
#scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 0%;
    background: #00FFB2;
    box-shadow: 0 0 10px rgba(0, 255, 178, 0.4);
    z-index: 1000;
    transition: height 0.1s linear;
}

/* ==================== GLASSMORPHIC CARD SYSTEM ==================== */
/* Surface color: #161B22 at 60% opacity */
.glass-card {
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(0, 255, 178, 0.12);
    border-radius: 8px;
    padding: 32px;
    transition: transform 400ms ease, box-shadow 400ms ease, border-color 400ms ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 255, 178, 0.3);
}

/* ==================== COURSE (SECTION) BASE ==================== */
.course {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ==================== COURSE 1 -- THE PAUSE ==================== */
.course-1 {
    background: #0B0F14;
    flex-direction: column;
    gap: 0;
}

.kanji-container {
    position: absolute;
    top: calc(50% - 120px);
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid rgba(0, 255, 178, 0.15);
}

.kanji-container:hover {
    transform: translateX(-50%) translateY(-4px);
}

.kanji {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: 48px;
    color: #FFDAC1;
    line-height: 1;
}

.neon-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: #00FFB2;
    box-shadow: 0 0 20px rgba(0, 255, 178, 0.3), 0 0 40px rgba(0, 255, 178, 0.1);
}

#neon-line-1 {
    top: 50%;
}

.course-1 h1 {
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 72px;
    white-space: nowrap;
}

/* ==================== TYPEWRITER EFFECT ==================== */
.typewriter {
    display: inline-flex;
    align-items: center;
}

.typewriter-text {
    overflow: hidden;
    display: inline-block;
    width: 0;
    white-space: nowrap;
    vertical-align: bottom;
}

.typewriter-text.typing {
    animation: typewriter-reveal var(--tw-duration, 0.72s) steps(var(--tw-steps, 9)) forwards;
}

@keyframes typewriter-reveal {
    from { width: 0; }
    to { width: var(--tw-width); }
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #00FFB2;
    margin-left: 2px;
    vertical-align: bottom;
    opacity: 0;
}

.typewriter-cursor.blinking {
    animation: blink 1.06s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==================== COURSE 2 -- THE CITY AT NOON ==================== */
.course-2 {
    background: #0B0F14;
    padding: 48px;
}

.z-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 48px;
    width: 100%;
    max-width: 1100px;
    height: 80vh;
}

.z-top-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lunch-counter-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.z-top-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.z-top-right .glass-card,
.z-bottom-left .glass-card {
    max-width: 440px;
}

.z-bottom-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.z-bottom-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS Clock */
.clock {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-face {
    position: relative;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(0, 255, 178, 0.2);
    border-radius: 50%;
    background: rgba(22, 27, 34, 0.4);
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #FF6B6B;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: #FF6B6B;
    border-radius: 1px;
}

.clock-hand-hour {
    width: 2px;
    height: 28px;
    transform: translateX(-50%) rotate(0deg);
}

.clock-hand-minute {
    width: 1.5px;
    height: 38px;
    transform: translateX(-50%) rotate(0deg);
}

.clock-numeral {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    color: #6B7B8D;
}

.clock-12 {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.clock-3 {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.clock-6 {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.clock-9 {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* ==================== COURSE 3 -- THE BOWL ==================== */
.course-3 {
    background: #0B0F14;
    flex-direction: column;
    gap: 48px;
    padding: 48px;
}

.bowl-container {
    position: relative;
    width: 60vw;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bowl {
    width: 100%;
    aspect-ratio: 2.5 / 1;
    position: relative;
    background: radial-gradient(ellipse 100% 80% at 50% 60%, rgba(22, 27, 34, 0.8), transparent),
                radial-gradient(ellipse 90% 70% at 50% 65%, rgba(0, 255, 178, 0.04), transparent);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    border: 1px solid rgba(0, 255, 178, 0.15);
    border-top: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.bowl-inner {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 178, 0.15), transparent);
    border-radius: 50%;
}

.bowl-rim {
    position: absolute;
    top: -2px;
    left: -2%;
    width: 104%;
    height: 8px;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(0, 255, 178, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 255, 178, 0.08);
}

.steam-svg {
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    pointer-events: none;
}

.steam-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2s ease-in-out;
}

.steam-path.animate {
    stroke-dashoffset: 0;
}

.bowl-text-wrap {
    display: flex;
    gap: 48px;
    max-width: 900px;
    width: 100%;
}

.bowl-text-left,
.bowl-text-right {
    flex: 1;
}

/* Ginkgo leaf */
.ginkgo-leaf {
    position: absolute;
    bottom: 80px;
    right: 80px;
    width: 64px;
    height: 64px;
    background: #A8E6CF;
    opacity: 0.4;
    clip-path: polygon(
        50% 0%,
        65% 15%,
        85% 30%,
        95% 50%,
        90% 70%,
        75% 85%,
        55% 95%,
        50% 100%,
        45% 95%,
        25% 85%,
        10% 70%,
        5% 50%,
        15% 30%,
        35% 15%
    );
}

/* ==================== COURSE 4 -- THE INTERVAL ==================== */
.course-4 {
    background: #0B0F14;
    padding: 48px;
}

.interval-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    width: 100%;
    height: 70vh;
    max-height: 700px;
}

.interval-card {
    display: flex;
    align-items: center;
}

.interval-card-1 {
    border-color: rgba(0, 255, 178, 0.25);
}

.interval-card-2 {
    border-color: rgba(168, 230, 207, 0.25);
}

.interval-card-3 {
    border-color: rgba(255, 107, 107, 0.25);
}

.interval-card-4 {
    border-color: rgba(255, 218, 193, 0.25);
}

.interval-card-1:hover {
    border-color: rgba(0, 255, 178, 0.5);
}

.interval-card-2:hover {
    border-color: rgba(168, 230, 207, 0.5);
}

.interval-card-3:hover {
    border-color: rgba(255, 107, 107, 0.5);
}

.interval-card-4:hover {
    border-color: rgba(255, 218, 193, 0.5);
}

/* ==================== COURSE 5 -- THE RETURN ==================== */
.course-5 {
    background: #0B0F14;
    flex-direction: column;
    min-height: 140vh;
}

.return-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    min-height: 100vh;
    position: relative;
    width: 100%;
}

#closing-typewriter {
    font-size: 48px;
    text-align: center;
    max-width: 900px;
    padding: 0 48px;
}

#neon-line-5 {
    bottom: 33%;
    position: absolute;
}

.time-pill {
    padding: 16px 40px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-display {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 24px;
    color: #00FFB2;
    animation: time-pulse 2s ease-in-out infinite;
}

@keyframes time-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chopstick-svg {
    position: absolute;
    bottom: 160px;
    right: 120px;
    width: 80px;
    height: 80px;
}

.end-space {
    height: 40vh;
    width: 100%;
    background: #0B0F14;
}

/* ==================== PARALLAX ELEMENT BASE ==================== */
.parallax-element {
    will-change: transform;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .course-1 h1 {
        font-size: 40px;
    }

    #closing-typewriter {
        font-size: 28px;
        padding: 0 24px;
    }

    .z-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 24px;
        height: auto;
        padding: 24px 0;
    }

    .interval-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        max-height: none;
    }

    .bowl-container {
        width: 85vw;
    }

    .bowl-text-wrap {
        flex-direction: column;
        gap: 24px;
    }

    .ginkgo-leaf {
        right: 24px;
        bottom: 24px;
    }

    .chopstick-svg {
        right: 24px;
        bottom: 80px;
    }

    .course-2 {
        padding: 24px;
    }

    .course-3 {
        padding: 24px;
    }

    .course-4 {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .course-1 h1 {
        font-size: 28px;
    }

    #closing-typewriter {
        font-size: 22px;
    }

    .body-text {
        font-size: 15px;
    }

    .kanji-container {
        width: 90px;
        height: 60px;
    }

    .kanji {
        font-size: 36px;
    }
}
