/* ============================================
   aei.st — Styles
   Art Deco Cinema Palace / Geometric Abstraction
   ============================================ */

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

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
    background: #07080d;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.85;
    color: #e8dcc8;
    background: #07080d;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography Classes --- */
.display-text {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a84c;
    line-height: 1.1;
}

.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.85;
    color: #e8dcc8;
}

.body-text em {
    font-weight: 400;
    font-style: italic;
    color: #d4943a;
}

.caption-text {
    font-family: 'Josefin Sans', 'Futura', sans-serif;
    font-weight: 300;
    font-size: 13px;
    font-variant: small-caps;
    letter-spacing: 0.2em;
    color: #b8a77c;
    text-transform: lowercase;
}

/* --- Scroll Snap Chambers --- */
.chamber {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chamber-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    padding: 0 80px;
}

.chamber-bg-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Golden Elevator Indicator --- */
#elevator-indicator {
    position: fixed;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 1px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#elevator-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: #c9a84c;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0.4;
}

.elevator-diamond {
    position: absolute;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border: 1px solid #c9a84c;
    background: transparent;
    opacity: 0.3;
    transition: opacity 0.5s ease, background 0.5s ease;
}

.elevator-diamond:nth-child(2) { top: 10%; }
.elevator-diamond:nth-child(3) { top: 30%; }
.elevator-diamond:nth-child(4) { top: 50%; }
.elevator-diamond:nth-child(5) { top: 70%; }
.elevator-diamond:nth-child(6) { top: 90%; }

.elevator-diamond.active {
    opacity: 1;
    background: #c9a84c;
}

/* --- Scroll Chevron --- */
.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    animation: pulseChevron 2.5s ease-in-out infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-chevron:hover {
    opacity: 1;
}

@keyframes pulseChevron {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50% { transform: translateX(-50%) translateY(6px); opacity: 0.8; }
}

/* ============================================
   CHAMBER 1: The Vestibule (Hero)
   ============================================ */
#vestibule {
    background: #07080d;
}

.rosette-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

#hero-rosette {
    max-width: 380px;
    max-height: 380px;
    width: 60vw;
    height: 60vw;
}

.rosette-layer {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    opacity: 0;
}

.rosette-layer.animate {
    animation: drawRosette 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes drawRosette {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.hero-text {
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.hero-text.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero-title {
    margin-bottom: 12px;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.18em;
}

#hero-subtitle {
    font-size: 15px;
    letter-spacing: 0.25em;
}

/* ============================================
   CHAMBER 2: The Gallery (Statement)
   ============================================ */
#gallery {
    background: #0b0e1a;
}

.gallery-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.z-row {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    width: 100%;
}

.z-row-right {
    flex-direction: row-reverse;
    text-align: right;
}

.z-row-right .z-text {
    text-align: right;
}

.z-initial-cap {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.decorative-initial {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(4rem, 8vw, 7rem);
    color: #c9a84c;
    line-height: 0.85;
    opacity: 0.85;
}

.z-text {
    flex: 1;
    min-width: 0;
}

/* Chamfered Frame */
.chamfered-frame {
    position: relative;
    padding: 30px 35px;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.chamfered-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    border: 1px solid rgba(201, 168, 76, 0.3);
    pointer-events: none;
}

/* Golden Divider */
.golden-divider {
    width: 200px;
    display: flex;
    justify-content: center;
}

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

/* Filigree borders */
.filigree {
    width: 80%;
    height: 20px;
    opacity: 0;
}

.filigree.animate {
    opacity: 1;
}

.filigree-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

.filigree-path.animate {
    animation: drawFiligree 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes drawFiligree {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   CHAMBER 3: The Atelier
   ============================================ */
#atelier {
    background: #151820;
}

.atelier-content {
    display: flex;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
}

.atelier-text {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chamber-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 8px;
}

.golden-rule-small {
    width: 80px;
    height: 1px;
    background: #c9a84c;
    margin-bottom: 12px;
}

.atelier-geometry {
    flex: 0 0 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    max-height: 500px;
}

#atelier-svg {
    max-width: 400px;
}

/* Geometric rotations */
.geo-rotate-slow {
    transform-origin: 250px 300px;
    animation: geoRotateSlow 60s linear infinite;
}

.geo-rotate-reverse {
    transform-origin: 250px 300px;
    animation: geoRotateReverse 45s linear infinite;
}

.geo-rotate-medium {
    transform-origin: 250px 300px;
    animation: geoRotateMedium 30s linear infinite;
}

@keyframes geoRotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes geoRotateReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes geoRotateMedium {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   CHAMBER 4: The Salon
   ============================================ */
#salon {
    background: #0b0e1a;
}

.salon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.section-rosette {
    opacity: 0.6;
}

.salon-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

/* Chamfered Card */
.chamfered-card {
    position: relative;
    padding: 35px 30px 30px;
    background: rgba(11, 14, 26, 0.6);
    border: 1px solid rgba(201, 168, 76, 0.25);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
    cursor: default;
    transition: border-color 300ms ease, box-shadow 300ms ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.chamfered-card:hover {
    border-color: #d4b85c;
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

.chamfered-card blockquote {
    margin-bottom: 18px;
}

.chamfered-card blockquote p {
    font-style: italic;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
}

.chamfered-card cite {
    display: block;
    text-align: right;
}

/* ============================================
   CHAMBER 5: The Exit (Colophon)
   ============================================ */
#exit {
    background: linear-gradient(to bottom, #0b0e1a 0%, #07080d 60%, #000000 100%);
}

.exit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.exit-chevrons {
    opacity: 0.5;
    margin-bottom: 20px;
}

.exit-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.colophon-text {
    font-size: 14px;
    letter-spacing: 0.25em;
    margin-top: 10px;
}

.colophon-year {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.35em;
    color: #6b6e7a;
}

.terminal-diamond {
    margin-top: 20px;
    opacity: 0.6;
}

/* ============================================
   Stagger Text Animation
   ============================================ */
.stagger-text {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.stagger-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Chiaroscuro Depth
   ============================================ */
.gallery-decor {
    background: radial-gradient(ellipse at 30% 40%, rgba(201, 168, 76, 0.03) 0%, transparent 60%);
}

.atelier-decor {
    background: radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.025) 0%, transparent 50%);
}

.salon-decor {
    background: radial-gradient(ellipse at 50% 30%, rgba(201, 168, 76, 0.02) 0%, transparent 50%);
}

.exit-decor {
    background: radial-gradient(ellipse at 50% 60%, rgba(201, 168, 76, 0.015) 0%, transparent 40%);
}

/* ============================================
   Garnet Red Accent (rare punctuation)
   #8b2942 used sparingly per design spec
   ============================================ */
.decorative-initial:first-of-type {
    text-shadow: 2px 2px 20px #8b2942;
}

.colophon-year::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #8b2942;
    margin-left: 10px;
    transform: rotate(45deg);
    vertical-align: middle;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .chamber-content {
        padding: 0 40px;
    }

    .z-row {
        flex-direction: column;
        gap: 20px;
    }

    .z-row-right {
        flex-direction: column;
    }

    .z-row-right .z-text {
        text-align: left;
    }

    .z-initial-cap {
        align-self: flex-start;
    }

    .atelier-content {
        flex-direction: column;
        gap: 30px;
    }

    .atelier-text {
        flex: none;
        width: 100%;
    }

    .atelier-geometry {
        flex: none;
        width: 100%;
        height: 40vh;
    }

    .salon-cards {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    #elevator-indicator {
        display: none;
    }
}

@media (max-width: 600px) {
    .chamber-content {
        padding: 0 24px;
    }

    .body-text {
        font-size: 16px;
    }

    .chamfered-frame {
        padding: 20px 22px;
    }

    .salon-cards {
        gap: 20px;
    }

    .chamfered-card {
        padding: 25px 20px 20px;
    }
}
