/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    line-height: 1.85;
    color: #4a3f35;
    background: #f2ece3;
    overflow-x: hidden;
}

/* Linen texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background:
        repeating-linear-gradient(45deg, #f2ece3 0px, #efe8dc 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(135deg, #f2ece3 0px, #efe8dc 1px, transparent 1px, transparent 4px);
    opacity: 0.06;
}

/* === PROGRESS BAR === */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 0%;
    background: #b08d57;
    z-index: 10000;
    transition: height 50ms linear;
}

/* === NAVIGATION === */
#nav-trigger {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: transform 400ms ease-out;
}

#nav-trigger:hover {
    transform: scale(1.15);
}

.chevron {
    width: 18px;
    height: 8px;
    position: relative;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chevron::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 50%;
    height: 1.5px;
    background: #b08d57;
    transform: rotate(-35deg);
    transform-origin: right center;
}

.chevron::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 50%;
    height: 1.5px;
    background: #b08d57;
    transform: rotate(35deg);
    transform-origin: left center;
}

.chevron-1 { width: 12px; }
.chevron-2 { width: 16px; }
.chevron-3 { width: 20px; }

/* Nav open state */
#nav-trigger.open .chevron-1 { transform: translate(-12px, -8px) rotate(-30deg); }
#nav-trigger.open .chevron-2 { transform: translate(-14px, 0) rotate(0deg); }
#nav-trigger.open .chevron-3 { transform: translate(-10px, 8px) rotate(30deg); }

#radial-menu {
    position: fixed;
    top: 2rem;
    left: 3.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    transition: opacity 300ms ease, transform 300ms ease;
}

#radial-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
}

#radial-menu.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.menu-item {
    font-family: 'Poiret One', cursive;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b08d57;
    text-decoration: none;
    transition: color 200ms ease;
}

.menu-item:hover {
    color: #c4917b;
}

/* === BANDS === */
.band {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 12vh 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.band-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Band 1: Hero */
.band-1 {
    background: linear-gradient(175deg, #2c2418 0%, #5e4a5c 35%, #9b96a8 60%, #f2ece3 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    z-index: 10;
    min-height: 100vh;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 9vw, 7.5rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f2ece3;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: #9b96a8;
    letter-spacing: 0.04em;
}

/* Band 2: Narrative */
.band-2 {
    background: #f2ece3;
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    margin-top: -12vh;
    z-index: 20;
}

.chevron-border {
    position: absolute;
    top: 8%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #b08d57 20%, #b08d57 80%, transparent 100%);
    border-top: 1px solid #b08d57;
    border-bottom: 1px solid #b08d57;
}

.narrative-content {
    max-width: 48ch;
    margin: 0 auto;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9b96a8;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 400ms ease, transform 400ms ease;
}

.section-label.visible {
    opacity: 1;
    transform: translateX(0);
}

.section-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    letter-spacing: 0.08em;
    color: #4a3f35;
    margin-bottom: 2rem;
}

.narrative-content p {
    margin-bottom: 1.5rem;
    color: #4a3f35;
}

/* Band 3: Gallery */
.band-3 {
    background: linear-gradient(180deg, rgba(138, 154, 124, 0.15) 0%, rgba(138, 154, 124, 0.08) 100%); /* #8a9a7c tinted */
    clip-path: polygon(0 0, 100% 6%, 100% 94%, 0 100%);
    margin-top: -12vh;
    z-index: 30;
}

.gallery-content {
    text-align: center;
}

.gallery-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.gallery-card {
    width: 300px;
    height: 220px;
    background: linear-gradient(160deg, #f2ece3 0%, #e8dfd2 100%);
    border: 1px solid #a89070;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 300ms ease;
}

.gallery-card:nth-child(1) { transform: translateY(0); }
.gallery-card:nth-child(2) { transform: translateY(3rem); }
.gallery-card:nth-child(3) { transform: translateY(6rem); }

.gallery-card:hover {
    transform: translateY(0) scale(1.02);
}

.card-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.card-label {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4a3f35;
    background: rgba(242, 236, 227, 0.85);
    padding: 0.2rem 0.5rem;
}

/* Band 4: Interlude */
.band-4 {
    background: #5e4a5c;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin-top: -12vh;
    z-index: 40;
    min-height: 50vh;
}

.interlude-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.haiku {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 2.2;
    color: #c4917b;
}

.morph-rule {
    margin-top: 3rem;
    position: relative;
    height: 40px;
    width: 100%;
    cursor: pointer;
}

.rule-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: #c4917b;
    transition: opacity 400ms ease;
}

.rule-ridge {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    width: 80%;
    height: 100%;
    opacity: 0;
    transition: opacity 400ms ease;
}

.morph-rule:hover .rule-line {
    opacity: 0;
}

.morph-rule:hover .rule-ridge {
    opacity: 1;
}

/* Band 5: Details */
.band-5 {
    background: #f2ece3;
    clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 93%);
    margin-top: -12vh;
    z-index: 50;
}

.details-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.details-text p {
    margin-bottom: 1.5rem;
    color: #4a3f35;
}

.details-pattern {
    width: 100%;
    height: 300px;
    background: #2c2418;
    border-radius: 2px;
    overflow: hidden;
}

#details-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Band 6: Closing */
.band-6 {
    background: #2c2418;
    clip-path: none;
    margin-top: -12vh;
    z-index: 60;
    min-height: 60vh;
}

.closing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mountain-glyph-large {
    transition: transform 400ms ease-out;
}

.mountain-glyph-large:hover {
    transform: scale(1.15);
}

.closing-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #f2ece3;
}

.closing-sub {
    font-family: 'Lora', serif;
    font-style: italic;
    color: #9b96a8;
    font-size: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .band-1 { clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
    .band-2 { clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%); }
    .band-3 { clip-path: polygon(0 0, 100% 3%, 100% 97%, 0 100%); }
    .band-4 { clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%); }
    .band-5 { clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%); }

    .gallery-cards {
        flex-direction: column;
        align-items: center;
    }

    .gallery-card:nth-child(2),
    .gallery-card:nth-child(3) {
        transform: translateY(0);
    }

    .details-content {
        grid-template-columns: 1fr;
    }

    .details-pattern {
        height: 200px;
    }

    #nav-trigger {
        top: auto;
        bottom: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
    }

    #radial-menu {
        top: auto;
        bottom: 4rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    #radial-menu.hidden {
        transform: translateX(-50%) translateY(10px);
    }

    #radial-menu.visible {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    body {
        font-size: 1.05rem;
    }

    .band-1 { clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
    .band-2 { clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); }
    .band-3 { clip-path: polygon(0 0, 100% 2%, 100% 98%, 0 100%); }
    .band-4 { clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); }
    .band-5 { clip-path: polygon(0 0, 100% 2%, 100% 100%, 0 98%); }
}

/* Touch devices */
@media (hover: none) {
    .morph-rule:active .rule-line { opacity: 0; }
    .morph-rule:active .rule-ridge { opacity: 1; }
}
