/* ============================================================
   20241203.com — Zen-Contemplative Brutalism
   Palette:
     #1C1814 — Deep Charcoal
     #F2EDE4 — Aged Ivory
     #B8960C — Tarnished Gold
     #2E2924 — Warm Dark Stone
     #8B7355 — Worn Ochre
     #4A4035 — Faded Ink
     #D4CAB8 — Pale Parchment
   Fonts: Playfair Display, Roboto Mono, Cormorant Garamond, Space Grotesk
============================================================ */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1C1814;
    color: #F2EDE4;
}

/* ---- Layout: Split-Screen Wrapper ---- */
.site-wrapper {
    display: grid;
    grid-template-columns: 40vw 2px calc(60vw - 2px);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ---- Left Column: WITNESS ---- */
.col-witness {
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: #1C1814;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.col-witness::-webkit-scrollbar {
    display: none;
}

/* ---- Divider Rule ---- */
.col-divider {
    width: 2px;
    height: 100vh;
    background: #B8960C;
    position: sticky;
    top: 0;
    flex-shrink: 0;
}

/* ---- Right Column: FIELD ---- */
.col-field {
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
    background: #2E2924;
    will-change: transform;
}

/* ---- Sections (Scroll-Snap) ---- */
.section {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-content {
    position: relative;
    z-index: 2;
    padding: 60px 48px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ---- Typography Bleed Border (Section 1) ---- */
.typo-bleed-border {
    position: absolute;
    left: -120px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: 'Playfair Display', serif;
    font-size: 280px;
    font-weight: 700;
    color: #F2EDE4;
    opacity: 0.04;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    overflow: visible;
    z-index: 1;
}

/* ---- Section Labels ---- */
.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #B8960C;
    margin-bottom: 48px;
}

/* ---- Date Display (Section 1) ---- */
.date-display {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 48px;
    line-height: 1;
}

.date-year {
    font-family: 'Playfair Display', serif;
    font-size: 120px;
    font-weight: 700;
    color: #F2EDE4;
    letter-spacing: 0.08em;
    line-height: 1;
}

.date-month,
.date-day {
    font-family: 'Playfair Display', serif;
    font-size: 80px;
    font-weight: 700;
    color: #F2EDE4;
    letter-spacing: 0.08em;
    line-height: 1;
}

.date-sep {
    font-family: 'Playfair Display', serif;
    font-size: 60px;
    font-weight: 700;
    color: #B8960C;
    line-height: 1;
}

/* ---- Date Display Secondary (Section 4) ---- */
.date-display--secondary .date-year {
    font-size: 64px;
}

.date-display--secondary .date-month,
.date-display--secondary .date-day {
    font-size: 48px;
}

.date-display--secondary .date-sep {
    font-size: 36px;
}

/* ---- Counter (Section 1) ---- */
.counter-wrapper {
    margin-bottom: 24px;
}

.counter-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 48px;
    font-weight: 400;
    color: #B8960C;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 16px;
}

.counter-rule {
    width: 0;
    height: 1px;
    background: #B8960C;
    transition: width 0.6s ease;
}

.counter-rule.visible {
    width: 100%;
}

.hour-caption {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #4A4035;
    margin-top: 8px;
}

/* ---- Section 2: Declaration ---- */
.section-declaration {
    background: #1C1814;
}

.declaration-text {
    max-width: 380px;
}

.declaration-text p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(242, 237, 228, 0.85);
    margin-bottom: 24px;
}

.declaration-text .pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: #F2EDE4;
    line-height: 1.6;
    margin-bottom: 32px;
    border-left: 2px solid #B8960C;
    padding-left: 20px;
}

.declaration-text .footnote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: #4A4035;
    margin-bottom: 0;
    margin-top: 16px;
}

.pixel-grid-declaration {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    width: 188px;
    margin-top: 32px;
}

/* ---- Section 3: Night ---- */
.section-night {
    background: #1C1814;
}

.night-sentences {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.night-line {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #F2EDE4;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.night-line--xl { font-size: 96px; }
.night-line--lg { font-size: 64px; }
.night-line--md { font-size: 40px; }
.night-line--sm { font-size: 24px; color: rgba(242, 237, 228, 0.5); }

/* ---- Section 4: Morning / Elapsed ---- */
.section-morning {
    background: #1C1814;
}

.elapsed-wrapper {
    margin-top: 32px;
}

.elapsed-label {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: #8B7355;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.elapsed-display {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #F2EDE4;
    line-height: 1.8;
}

/* ============================================================
   RIGHT COLUMN — FIELD PANELS
============================================================ */

.col-field {
    position: relative;
}

.field-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.field-panel.active {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Field Panel 1: Vintage Photo ---- */
.field-panel--photo {
    background: #2E2924;
}

.photo-base {
    position: absolute;
    inset: 0;
    /* Simulated Seoul night street — gradient layers to evoke vintage photo */
    background:
        linear-gradient(135deg, #1C1814 0%, #2E2924 25%, #4A4035 50%, #2E2924 75%, #1C1814 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.04) 2px,
            rgba(139, 115, 85, 0.04) 4px
        );
    filter: grayscale(100%) contrast(120%) brightness(80%) sepia(20%);
}

.photo-base::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Street light spots */
    background:
        radial-gradient(ellipse 60px 120px at 30% 25%, rgba(212, 202, 184, 0.25) 0%, transparent 100%),
        radial-gradient(ellipse 40px 80px at 70% 15%, rgba(212, 202, 184, 0.18) 0%, transparent 100%),
        radial-gradient(ellipse 30px 60px at 55% 35%, rgba(212, 202, 184, 0.12) 0%, transparent 100%),
        /* Long shadow streaks */
        linear-gradient(170deg, transparent 40%, rgba(28, 24, 20, 0.5) 40%, rgba(28, 24, 20, 0.5) 42%, transparent 42%),
        linear-gradient(170deg, transparent 55%, rgba(28, 24, 20, 0.4) 55%, rgba(28, 24, 20, 0.4) 57%, transparent 57%),
        /* Concrete texture strips */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(74, 64, 53, 0.08) 60px,
            rgba(74, 64, 53, 0.08) 62px
        );
}

/* Ghost version for Section 4 */
.photo-base--ghost {
    filter: grayscale(100%) contrast(80%) brightness(200%) sepia(5%);
    opacity: 0.4;
}

/* Grain overlay */
.photo-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.08;
    pointer-events: none;
}

/* Vignette overlay */
.photo-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(28,24,20,0) 30%, rgba(28,24,20,0.6) 100%);
    pointer-events: none;
}

/* ---- Field Panel 2: Abstract Grid ---- */
.field-panel--abstract {
    background: #2E2924;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 172px;
}

.abstract-block {
    width: 20px;
    height: 20px;
    background: #8B7355;
    transition: background-color 2s ease, border 2s ease;
}

.abstract-block.hollow {
    background: transparent;
    border: 1px solid #8B7355;
}

/* ---- Field Panel 3: Square Counter Grid ---- */
.field-panel--grid {
    background: #2E2924;
    display: flex;
    align-items: center;
    justify-content: center;
}

.square-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 192px;
}

.sq {
    width: 20px;
    height: 20px;
    background: #8B7355;
    border: 1px solid transparent;
    animation: fillToHollow 1s ease forwards;
    animation-play-state: paused;
}

@keyframes fillToHollow {
    from {
        background: #8B7355;
        border-color: transparent;
    }
    to {
        background: transparent;
        border-color: #8B7355;
    }
}

/* ---- Field Panel 4: Ghost Photo ---- */
.field-panel--ghost {
    background: #2E2924;
}

/* ============================================================
   RESPONSIVE — Prevent total breakage on small viewports
============================================================ */
@media (max-width: 768px) {
    .site-wrapper {
        grid-template-columns: 100vw 0 0;
    }
    .col-divider,
    .col-field {
        display: none;
    }
    .date-year { font-size: 60px; }
    .date-month, .date-day { font-size: 44px; }
    .date-sep { font-size: 32px; }
    .counter-display { font-size: 32px; }
    .night-line--xl { font-size: 56px; }
    .night-line--lg { font-size: 40px; }
    .night-line--md { font-size: 28px; }
}
