/* ============================================================
   yami.quest — styles.css
   Palette:
     #2D0B14  Antique Claret (Primary Dark)
     #6B1A2A  Deep Burgundy (Primary Mid)
     #A64B5E  Dried Rose (Primary Accent)
     #F2E8D9  Parchment (Background Light)
     #EDE0C8  Aged Cream (Background Warm)
     #F5EFE6  Ink Cream (Text on Dark)
     #3D7068  Verdigris (Decorative)
     #8AA88E  Dusty Sage (Decorative Soft)
   Fonts: DM Sans (300, 400, 500), Playfair Display (400 italic)
   ============================================================ */

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

html {
    scroll-behavior: auto; /* intentionally NOT smooth — preserves botanical timing */
    font-size: 16px;
}

body {
    background-color: #F2E8D9;
    color: #2D0B14;
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.02em;
    cursor: none;
    overflow-x: hidden;
}

/* ── Custom Cursor ────────────────────────────────────────── */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #6B1A2A;
    opacity: 0.6;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease, transform 120ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.cursor.on-dark {
    background-color: #A64B5E;
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: transform;
    background: radial-gradient(circle, rgba(164, 75, 94, 0.15) 0%, transparent 70%);
}

/* ── Paper Grain Overlay ──────────────────────────────────── */
.paper-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.04;
}

/* ── Navigation Dots ──────────────────────────────────────── */
.nav-dots {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 500;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(242, 232, 217, 0.25);
    border: 1px solid rgba(45, 11, 20, 0.3);
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2D0B14;
    background-color: rgba(242, 232, 217, 0.9);
    padding: 3px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.nav-dot:hover::after {
    opacity: 1;
}

.nav-dot.active {
    background-color: #6B1A2A;
    border-color: #6B1A2A;
}

/* On dark panels, dots invert */
.nav-dots.on-dark .nav-dot {
    background-color: rgba(245, 239, 230, 0.25);
    border-color: rgba(245, 239, 230, 0.4);
}

.nav-dots.on-dark .nav-dot.active {
    background-color: #A64B5E;
    border-color: #A64B5E;
}

.nav-dots.on-dark .nav-dot::after {
    color: #F5EFE6;
    background-color: rgba(45, 11, 20, 0.85);
}

/* ── Panels ───────────────────────────────────────────────── */
.panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.panel-light {
    background-color: #F2E8D9;
}

.panel-warm {
    background-color: #EDE0C8;
}

.panel-dark {
    background-color: #2D0B14;
}

.panel-mid {
    background-color: #6B1A2A;
}

/* ── Diagonal Cuts ────────────────────────────────────────── */
.diagonal-cut {
    position: absolute;
    bottom: -2px;
    left: -5%;
    width: 110%;
    height: 80px;
    background-color: inherit;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 10;
}

/* Override: the cut colour comes from the NEXT panel */
.panel-opening .diagonal-cut {
    background-color: #EDE0C8; /* Panel 2 colour */
    clip-path: polygon(0 0, 100% 60%, 100% 100%, 0 100%);
}

.panel-context .diagonal-cut {
    background-color: #2D0B14;
    clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

.panel-process .diagonal-cut {
    background-color: #EDE0C8;
    clip-path: polygon(0 0, 100% 60%, 100% 100%, 0 100%);
}

.panel-collection .diagonal-cut {
    background-color: #6B1A2A;
    clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

.panel-reflection .diagonal-cut {
    background-color: #F2E8D9;
    clip-path: polygon(0 0, 100% 60%, 100% 100%, 0 100%);
}

/* ── Watercolor Washes ────────────────────────────────────── */
.watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.watercolor-wash svg {
    width: 100%;
    height: 100%;
}

/* ── Botanicals ───────────────────────────────────────────── */
.botanical {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.08s linear;
}

.botanical-rosehip {
    right: 4vw;
    top: 50%;
    transform: translateY(-50%);
}

.botanical-thistle {
    right: 6vw;
    bottom: 60px;
}

.botanical-lavender {
    left: 4vw;
    top: 50%;
    transform: translateY(-50%);
}

.botanical-poppy-pos {
    left: 52%;
    top: 50%;
    transform: translateY(-50%);
}

.botanical-feather-pos {
    left: 4vw;
    bottom: 100px;
}

/* ── Path-draw SVG Animation ──────────────────────────────── */
.draw-path {
    stroke-dasharray: 1000; /* overridden by JS with actual path length */
    stroke-dashoffset: 1000;
    fill: transparent;
    transition: stroke-dashoffset 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                fill 0.7s ease 1.1s;
}

.path-draw-element.is-visible .draw-path {
    stroke-dashoffset: 0;
}

.path-draw-element.is-visible .fill-path {
    /* fill set by JS from data attribute at right time */
}

/* Stagger individual paths within a group */
.path-draw-element .draw-path:nth-child(2) { transition-delay: 0.05s, 1.15s; }
.path-draw-element .draw-path:nth-child(3) { transition-delay: 0.1s, 1.2s; }
.path-draw-element .draw-path:nth-child(4) { transition-delay: 0.15s, 1.25s; }
.path-draw-element .draw-path:nth-child(5) { transition-delay: 0.2s, 1.3s; }
.path-draw-element .draw-path:nth-child(6) { transition-delay: 0.25s, 1.35s; }
.path-draw-element .draw-path:nth-child(7) { transition-delay: 0.3s, 1.4s; }
.path-draw-element .draw-path:nth-child(8) { transition-delay: 0.35s, 1.45s; }
.path-draw-element .draw-path:nth-child(9) { transition-delay: 0.4s, 1.5s; }
.path-draw-element .draw-path:nth-child(10) { transition-delay: 0.45s, 1.55s; }
.path-draw-element .draw-path:nth-child(11) { transition-delay: 0.5s, 1.6s; }
.path-draw-element .draw-path:nth-child(12) { transition-delay: 0.55s, 1.65s; }
.path-draw-element .draw-path:nth-child(13) { transition-delay: 0.6s, 1.7s; }
.path-draw-element .draw-path:nth-child(14) { transition-delay: 0.65s, 1.75s; }
.path-draw-element .draw-path:nth-child(15) { transition-delay: 0.7s, 1.8s; }
.path-draw-element .draw-path:nth-child(16) { transition-delay: 0.75s, 1.85s; }
.path-draw-element .draw-path:nth-child(17) { transition-delay: 0.8s, 1.9s; }
.path-draw-element .draw-path:nth-child(18) { transition-delay: 0.85s, 1.95s; }
.path-draw-element .draw-path:nth-child(19) { transition-delay: 0.9s, 2.0s; }
.path-draw-element .draw-path:nth-child(20) { transition-delay: 0.95s, 2.05s; }

/* ── Panel Content ────────────────────────────────────────── */
.panel-content {
    position: relative;
    z-index: 3;
    padding: 80px 0 100px;
}

/* Panel 1 — Opening */
.content-opening {
    padding-left: 8vw;
    padding-top: 20vh;
    padding-bottom: 18vh;
    max-width: 60%;
}

.site-name {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 96px;
    color: #2D0B14;
    letter-spacing: -0.03em;
    line-height: 1.0;
    clip-path: inset(0 100% 0 0);
    animation: name-wipe 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 300ms forwards;
}

@keyframes name-wipe {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0% 0 0); }
}

.site-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #6B1A2A;
    line-height: 1.65;
    letter-spacing: 0.01em;
    margin-top: 24px;
    opacity: 0;
    animation: fade-up 600ms ease 900ms forwards;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Panel 2 — Context */
.content-context {
    padding-left: 8vw;
    max-width: 50%;
    padding-top: 18vh;
    padding-bottom: 18vh;
}

/* Panel 3 — Process */
.content-process {
    padding-left: 54vw;
    max-width: 90%;
    padding-top: 18vh;
    padding-bottom: 18vh;
}

/* Panel 4 — Collection (two-column) */
.panel-collection {
    min-height: 130vh;
}

.content-collection {
    padding-top: 14vh;
    padding-bottom: 14vh;
}

.collection-layout {
    display: flex;
    align-items: flex-start;
    padding: 0 6vw;
    gap: 0;
}

.collection-labels {
    flex: 0 0 30%;
    padding-right: 2vw;
    padding-top: 60px;
}

.collection-label-item {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6B1A2A;
    line-height: 1.5;
    margin-bottom: 28px;
}

.collection-body {
    flex: 0 0 58%;
}

/* Panel 5 — Reflection */
.panel-reflection {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.content-reflection {
    padding: 0;
    padding-left: 15vw;
    max-width: 70%;
}

.reflection-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 64px;
    color: #F5EFE6;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.reflection-label {
    position: absolute;
    bottom: 40px;
    right: 6vw;
}

.hairline-rule {
    position: absolute;
    top: 61.8vh;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #A64B5E;
    z-index: 3;
}

/* Panel 6 — Contact */
.content-contact {
    padding-left: 48vw;
    padding-top: 20vh;
    padding-bottom: 16vh;
    max-width: 90%;
}

/* ── Typography Components ────────────────────────────────── */
.panel-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A64B5E;
    margin-bottom: 24px;
    display: block;
}

.panel-label-dark {
    color: rgba(245, 239, 230, 0.5);
}

.panel-heading {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 52px;
    color: #2D0B14;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 28px;
}

.panel-heading-dark {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 64px;
    color: #A64B5E;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 28px;
}

.pull-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 28px;
    color: #A64B5E;
    margin-bottom: 32px;
    margin-left: -6vw;
    line-height: 1.3;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.02em;
    color: #2D0B14;
    max-width: 480px;
    margin-bottom: 20px;
}

.body-text-dark {
    color: #F5EFE6;
}

/* ── Contact Email ────────────────────────────────────────── */
.contact-email-wrap {
    margin: 32px 0 16px;
    position: relative;
    display: inline-block;
}

.contact-email {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 24px;
    color: #6B1A2A;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #A64B5E;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-email:hover::after {
    clip-path: inset(0 0% 0 0);
}

.contact-note {
    font-size: 15px;
    color: #6B1A2A;
    opacity: 0.7;
    margin-top: 0;
}

/* ── Ornamental Dividers ──────────────────────────────────── */
.ornamental-divider {
    display: flex;
    justify-content: center;
    padding: 0 6vw;
    z-index: 4;
    position: relative;
}

.ornamental-top {
    padding-top: 60px;
    padding-bottom: 20px;
}

.ornamental-bottom {
    padding-top: 20px;
    padding-bottom: 20px;
}

.ornamental-divider svg {
    width: 100%;
    max-width: 800px;
    height: 20px;
}

/* ── Cursor Candle Effect (Panel 3 only) ─────────────────── */
.cursor-candle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cursor-candle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(164, 75, 94, 0.08) 0%, transparent 70%);
    transform: translate(calc(var(--cx, 50%) - 40px), calc(var(--cy, 50%) - 40px));
    pointer-events: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    padding: 40px 6vw 40px;
    border-top: 1px solid rgba(107, 26, 42, 0.15);
}

.footer-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: #6B1A2A;
    opacity: 0.6;
}

.footer-italic {
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* ── Responsive ─────────────────────────────────────────────
   Below 768px: reduce clip angles, scale down botanicals,
   disable cursor-follow, adjust typography sizes
   ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-glow {
        display: none;
    }

    /* Flatten diagonal cuts */
    .panel-opening .diagonal-cut,
    .panel-context .diagonal-cut,
    .panel-process .diagonal-cut,
    .panel-collection .diagonal-cut,
    .panel-reflection .diagonal-cut {
        height: 40px;
    }

    .site-name {
        font-size: 64px;
    }

    .reflection-text {
        font-size: 40px;
    }

    .panel-heading {
        font-size: 36px;
    }

    .panel-heading-dark {
        font-size: 44px;
    }

    .pull-quote {
        font-size: 22px;
        margin-left: 0;
    }

    /* Botanicals: inline rather than edge-anchored, 55% scale */
    .botanical {
        position: relative;
        transform: scale(0.55) !important;
        transform-origin: top center;
        margin: 0 auto;
        display: block;
        right: auto;
        left: auto;
        top: auto;
        bottom: auto;
    }

    .content-opening,
    .content-context,
    .content-process,
    .content-contact {
        padding-left: 6vw;
        max-width: 90%;
    }

    .collection-layout {
        flex-direction: column;
    }

    .collection-labels {
        flex: none;
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        padding: 0 0 20px 0;
    }

    .collection-body {
        flex: none;
        width: 100%;
    }

    .content-reflection {
        padding-left: 6vw;
        max-width: 90%;
    }
}
