/* kkaji.com — Pop-Art Botanical Theater */

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

:root {
    --bg-primary: #F0EEF1;
    --bg-silver: #D9D7DC;
    --text-primary: #2B2B2F;
    --text-secondary: #6E6E78;
    --accent-pink: #E84393;
    --accent-green: #7FB685;
    --bokeh-lavender: #B8A9C9;
    --stroke-black: #0A0A0A;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Karla', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

.defs-svg {
    position: absolute;
    width: 0;
    height: 0;
}

/* Panel base */
.panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.panel-light {
    background: var(--bg-primary);
}

.panel-silver {
    background: var(--bg-silver);
}

/* Ben-Day dot texture overlay */
.panel-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #E84393 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.06;
    pointer-events: none;
}

/* ===== HERO ===== */
#hero {
    flex-direction: column;
    background: var(--bg-primary);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(6rem, 15vw, 14rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1;
    position: relative;
    display: inline-block;
}

.hero-dot-com {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 0.3em;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    vertical-align: baseline;
    position: relative;
    bottom: 0.1em;
    color: var(--text-secondary);
}

.hero-leaf {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.ginkgo-small {
    animation: leaf-sway 4s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes leaf-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* ===== BOKEH ===== */
.bokeh-field {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184,169,201,0.3), transparent);
    filter: blur(3px);
    will-change: transform;
}

/* ===== STORY PANELS ===== */
.story-panel {
    padding: 60px 24px;
}

.story-text {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.story-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.story-body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    color: var(--text-secondary);
}

.story-illustration {
    position: absolute;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
}

.story-left {
    left: -20px;
}

.story-right {
    right: -20px;
}

/* Reveal animation */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CARD GALLERY ===== */
.card-gallery-section {
    padding: 120px 24px;
}

.card-gallery {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    z-index: 2;
    position: relative;
}

.flip-card {
    width: 280px;
    height: 280px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 600ms ease-out;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border: 3px solid var(--stroke-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    background: var(--bg-silver);
}

.flip-card-back {
    background: var(--accent-pink);
    transform: rotateY(180deg);
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 12px 12px;
}

.flip-card-back p {
    font-family: 'Karla', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--bg-primary);
    text-align: center;
    padding: 32px;
}

/* Desktop hover flip */
@media (hover: hover) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
    .flip-card.flipped .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* ===== TERMINAL ===== */
#terminal {
    flex-direction: column;
    background: var(--bg-primary);
}

.terminal-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.terminal-hangul {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(5rem, 12vw, 10rem);
    -webkit-text-stroke: 3px var(--text-secondary);
    color: transparent;
    position: relative;
    display: inline-block;
    letter-spacing: 0.04em;
}

.terminal-hangul::after {
    content: '까지';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-primary);
    -webkit-text-stroke: 0;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.5s ease-out;
}

.terminal-hangul.filled::after {
    clip-path: inset(0 0% 0 0);
}

.terminal-subtitle {
    margin-top: 32px;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.72;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .story-illustration {
        opacity: 0.3;
    }
    .flip-card {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 600px) {
    .story-illustration {
        opacity: 0.2;
    }
    .flip-card {
        width: 200px;
        height: 200px;
    }
    .card-gallery {
        gap: 16px;
    }
}
