/* ============================================
   가능성.com — Possibility
   Brutalist-Elegant / Sunset-Warm / Stacked Sections
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --volcanic-black: #1a1410;
    --parchment-cream: #f5e6d0;
    --burnt-terracotta: #c8553d;
    --amber-glow: #e8985e;
    --weathered-bronze: #8b6f4e;
    --dark-umber: #2d2319;
    --golden-hour: #f0c891;

    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--dark-umber);
    background: var(--volcanic-black);
    overflow-x: hidden;
}

/* --- Progress Indicator --- */
#progress-indicator {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: rgba(26, 20, 16, 0.4);
    padding: 12px 8px;
    border-radius: 20px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border: 2px solid var(--weathered-bronze);
    background: transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-dot.active {
    background: var(--burnt-terracotta);
    border-color: var(--burnt-terracotta);
    transform: scale(1.3);
}

.progress-dot:hover {
    border-color: var(--golden-hour);
}

/* --- Full Section Base --- */
.full-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
}

/* --- Dark Sections (odd) --- */
.dark-section {
    background: var(--volcanic-black);
    color: var(--parchment-cream);
}

/* --- Light Sections (even) --- */
.light-section {
    background: var(--parchment-cream);
    color: var(--dark-umber);
}

/* --- Watermark Characters --- */
.watermark-char {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 40vw;
    line-height: 1;
    opacity: 0.03;
    color: var(--parchment-cream);
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.light-section .watermark-char {
    color: var(--dark-umber);
    opacity: 0.03;
}

.light-watermark {
    font-size: 25vw;
}

/* --- Section Content --- */
.section-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

/* --- Monolith Layout --- */
.section-content.monolith {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- Fracture Layout --- */
.section-content.fracture {
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 3rem;
    align-items: start;
    padding: 4rem 2rem;
}

.fracture-col-right {
    margin-top: 40px;
}

/* --- Typography --- */
.domain-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 9rem);
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--parchment-cream);
}

.domain-subtitle {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--weathered-bronze);
    margin-top: 0.5rem;
}

.section-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--dark-umber);
    margin-top: 1rem;
}

.monolith-statement {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 9rem);
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--parchment-cream);
}

.monolith-sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--weathered-bronze);
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
}

.label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--weathered-bronze);
    display: block;
    margin-bottom: 0.5rem;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--dark-umber);
    margin-bottom: 1.25rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* --- Border Animate (Center Out) --- */
.border-animate.horizontal.center-out {
    width: 120px;
    height: 3px;
    background: var(--burnt-terracotta);
    margin-top: 2rem;
    transform: scaleX(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.border-animate.horizontal.center-out.visible {
    transform: scaleX(1);
}

/* --- Section Borders --- */
.section-border {
    width: 100%;
    height: 10px;
    background: var(--burnt-terracotta);
    transform: scaleX(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    scroll-snap-align: none;
}

.section-border.visible {
    transform: scaleX(1);
}

/* --- Duotone Photo --- */
.duotone-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.duotone-photo svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#section-potential .section-content {
    z-index: 10;
}

/* --- Bubbles --- */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(240, 200, 145, 0.25), transparent 70%);
    animation: bubbleFloat linear infinite;
}

.dark-section .bubble {
    background: radial-gradient(circle at 30% 30%, rgba(240, 200, 145, 0.2), transparent 70%);
    box-shadow: 0 0 30px rgba(240, 200, 145, 0.08);
}

.light-section .bubble {
    background: radial-gradient(circle at 30% 30%, rgba(240, 200, 145, 0.3), transparent 70%);
    filter: drop-shadow(0 4px 8px rgba(26, 20, 16, 0.08));
}

/* Individual bubble sizes and positions */
.bubble-1 {
    width: 120px;
    height: 120px;
    left: 15%;
    bottom: -120px;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bubble-2 {
    width: 80px;
    height: 80px;
    left: 65%;
    bottom: -80px;
    animation-duration: 22s;
    animation-delay: 3s;
}

.bubble-3 {
    width: 160px;
    height: 160px;
    left: 40%;
    bottom: -160px;
    animation-duration: 25s;
    animation-delay: 7s;
}

.bubble-4 {
    width: 100px;
    height: 100px;
    left: 20%;
    bottom: -100px;
    animation-duration: 20s;
    animation-delay: 2s;
}

.bubble-5 {
    width: 60px;
    height: 60px;
    left: 75%;
    bottom: -60px;
    animation-duration: 16s;
    animation-delay: 5s;
}

.bubble-6 {
    width: 140px;
    height: 140px;
    left: 10%;
    bottom: -140px;
    animation-duration: 19s;
    animation-delay: 0s;
}

.bubble-7 {
    width: 90px;
    height: 90px;
    left: 35%;
    bottom: -90px;
    animation-duration: 21s;
    animation-delay: 4s;
}

.bubble-8 {
    width: 180px;
    height: 180px;
    left: 55%;
    bottom: -180px;
    animation-duration: 24s;
    animation-delay: 2s;
}

.bubble-9 {
    width: 70px;
    height: 70px;
    left: 80%;
    bottom: -70px;
    animation-duration: 17s;
    animation-delay: 8s;
}

.bubble-10 {
    width: 200px;
    height: 200px;
    left: 25%;
    bottom: -200px;
    animation-duration: 26s;
    animation-delay: 6s;
}

.bubble-11 {
    width: 110px;
    height: 110px;
    left: 30%;
    bottom: -110px;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bubble-12 {
    width: 150px;
    height: 150px;
    left: 60%;
    bottom: -150px;
    animation-duration: 23s;
    animation-delay: 4s;
}

/* Bubble float animation with sinusoidal X motion */
@keyframes bubbleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: translateY(-15vh) translateX(20px);
    }
    30% {
        transform: translateY(-30vh) translateX(-15px);
    }
    45% {
        transform: translateY(-45vh) translateX(25px);
    }
    60% {
        transform: translateY(-60vh) translateX(-20px);
    }
    75% {
        transform: translateY(-75vh) translateX(15px);
    }
    90% {
        transform: translateY(-90vh) translateX(-10px);
        opacity: 1;
    }
    95% {
        opacity: 0;
    }
    100% {
        transform: translateY(-110vh) translateX(0);
        opacity: 0;
    }
}

/* --- Horizon Frame --- */
.horizon-frame {
    position: relative;
    width: min(80vw, 900px);
    aspect-ratio: 2 / 1;
    margin: 0 auto;
}

.horizon-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.horizon-photo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.frame-border {
    position: absolute;
    background: var(--burnt-terracotta);
    z-index: 2;
}

.frame-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.frame-right {
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.frame-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}

.frame-left {
    top: 0;
    left: 0;
    width: 10px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s;
}

.frame-top.visible {
    transform: scaleX(1);
}

.frame-right.visible {
    transform: scaleY(1);
}

.frame-bottom.visible {
    transform: scaleX(1);
}

.frame-left.visible {
    transform: scaleY(1);
}

/* --- Fade In Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in:nth-child(2) {
    transition-delay: 0.15s;
}

.fade-in:nth-child(3) {
    transition-delay: 0.3s;
}

/* --- Footer --- */
#site-footer {
    background: var(--volcanic-black);
    padding: 2rem;
    text-align: center;
    scroll-snap-align: none;
}

.footer-rule {
    border: none;
    height: 1px;
    background: var(--weathered-bronze);
    margin-bottom: 1.5rem;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--weathered-bronze);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-content.fracture {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 1.5rem;
    }

    .fracture-col-right {
        margin-top: 0;
    }

    .watermark-char {
        font-size: 60vw;
    }

    .light-watermark {
        font-size: 35vw;
    }

    #progress-indicator {
        right: 12px;
    }

    .horizon-frame {
        width: 90vw;
    }

    .domain-title {
        font-size: clamp(2.5rem, 12vw, 6rem);
    }

    .monolith-statement {
        font-size: clamp(2.5rem, 12vw, 6rem);
    }
}

@media (max-width: 480px) {
    .section-content {
        padding: 1.5rem;
    }

    .section-content.fracture {
        padding: 2rem 1rem;
    }

    .bubble-8,
    .bubble-10 {
        display: none;
    }
}
