/* ============================================
   concurrent.day — Styles
   Ma-negative-space / Serif Revival / Bokeh
   High-contrast palette with surgical restraint
   ============================================ */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #000000;
    color: #FFFFFF;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    overflow-x: hidden;
    position: relative;
}

/* Non-retina fallback: bump Cormorant weight to 400 */
@media (-webkit-max-device-pixel-ratio: 1) {
    body {
        font-weight: 400;
    }
}

/* --- Bokeh Background Layer --- */
.bokeh-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    contain: layout style paint;
}

.bokeh-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    pointer-events: none;
}

.bokeh-large {
    z-index: 1;
}

.bokeh-small {
    z-index: 0;
}

.bokeh-warm {
    /* Bokeh Warm: #D4A04A */
    background: radial-gradient(circle, rgba(212,160,74,0.15) 0%, transparent 70%);
}

.bokeh-cool {
    /* Bokeh Cool: #7EB8D4 */
    background: radial-gradient(circle, rgba(126,184,212,0.12) 0%, transparent 70%);
}

/* Large orb opacity: 0.06-0.12 */
.bokeh-large.bokeh-warm {
    opacity: 0.10;
}

.bokeh-large.bokeh-cool {
    opacity: 0.08;
}

/* Small orb opacity: 0.04-0.08 */
.bokeh-small.bokeh-warm {
    opacity: 0.06;
}

.bokeh-small.bokeh-cool {
    opacity: 0.05;
}

/* --- Bokeh Drift Animations (25-40s cycles) --- */
@keyframes drift1 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift2 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-25px, 15px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(20px, 25px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift4 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -15px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift5 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(15px, 30px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift6 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
    100% { transform: translate(0, 0); }
}

@keyframes drift7 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(25px, -15px); }
    100% { transform: translate(0, 0); }
}

.bokeh-large:nth-child(1) { animation: drift1 30s ease-in-out infinite; }
.bokeh-large:nth-child(2) { animation: drift2 35s ease-in-out infinite; }
.bokeh-large:nth-child(3) { animation: drift3 28s ease-in-out infinite; }
.bokeh-large:nth-child(4) { animation: drift4 40s ease-in-out infinite; }
.bokeh-large:nth-child(5) { animation: drift5 33s ease-in-out infinite; }
.bokeh-large:nth-child(6) { animation: drift6 37s ease-in-out infinite; }
.bokeh-large:nth-child(7) { animation: drift7 29s ease-in-out infinite; }
.bokeh-large:nth-child(8) { animation: drift1 36s ease-in-out infinite; }
.bokeh-large:nth-child(9) { animation: drift3 31s ease-in-out infinite; }
.bokeh-large:nth-child(10) { animation: drift5 38s ease-in-out infinite; }
.bokeh-large:nth-child(11) { animation: drift2 34s ease-in-out infinite; }
.bokeh-large:nth-child(12) { animation: drift4 27s ease-in-out infinite; }
.bokeh-large:nth-child(13) { animation: drift6 32s ease-in-out infinite; }

/* --- Navigation Dots --- */
.nav-dots {
    position: fixed;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.nav-dots.visible {
    opacity: 1;
}

.nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #666666;
    transition: all 0.4s ease;
    cursor: pointer;
}

.nav-dot.active {
    width: 6px;
    height: 6px;
    background-color: #FFFFFF;
    margin-left: -1px;
}

/* --- Section Layout --- */
.section {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    backdrop-filter: blur(1px);
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 2vw;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    position: relative;
    padding: 0 4vw;
}

/* Content blocks — base */
.content-block {
    position: relative;
    perspective: 1200px;
    max-width: 520px;
}

/* Left-weighted content: columns 2-4 */
.content-block.content-left {
    grid-column: 2 / 5;
}

/* Right-weighted content: columns 9-11 */
.content-block.content-right {
    grid-column: 8 / 11;
}

/* --- Tilt 3D --- */
.tilt-target {
    transform: rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

/* --- Fade-up Animation States --- */
[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(40px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-up"].animated {
    opacity: 1;
    transform: translateY(0) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

/* --- Typography --- */

/* Hero word — Playfair Display Bold, extreme viewport size */
.hero-word {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(6rem, 15vw, 18rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    text-rendering: optimizeLegibility;
}

/* Section titles — Playfair Display Bold */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 9rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    text-rendering: optimizeLegibility;
}

/* Departure word — Playfair Display Regular, large display */
.departure-word {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(5rem, 14vw, 16rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    text-rendering: optimizeLegibility;
}

/* Body text — Cormorant Garamond Light */
.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #D4D4D4;
    max-width: 520px;
}

/* Metadata / monospace accent — IBM Plex Mono */
.metadata {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666666;
    display: block;
    margin-top: 2rem;
}

/* --- Breath Sections --- */
.breath-section {
    height: 50vh;
    position: relative;
    z-index: 10;
    background: linear-gradient(
        to bottom,
        #000000 0%,
        #0A0A0A 50%,
        #000000 100%
    );
}

/* --- Hero Section Positioning --- */
.section-hero .section-grid {
    align-items: flex-end;
    padding-bottom: 15vh;
}

/* --- Flowing Curves (SVG) --- */
.flowing-curve {
    position: absolute;
    width: 100%;
    height: 400px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 5;
    overflow: visible;
    pointer-events: none;
}

.curve-path {
    stroke: #333333;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-in-out;
}

.curve-path.drawn {
    stroke-dashoffset: 0;
}

/* --- The Red Slash --- */
.red-slash {
    width: 200px;
    height: 2px;
    background-color: #C41E3A;
    margin-top: 3rem;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.red-slash.revealed {
    transform: scaleX(1);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0 4vw;
        padding: 0 6vw;
    }

    .content-block.content-left {
        grid-column: 1 / 5;
    }

    .content-block.content-right {
        grid-column: 2 / 6;
    }

    .hero-word {
        font-size: clamp(3.5rem, 18vw, 8rem);
    }

    .section-title {
        font-size: clamp(2rem, 12vw, 5rem);
    }

    .departure-word {
        font-size: clamp(3rem, 16vw, 7rem);
    }

    .nav-dots {
        right: 3vw;
        gap: 12px;
    }

    .body-text {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .section-grid {
        padding: 0 5vw;
    }

    .content-block.content-left,
    .content-block.content-right {
        grid-column: 1 / -1;
    }

    .hero-word {
        font-size: clamp(3rem, 20vw, 6rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 14vw, 4rem);
    }

    .departure-word {
        font-size: clamp(2.5rem, 18vw, 5rem);
    }
}
