/* ============================================
   continu.ax - Velvet Digital Experience
   ============================================ */

/* -- CSS Custom Properties -- */
:root {
    --oxblood-depth: #4A0E1B;
    --burgundy-velvet: #8C2F3D;
    --dried-rose: #C4727E;
    --carbon-ink: #1A1215;
    --parchment-smoke: #F2EBE4;
    --tarnished-brass: #B8956A;
    --claret-shadow: #2D0A12;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    --font-accent: 'Cormorant Garamond', 'Times New Roman', serif;

    --ease-scale: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-fade: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
    color: var(--carbon-ink);
    background-color: var(--parchment-smoke);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -- Curtain-fall Transition Overlay -- */
.curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--oxblood-depth);
    z-index: 100;
    pointer-events: none;
    transform: translateY(-100%);
    will-change: transform;
}

/* -- Transition Leaf -- */
.transition-leaf {
    position: fixed;
    top: -10vh;
    right: -5vw;
    width: clamp(3rem, 5vw, 5rem);
    height: auto;
    z-index: 101;
    pointer-events: none;
    opacity: 0;
    color: var(--dried-rose);
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
}

.transition-leaf svg {
    width: 100%;
    height: auto;
}

.transition-leaf.active {
    opacity: 0.4;
}

/* -- Navigation Diamonds -- */
.room-nav {
    position: fixed;
    right: 2vw;
    top: 15vh;
    height: 70vh;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.nav-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background-color: rgba(140, 47, 61, 0.4);
}

.nav-diamond {
    width: 8px;
    height: 8px;
    border: 1px solid var(--tarnished-brass);
    background: transparent;
    transform: rotate(45deg);
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 320ms var(--ease-scale);
}

.nav-diamond:hover {
    transform: rotate(45deg) scale(1.12);
}

.nav-diamond.active {
    background: var(--burgundy-velvet);
    border-color: var(--burgundy-velvet);
}

/* -- Room Base Styles -- */
.room {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.room-light {
    background-color: var(--parchment-smoke);
}

.room-dark {
    background-color: var(--oxblood-depth);
    color: var(--parchment-smoke);
}

.room-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 8vh 6vw;
}

/* -- Fade-in Animation Classes -- */
.fade-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms var(--ease-fade), transform 800ms var(--ease-fade);
}

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

/* -- Watermark Leaves -- */
.watermark-leaf {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    color: var(--tarnished-brass);
    opacity: 0.04;
}

.watermark-leaf svg {
    width: 100%;
    height: auto;
}

.watermark-leaf-right {
    right: -5vw;
    top: 10vh;
    width: clamp(20rem, 40vw, 50vw);
}

.watermark-leaf-left {
    left: -8vw;
    top: 5vh;
    width: clamp(18rem, 35vw, 45vw);
}

.watermark-leaf-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(20rem, 38vw, 48vw);
}

.watermark-leaf-final {
    opacity: 0.08;
}

/* ============================================
   ROOM 1: THE NAME
   ============================================ */
.room-content-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 60%;
    min-height: 80vh;
    padding-left: 10vw;
}

.headline {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: 0.04em;
    line-height: 1.08;
    color: var(--burgundy-velvet);
}

.headline .char {
    display: inline-block;
    transition: transform 300ms var(--ease-scale);
    will-change: transform;
}

.headline .char:hover {
    transform: scale(1.05);
}

.tagline {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.06em;
    color: var(--dried-rose);
    margin-top: 3vh;
}

/* ============================================
   ROOM 2: THE ORIGIN
   ============================================ */
.room-layout-split {
    display: flex;
    align-items: center;
    gap: 4vw;
    min-height: 80vh;
}

.text-column {
    max-width: 38ch;
    flex-shrink: 0;
}

.text-column p {
    margin-bottom: 2.5vh;
}

.text-column-left {
    padding-left: 6vw;
    width: 35%;
}

.text-column-right {
    padding-right: 6vw;
    width: 45%;
}

.photo-container {
    flex: 1;
    position: relative;
}

.photo-right {
    display: flex;
    justify-content: flex-end;
}

.photo-left {
    display: flex;
    flex-direction: column;
    gap: 4vh;
    width: 55%;
}

.soft-masked-photo {
    width: 100%;
    height: 55vh;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 70%, transparent 100%);
}

/* Vineyard rows in fog - generated gradient */
.origin-photo {
    background:
        linear-gradient(160deg, rgba(74, 14, 27, 0.3) 0%, transparent 40%),
        linear-gradient(340deg, rgba(45, 10, 18, 0.5) 0%, transparent 50%),
        repeating-linear-gradient(
            85deg,
            rgba(140, 47, 61, 0.15) 0px,
            rgba(140, 47, 61, 0.08) 3px,
            rgba(242, 235, 228, 0.12) 5px,
            rgba(184, 149, 106, 0.1) 8px,
            rgba(140, 47, 61, 0.15) 12px
        ),
        linear-gradient(180deg,
            rgba(242, 235, 228, 0.4) 0%,
            rgba(184, 149, 106, 0.3) 30%,
            rgba(140, 47, 61, 0.2) 60%,
            rgba(45, 10, 18, 0.5) 100%
        ),
        var(--oxblood-depth);
}

/* Stone texture */
.practice-photo-1 {
    height: 25vh;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(184, 149, 106, 0.4), transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(242, 235, 228, 0.3), transparent 55%),
        linear-gradient(135deg, rgba(45, 10, 18, 0.3), rgba(74, 14, 27, 0.2), rgba(184, 149, 106, 0.15)),
        repeating-conic-gradient(
            from 0deg,
            rgba(140, 47, 61, 0.05) 0deg,
            rgba(184, 149, 106, 0.08) 3deg,
            rgba(74, 14, 27, 0.04) 5deg
        ),
        var(--claret-shadow);
}

/* Leather grain */
.practice-photo-2 {
    height: 25vh;
    background:
        radial-gradient(ellipse at 40% 50%, rgba(140, 47, 61, 0.3), transparent 65%),
        linear-gradient(175deg, rgba(74, 14, 27, 0.6) 0%, rgba(45, 10, 18, 0.8) 100%),
        repeating-linear-gradient(
            92deg,
            rgba(184, 149, 106, 0.06) 0px,
            transparent 1px,
            transparent 3px
        ),
        var(--carbon-ink);
}

/* ============================================
   ROOM 3: THE PRINCIPLE
   ============================================ */
.room-content-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    min-height: 80vh;
    padding-right: 10vw;
}

.pullquote-block {
    max-width: 55%;
    text-align: left;
}

.pullquote {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.12;
    letter-spacing: 0.02em;
    color: var(--carbon-ink);
    margin-bottom: 4vh;
}

.accent-leaf-inline {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5em;
    color: var(--tarnished-brass);
    opacity: 0.6;
}

.leaf-icon {
    width: 14px;
    height: 18px;
    vertical-align: middle;
}

.pullquote-annotation {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.85;
    color: var(--carbon-ink);
    max-width: 38ch;
    opacity: 0.85;
}

/* ============================================
   ROOM 4: THE PRACTICE
   ============================================ */
.photo-stack {
    display: flex;
    flex-direction: column;
    gap: 4vh;
}

.text-emphasis {
    font-weight: 400;
    color: var(--dried-rose);
}

/* ============================================
   ROOM 5: THE PATIENCE
   ============================================ */
.room-content-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.timeline {
    position: relative;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 700px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--burgundy-velvet);
    transform: translateX(-50%);
}

.timeline-entry {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 2;
    transition: transform 320ms var(--ease-scale);
}

.timeline-entry:hover {
    transform: scale(1.08);
}

.timeline-entry:hover .timeline-diamond {
    transform: rotate(45deg) scale(1.15);
}

.timeline-entry:hover ~ .timeline-line,
.timeline-entry:hover + .timeline-line {
    width: 2px;
}

.timeline-left {
    flex-direction: row-reverse;
    justify-content: center;
}

.timeline-left .timeline-content {
    text-align: right;
    margin-right: 2rem;
}

.timeline-right {
    justify-content: center;
}

.timeline-right .timeline-content {
    text-align: left;
    margin-left: 2rem;
}

.timeline-diamond {
    width: 8px;
    height: 8px;
    border: 1px solid var(--burgundy-velvet);
    background: var(--burgundy-velvet);
    transform: rotate(45deg);
    flex-shrink: 0;
    z-index: 3;
    position: relative;
    transition: transform 320ms var(--ease-scale);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-year {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--burgundy-velvet);
    letter-spacing: 0.04em;
}

.timeline-phrase {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--carbon-ink);
    letter-spacing: 0.03em;
    opacity: 0.8;
}

/* ============================================
   ROOM 6: THE TEXTURE
   ============================================ */
.room-texture {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.texture-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 25% 30%, rgba(184, 149, 106, 0.15), transparent 50%),
        radial-gradient(ellipse at 75% 70%, rgba(140, 47, 61, 0.1), transparent 50%),
        repeating-linear-gradient(
            170deg,
            rgba(242, 235, 228, 0.04) 0px,
            transparent 2px,
            transparent 8px
        ),
        repeating-linear-gradient(
            80deg,
            rgba(184, 149, 106, 0.03) 0px,
            transparent 1px,
            transparent 6px
        ),
        linear-gradient(180deg, var(--oxblood-depth) 0%, var(--claret-shadow) 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 60%, transparent 100%);
}

.texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 10, 18, 0.5);
    z-index: 1;
}

.texture-quote {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: var(--parchment-smoke);
    max-width: 36ch;
    text-align: center;
    position: relative;
    z-index: 3;
}

/* ============================================
   ROOM 7: THE CONTINUATION
   ============================================ */
.room-final {
    background: linear-gradient(
        180deg,
        var(--parchment-smoke) 0%,
        var(--parchment-smoke) 50%,
        var(--oxblood-depth) 70%,
        var(--oxblood-depth) 100%
    );
    flex-direction: column;
}

.room-final .room-content-left {
    min-height: 70vh;
}

.headline-final {
    color: var(--burgundy-velvet);
}

.headline-final .char {
    display: inline-block;
    transition: transform 300ms var(--ease-scale);
    will-change: transform;
}

.headline-final .char:hover {
    transform: scale(1.05);
}

.closing-line {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--burgundy-velvet);
    margin-top: 3vh;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.room-ending {
    width: 100%;
    height: 20vh;
    background: var(--oxblood-depth);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .room-content-left {
        max-width: 85%;
        padding-left: 6vw;
    }

    .room-layout-split {
        flex-direction: column;
        gap: 4vh;
    }

    .text-column-left,
    .text-column-right {
        width: 90%;
        padding: 0 6vw;
    }

    .photo-container,
    .photo-left {
        width: 90%;
        padding: 0 5vw;
    }

    .photo-right {
        order: -1;
    }

    .room-content-right {
        align-items: flex-start;
        padding-right: 6vw;
        padding-left: 6vw;
    }

    .pullquote-block {
        max-width: 100%;
    }

    .room-nav {
        right: 1vw;
    }

    .nav-diamond {
        width: 6px;
        height: 6px;
    }

    .timeline {
        max-width: 90%;
    }

    .timeline-left .timeline-content {
        margin-right: 1rem;
    }

    .timeline-right .timeline-content {
        margin-left: 1rem;
    }

    .watermark-leaf {
        opacity: 0.02;
    }
}

@media (max-width: 480px) {
    .headline {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .pullquote {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .room-nav {
        display: none;
    }
}
