/* ============================================
   thethird.quest — Pastoral Botanical Cabinet
   Diagonal-section layout with inflated 3D CSS
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: #f5f0e8;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #6b5d4f;
    background: #f5f0e8;
    overflow-x: hidden;
    position: relative;
}

/* --- Skeleton Loading Overlay --- */
#skeleton-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: #f5f0e8;
    display: flex;
    flex-direction: column;
    transition: opacity 0.6s ease-out;
    pointer-events: none;
}

#skeleton-overlay.hidden {
    opacity: 0;
}

.skeleton-band {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px 60px;
}

.skeleton-band-1 {
    clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
    background: #f5f0e8;
}

.skeleton-band-2 {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 70%);
    background: #e2ddd0;
}

.skeleton-band-3 {
    clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%);
    background: #f5f0e8;
}

.skeleton-shape {
    animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.skeleton-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e2ddd0;
    flex-shrink: 0;
}

.skeleton-pill {
    width: 120px;
    height: 18px;
    border-radius: 999px;
    background: #e2ddd0;
    flex-shrink: 0;
}

.skeleton-pill-wide {
    width: 220px;
}

.skeleton-rect {
    width: 180px;
    height: 140px;
    border-radius: 24px;
    background: #e2ddd0;
    flex-shrink: 0;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; background-color: #e2ddd0; }
    50% { opacity: 0.8; background-color: #ebe6db; }
}

/* --- Diagonal Hairlines --- */
#diagonal-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.8s ease-out 0.5s;
}

#diagonal-lines.visible {
    opacity: 1;
}

.diagonal-line {
    position: absolute;
    width: 200%;
    height: 3px;
    background: #c4a882;
    transform-origin: left center;
    transform: rotate(-35deg);
    opacity: 0.35;
}

.diagonal-line-1 { top: 20vh; left: -20%; }
.diagonal-line-2 { top: 50vh; left: -20%; }
.diagonal-line-3 { top: 80vh; left: -20%; }
.diagonal-line-4 { top: 110vh; left: -20%; }

/* --- Vine Borders (decorative) --- */
.vine-border {
    position: fixed;
    pointer-events: none;
    z-index: 4;
    width: 200%;
    height: 1px;
    transform-origin: left center;
    transform: rotate(-35deg);
}

.vine-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 100%;
    height: 7px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 14px,
        rgba(196, 168, 130, 0.4) 14px,
        rgba(196, 168, 130, 0.4) 20px,
        transparent 20px,
        transparent 28px
    );
    mask-image: radial-gradient(circle 3px at 17px 3.5px, black 2.5px, transparent 3px);
    -webkit-mask-image: radial-gradient(circle 3px at 17px 3.5px, black 2.5px, transparent 3px);
    mask-size: 28px 7px;
    -webkit-mask-size: 28px 7px;
    mask-repeat: repeat-x;
    -webkit-mask-repeat: repeat-x;
}

.vine-border-1 { top: 25vh; left: -20%; }
.vine-border-2 { top: 55vh; left: -20%; }
.vine-border-3 { top: 85vh; left: -20%; }

/* --- Diagonal Sections --- */
.diagonal-section {
    position: relative;
    min-height: 120vh;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.diagonal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

#section-hero {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    background: #f5f0e8;
    min-height: 100vh;
    z-index: 10;
}

#section-origin {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    background: #e2ddd0;
    margin-top: -10vh;
    z-index: 9;
}

#section-bloom {
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
    background: #f5f0e8;
    margin-top: -10vh;
    z-index: 8;
}

#section-return {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    background: #e2ddd0;
    margin-top: -10vh;
    z-index: 7;
}

/* --- Section Inner Layout --- */
.section-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15vh 40px 20vh;
    display: flex;
    align-items: center;
    gap: 60px;
    min-height: 100vh;
}

.section-offset-right {
    padding-left: 10%;
}

.section-offset-left {
    padding-right: 10%;
}

/* --- Hero --- */
.hero-title-area {
    flex: 1;
    position: relative;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(3.5rem, 10vw, 9rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4a3f35;
    line-height: 0.92;
    margin-bottom: 40px;
}

.hero-nav {
    display: flex;
    gap: 16px;
    transform: rotate(-35deg);
    transform-origin: left center;
    margin-top: 30px;
    margin-left: 20px;
}

.nav-pill {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #a89278;
    text-decoration: none;
    background: #f5f0e8;
    border: 1px solid #c4a882;
    border-radius: 999px;
    padding: 6px 20px;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.12);
    transition: all 0.4s ease-out;
}

.nav-pill:hover {
    background: #c4a882;
    color: #f5f0e8;
    box-shadow: 0 6px 18px rgba(139, 115, 85, 0.2);
}

.hero-specimen-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Specimen Label (Pill) --- */
.specimen-label {
    display: inline-block;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #a89278;
    background: rgba(245, 240, 232, 0.8);
    border-radius: 999px;
    padding: 4px 16px;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.12);
    margin-bottom: 16px;
}

#section-origin .specimen-label,
#section-return .specimen-label {
    background: rgba(226, 221, 208, 0.8);
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4a3f35;
    line-height: 1;
    margin-bottom: 24px;
}

/* --- Body Text --- */
.section-body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    font-weight: 400;
    line-height: 1.85;
    color: #6b5d4f;
    margin-bottom: 20px;
    max-width: 520px;
}

/* --- Specimen Card --- */
.specimen-card {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
}

.specimen-card-visual {
    flex: 0 0 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}

.specimen-card-text {
    flex: 1;
}

/* --- Watermarks --- */
.watermark {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.watermark-leaf {
    width: 300px;
    height: 400px;
    top: 20%;
    right: 5%;
    opacity: 0.08;
    border-radius: 50% 0 50% 0;
    background: #a89278;
    transform: rotate(25deg);
}

.watermark-petal {
    width: 250px;
    height: 250px;
    bottom: 25%;
    left: 8%;
    opacity: 0.08;
    border-radius: 50%;
    background: #a89278;
}

.watermark-frond {
    width: 200px;
    height: 350px;
    top: 30%;
    left: 3%;
    opacity: 0.08;
    border-radius: 50% 50% 0 0;
    background: #a89278;
    transform: rotate(-15deg);
}

/* === BOTANICAL SPECIMENS === */

/* --- Peony --- */
.peony {
    position: relative;
    width: 280px;
    height: 280px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.6s ease-out;
    cursor: default;
}

.peony-small {
    width: 220px;
    height: 220px;
}

.peony-small .peony-layer {
    transform: scale(0.78);
}

.peony-layer {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transition: box-shadow 0.6s ease-out;
}

/* Outer petals */
.peony-outer-1 {
    width: 240px; height: 200px;
    margin-top: -100px; margin-left: -120px;
    background: radial-gradient(ellipse at 40% 30%, #d9a48e, #c9917a);
    box-shadow: inset 0 -8px 20px rgba(139, 115, 85, 0.2),
                0 12px 40px rgba(139, 115, 85, 0.15);
    transform: rotate(-15deg);
}

.peony-outer-2 {
    width: 220px; height: 190px;
    margin-top: -95px; margin-left: -110px;
    background: radial-gradient(ellipse at 60% 30%, #d9a48e, #c9917a);
    box-shadow: inset 0 -8px 20px rgba(139, 115, 85, 0.2),
                0 10px 35px rgba(139, 115, 85, 0.12);
    transform: rotate(25deg);
}

.peony-outer-3 {
    width: 200px; height: 180px;
    margin-top: -90px; margin-left: -100px;
    background: radial-gradient(ellipse at 50% 25%, #ddb09c, #c9917a);
    box-shadow: inset 0 -8px 20px rgba(139, 115, 85, 0.2),
                0 8px 30px rgba(139, 115, 85, 0.1);
    transform: rotate(70deg);
}

.peony-outer-4 {
    width: 210px; height: 170px;
    margin-top: -85px; margin-left: -105px;
    background: radial-gradient(ellipse at 45% 35%, #dbb0a0, #c9917a);
    box-shadow: inset 0 -8px 20px rgba(139, 115, 85, 0.18),
                0 8px 28px rgba(139, 115, 85, 0.1);
    transform: rotate(115deg);
}

/* Mid petals */
.peony-mid-1 {
    width: 170px; height: 150px;
    margin-top: -75px; margin-left: -85px;
    background: radial-gradient(ellipse at 40% 30%, #e5c4b5, #d4a795);
    box-shadow: inset 0 -6px 16px rgba(139, 115, 85, 0.18),
                0 8px 24px rgba(139, 115, 85, 0.1);
    transform: rotate(10deg);
}

.peony-mid-2 {
    width: 160px; height: 140px;
    margin-top: -70px; margin-left: -80px;
    background: radial-gradient(ellipse at 55% 30%, #e5c4b5, #d4a795);
    box-shadow: inset 0 -6px 16px rgba(139, 115, 85, 0.18),
                0 6px 20px rgba(139, 115, 85, 0.08);
    transform: rotate(55deg);
}

.peony-mid-3 {
    width: 150px; height: 130px;
    margin-top: -65px; margin-left: -75px;
    background: radial-gradient(ellipse at 50% 25%, #ebd0c3, #ddb5a5);
    box-shadow: inset 0 -6px 16px rgba(139, 115, 85, 0.15),
                0 6px 18px rgba(139, 115, 85, 0.08);
    transform: rotate(95deg);
}

.peony-mid-4 {
    width: 140px; height: 120px;
    margin-top: -60px; margin-left: -70px;
    background: radial-gradient(ellipse at 45% 30%, #edd6ca, #e0baa8);
    box-shadow: inset 0 -6px 14px rgba(139, 115, 85, 0.15),
                0 5px 16px rgba(139, 115, 85, 0.08);
    transform: rotate(145deg);
}

/* Inner petals */
.peony-inner-1 {
    width: 110px; height: 100px;
    margin-top: -50px; margin-left: -55px;
    background: radial-gradient(ellipse at 50% 30%, #f0ddd3, #e8c9ba);
    box-shadow: inset 0 -5px 12px rgba(139, 115, 85, 0.12),
                0 5px 14px rgba(139, 115, 85, 0.06);
    transform: rotate(20deg);
}

.peony-inner-2 {
    width: 95px; height: 85px;
    margin-top: -42px; margin-left: -47px;
    background: radial-gradient(ellipse at 50% 30%, #f3e3da, #edcfc2);
    box-shadow: inset 0 -4px 10px rgba(139, 115, 85, 0.1),
                0 4px 12px rgba(139, 115, 85, 0.05);
    transform: rotate(70deg);
}

.peony-inner-3 {
    width: 80px; height: 70px;
    margin-top: -35px; margin-left: -40px;
    background: radial-gradient(ellipse at 50% 30%, #f5e6dc, #f0d8cc);
    box-shadow: inset 0 -4px 8px rgba(139, 115, 85, 0.08),
                0 3px 10px rgba(139, 115, 85, 0.04);
    transform: rotate(120deg);
}

/* Center */
.peony-center {
    width: 50px; height: 50px;
    margin-top: -25px; margin-left: -25px;
    background: radial-gradient(circle at 45% 40%, #f5e6dc, #edd6ca);
    box-shadow: inset 0 -3px 8px rgba(139, 115, 85, 0.1),
                0 3px 10px rgba(139, 115, 85, 0.06);
}

/* Peony hover */
.peony:hover {
    transform: scale(1.04);
}

.peony:hover .peony-layer {
    box-shadow: inset 0 -10px 24px rgba(139, 115, 85, 0.25),
                0 16px 50px rgba(201, 145, 122, 0.2);
}

/* --- Fern Frond --- */
.fern {
    position: relative;
    width: 200px;
    height: 340px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.fern:hover {
    transform: scale(1.04);
}

.fern-spine {
    position: absolute;
    left: 50%;
    top: 5%;
    width: 4px;
    height: 90%;
    background: linear-gradient(to bottom, #7a8d6e, #8a9a7b);
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(138, 154, 123, 0.2);
}

.fern-leaf {
    position: absolute;
    left: 50%;
    border-radius: 50% 0 50% 0;
    background: radial-gradient(ellipse at 40% 30%, #8a9a7b, #a8b89a);
    box-shadow: 0 4px 12px rgba(138, 154, 123, 0.15),
                inset 0 -3px 8px rgba(100, 120, 85, 0.15);
    transition: box-shadow 0.6s ease-out;
}

.fern:hover .fern-leaf {
    box-shadow: 0 6px 18px rgba(138, 154, 123, 0.25),
                inset 0 -4px 10px rgba(100, 120, 85, 0.2);
}

/* Left leaves (odd) */
.fern-leaf-1 {
    width: 50px; height: 22px;
    top: 10%; margin-left: -55px;
    transform: rotate(-25deg);
}
.fern-leaf-3 {
    width: 60px; height: 26px;
    top: 25%; margin-left: -65px;
    transform: rotate(-20deg);
}
.fern-leaf-5 {
    width: 65px; height: 28px;
    top: 40%; margin-left: -70px;
    transform: rotate(-15deg);
}
.fern-leaf-7 {
    width: 55px; height: 24px;
    top: 55%; margin-left: -60px;
    transform: rotate(-20deg);
}
.fern-leaf-9 {
    width: 40px; height: 18px;
    top: 70%; margin-left: -45px;
    transform: rotate(-25deg);
}

/* Right leaves (even) */
.fern-leaf-2 {
    width: 50px; height: 22px;
    top: 17%; margin-left: 5px;
    transform: rotate(25deg);
    border-radius: 0 50% 0 50%;
}
.fern-leaf-4 {
    width: 60px; height: 26px;
    top: 32%; margin-left: 5px;
    transform: rotate(20deg);
    border-radius: 0 50% 0 50%;
}
.fern-leaf-6 {
    width: 65px; height: 28px;
    top: 47%; margin-left: 5px;
    transform: rotate(15deg);
    border-radius: 0 50% 0 50%;
}
.fern-leaf-8 {
    width: 55px; height: 24px;
    top: 62%; margin-left: 5px;
    transform: rotate(20deg);
    border-radius: 0 50% 0 50%;
}
.fern-leaf-10 {
    width: 40px; height: 18px;
    top: 77%; margin-left: 5px;
    transform: rotate(25deg);
    border-radius: 0 50% 0 50%;
}

/* --- Seed Pod --- */
.seed-pod {
    position: relative;
    width: 160px;
    height: 260px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.seed-pod:hover {
    transform: scale(1.04);
}

.pod-outer {
    position: absolute;
    top: 0; left: 50%;
    width: 140px; height: 240px;
    margin-left: -70px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 45% 35%, #d4bc9a, #c4a882);
    box-shadow: 0 12px 40px rgba(139, 115, 85, 0.15),
                inset 0 -8px 20px rgba(139, 115, 85, 0.15);
    transition: box-shadow 0.6s ease-out;
}

.seed-pod:hover .pod-outer {
    box-shadow: 0 16px 50px rgba(201, 145, 122, 0.2),
                inset 0 -10px 24px rgba(139, 115, 85, 0.2);
}

.pod-inner-1, .pod-inner-2, .pod-inner-3, .pod-inner-4, .pod-inner-5 {
    position: absolute;
    left: 50%;
    border-radius: 50%;
    border: 1px solid #a89278;
    background: transparent;
}

.pod-inner-1 {
    width: 110px; height: 50px;
    top: 30px; margin-left: -55px;
}
.pod-inner-2 {
    width: 115px; height: 50px;
    top: 65px; margin-left: -57px;
}
.pod-inner-3 {
    width: 110px; height: 50px;
    top: 100px; margin-left: -55px;
}
.pod-inner-4 {
    width: 100px; height: 50px;
    top: 135px; margin-left: -50px;
}
.pod-inner-5 {
    width: 85px; height: 45px;
    top: 168px; margin-left: -42px;
}

.pod-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, #c4a882, #a89278);
    box-shadow: 0 2px 8px rgba(139, 115, 85, 0.15);
}

/* --- Clearing Section (final) --- */
.clearing-section {
    position: relative;
    min-height: 60vh;
    background: #f5f0e8;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.clearing-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.clearing-inner {
    text-align: center;
    max-width: 640px;
    padding: 80px 40px;
}

.clearing-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.85;
    color: #6b5d4f;
    margin-top: 16px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-inner {
        flex-direction: column;
        padding: 20vh 24px 15vh;
        gap: 40px;
    }

    .specimen-card {
        flex-direction: column;
        gap: 30px;
    }

    .section-offset-right,
    .section-offset-left {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-nav {
        transform: rotate(-35deg) scale(0.9);
    }

    .peony {
        width: 200px;
        height: 200px;
    }

    .peony .peony-layer {
        transform: scale(0.72);
    }

    .fern {
        width: 150px;
        height: 250px;
    }

    .seed-pod {
        width: 120px;
        height: 200px;
    }

    .specimen-card-visual {
        flex: none;
        min-height: 240px;
    }
}
