/* ============================================================
   kanojo.love — styles.css
   Palette: #0A0B14, #1A0E2E, #2A1A3E, #F5F0E8, #00FFB2
   Fonts: Noto Serif JP, Cormorant Garamond, DM Sans, Space Mono
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0A0B14;
    color: #F5F0E8;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ——— Plane 0: Fixed Ground ——— */
.plane-ground {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #0A0B14 0%, #1A0E2E 45%, #2A1A3E 100%);
    z-index: 0;
    pointer-events: none;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ——— Main Layout ——— */
main {
    position: relative;
    z-index: 1;
}

/* ——— Scene Base ——— */
.scene {
    position: relative;
    overflow: hidden;
}

/* ——— Plane Layers ——— */
.plane-panels {
    position: relative;
    z-index: 2;
    will-change: transform;
}

.plane-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    will-change: transform;
    overflow: hidden;
}

/* ——— Glass Panel Base ——— */
.glass-panel {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(42px);
    -webkit-backdrop-filter: blur(42px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: box-shadow 0.6s cubic-bezier(0.65, 0, 0.35, 1),
                transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    overflow: hidden;
}

.glass-panel:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.50),
                0 0 0 1px rgba(255, 255, 255, 0.08),
                0 0 20px rgba(0, 255, 178, 0.06);
}

/* ——— Panel Meta (Space Mono accent labels) ——— */
.panel-meta {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #00FFB2;
    display: block;
    margin-bottom: 16px;
}

/* ——— Panel Headings ——— */
.panel-heading {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 20px;
}

.panel-heading-sm {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    color: rgba(245, 240, 232, 0.85);
    margin-bottom: 14px;
}

/* ——— Panel Body ——— */
.panel-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(245, 240, 232, 0.70);
}

.panel-body-small {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(245, 240, 232, 0.65);
}

/* ——— Panel Rule ——— */
.panel-rule {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 28px 0;
}

/* ——— Underline Draw ——— */
.underline-draw {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.underline-draw::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00FFB2;
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.underline-draw:hover::after,
.underline-draw.in-view::after {
    width: 100%;
}

/* ——— Bubble Orbs ——— */
.bubble-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(245, 240, 232, 0.08);
    border: 1px solid rgba(0, 255, 178, 0.45);
    box-shadow: 0 0 12px rgba(0, 255, 178, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    color: rgba(245, 240, 232, 0.35);
    pointer-events: none;
    animation: bubble-float linear infinite;
}

@keyframes bubble-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    92% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--drift-x, 20px));
        opacity: 0;
    }
}

/* ——— SECTION 1: Opening Scene ——— */
#open {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.open-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    width: 100%;
}

#domain-letters {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: clamp(52px, 9vw, 96px);
    letter-spacing: -0.03em;
    line-height: 1.0;
    color: #F5F0E8;
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    min-height: 1.1em;
}

#domain-letters .letter {
    display: inline-block;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

#domain-letters .letter.visible {
    opacity: 1;
    transform: translateX(0);
}

.open-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 22px;
    letter-spacing: 0.04em;
    color: rgba(245, 240, 232, 0.55);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.7s ease 1.4s, transform 0.7s ease 1.4s;
}

.open-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: chevron-pulse 2.4s ease-in-out infinite;
}

@keyframes chevron-pulse {
    0%, 100% { opacity: 0.25; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.55; transform: translateX(-50%) translateY(6px); }
}

/* ——— SECTION 2: Glass Garden ——— */
#garden {
    min-height: 100vh;
    padding: 80px 5vw;
    display: flex;
    align-items: center;
}

.garden-cluster {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: 600px;
}

.garden-panel-large {
    position: absolute;
    left: 0;
    top: 0;
    width: 58%;
    padding: 40px 44px;
}

.garden-panel-small {
    position: absolute;
    right: 0;
    top: -80px;
    width: 22%;
    padding: 28px 24px;
}

.garden-panel-medium {
    position: absolute;
    right: 3%;
    bottom: 0;
    width: 38%;
    padding: 32px 36px;
}

/* ——— SECTION 3: Bubble Field ——— */
#field {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.field-mono {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #00FFB2;
}

/* ——— SECTION 4: Typographic Interval ——— */
#interval {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interval-content {
    text-align: center;
    padding: 40px 24px;
    width: 100%;
}

.interval-phrase {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: #F5F0E8;
}

.word-group {
    display: inline-block;
    margin: 0 0.18em;
}

/* ——— SECTION 5: Deep Panel ——— */
#deep {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 10vw;
}

.deep-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.deep-panel {
    width: 80vw;
    max-width: 860px;
    padding: 56px 64px;
}

.deep-inner-panels {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.deep-inner-panel {
    flex: 1;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.deep-inner-right {
    text-align: right;
}

/* ——— SECTION 6: Closing Scene ——— */
#close {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}

.close-domain {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: rgba(245, 240, 232, 0.55);
    letter-spacing: 0.06em;
}

.close-silence {
    height: 80px;
}

.close-link {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: rgba(245, 240, 232, 0.75);
    text-decoration: none;
    cursor: pointer;
}

/* ——— Hover Bubble Emission ——— */
.panel-hover-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(245, 240, 232, 0.06);
    border: 1px solid rgba(0, 255, 178, 0.4);
    box-shadow: 0 0 8px rgba(0, 255, 178, 0.10);
    pointer-events: none;
    z-index: 10;
}

/* ——— Responsive Adjustments ——— */
@media (max-width: 768px) {
    .garden-cluster {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .garden-panel-large,
    .garden-panel-small,
    .garden-panel-medium {
        position: static;
        width: 100%;
    }

    .deep-panel {
        width: 100%;
        padding: 36px 28px;
    }

    .deep-inner-panels {
        flex-direction: column;
    }
}
