/* aei.st - Avant-Garde Gallery Design */

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

::selection {
    background: #C4A77D;
    color: #0B0C10;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0B0C10;
    color: #E8E2D6;
    font-family: 'Libre Baskerville', serif;
    font-size: 18px;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* === Navigation === */
#nav-glyph {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

#nav-glyph.visible {
    opacity: 1;
}

#nav-glyph:hover svg path {
    stroke: #B84233;
    transition: stroke 0.3s ease-out;
}

#delta-nav path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

#delta-nav.drawn path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-in-out;
}

/* === Nav Overlay === */
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 12, 16, 0.95);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-out;
}

#nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-radial {
    position: relative;
    width: 400px;
    height: 400px;
}

.nav-item {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B8B0A0;
    text-decoration: none;
    transform-origin: center;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-160px);
    transition: color 0.3s ease-out;
}

.nav-item:hover {
    color: #C4A77D;
}

/* === Sections === */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* === Threshold (Hero) === */
.threshold {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0B0C10;
}

.threshold-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    padding: 0 48px;
}

.delta-hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.delta-hero path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.delta-hero.animate path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-in-out;
}

.delta-hero.shrink {
    animation: shrinkToCorner 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes shrinkToCorner {
    to {
        top: 28px;
        left: 28px;
        transform: translate(0, 0) scale(0.267);
        opacity: 0;
    }
}

.hero-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 900;
    font-size: clamp(80px, 40vw, 180px);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #E8E2D6;
    line-height: 0.85;
    opacity: 0;
    transition: opacity 0.8s ease-out;
    position: relative;
}

.hero-title.visible {
    opacity: 1;
}

.hero-rule {
    width: 1px;
    height: 0;
    background: #C4A77D;
    position: absolute;
    right: 40%;
    top: 50%;
    transform: translateY(-50%);
    transition: height 0.8s ease-out;
}

.hero-rule.visible {
    height: 200px;
}

.hero-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 22px;
    color: #B8B0A0;
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 35%;
    opacity: 0;
    transition: opacity 1s ease-out 0.5s;
}

.hero-text.visible {
    opacity: 1;
}

/* === Diagonal Cut === */
.diagonal-cut {
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
    background: #1A1B23;
    padding: 120px 0;
}

.diagonal-cut::before {
    content: '';
    position: absolute;
    top: 4%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #C4A77D;
    transform: rotate(-7deg);
    transform-origin: left center;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.diagonal-cut.in-view::before {
    opacity: 1;
}

/* === Catalog Number === */
.catalog-number {
    position: absolute;
    top: 48px;
    right: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2E2F38;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.diagonal-cut.in-view .catalog-number {
    opacity: 1;
}

/* === Split Screen === */
.split-screen {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 48px;
    gap: 48px;
    align-items: center;
}

.left-heavy .panel-main {
    flex: 0 0 60%;
}

.left-heavy .panel-sidebar {
    flex: 0 0 calc(40% - 48px);
}

.right-heavy .panel-main {
    flex: 0 0 60%;
    order: 2;
}

.right-heavy .panel-sidebar {
    flex: 0 0 calc(40% - 48px);
    order: 1;
}

/* === Panel Content === */
.section-heading {
    font-family: 'Bodoni Moda', serif;
    font-weight: 900;
    font-size: clamp(48px, 8vw, 80px);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #E8E2D6;
    line-height: 1;
    margin-bottom: 24px;
}

.bronze-rule {
    width: 0;
    height: 1px;
    background: #C4A77D;
    margin-bottom: 32px;
    transition: width 0.6s ease-out;
}

.in-view .bronze-rule {
    width: 120px;
}

.body-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 17px;
    line-height: 1.72;
    color: #E8E2D6;
    margin-bottom: 20px;
    letter-spacing: 0.005em;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* === Sidebar Elements === */
.date-pillar {
    font-family: 'Bodoni Moda', serif;
    font-weight: 900;
    font-size: 120px;
    color: #1A1B23;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1;
    opacity: 0.3;
}

.pull-quote {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 22px;
    color: #B8B0A0;
    line-height: 1.6;
    padding-left: 24px;
    border-left: 1px solid #C4A77D;
}

.meta-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2E2F38;
    margin-top: 16px;
}

.meta-label:first-child {
    margin-top: 0;
}

.meta-value {
    font-family: 'Libre Baskerville', serif;
    font-size: 15px;
    color: #B8B0A0;
}

/* === Corridor === */
.corridor {
    background: #0B0C10;
    min-height: 30vh;
    height: 30vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.corridor-scroll {
    display: flex;
    gap: 24px;
    padding: 24px 48px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.corridor-scroll::-webkit-scrollbar {
    display: none;
}

.corridor-card {
    flex: 0 0 280px;
    height: 180px;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.corridor-card.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* === Vitrine (Double Border) === */
.vitrine {
    box-shadow: 0 0 0 1px #2E2F38, 0 0 0 5px transparent, 0 0 0 6px #2E2F38;
    transition: box-shadow 0.4s ease-out, opacity 0.4s ease-out, transform 0.4s ease-out;
}

.vitrine:hover {
    box-shadow: 0 0 0 1px #C4A77D, 0 0 0 5px transparent, 0 0 0 6px #2E2F38;
}

.card-content {
    text-align: center;
    padding: 24px;
}

.card-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C4A77D;
    display: block;
    margin-bottom: 12px;
}

.card-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 15px;
    color: #B8B0A0;
}

/* === Archive Room === */
.archive-room {
    background: #0B0C10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

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

.delta-watermark {
    margin-bottom: 32px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.archive-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B8B0A0;
    margin-bottom: 8px;
}

.archive-year {
    font-family: 'Bodoni Moda', serif;
    font-size: 14px;
    font-weight: 500;
    color: #2E2F38;
    letter-spacing: 0.2em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .split-screen {
        flex-direction: column;
        padding: 40px 24px;
    }

    .left-heavy .panel-main,
    .left-heavy .panel-sidebar,
    .right-heavy .panel-main,
    .right-heavy .panel-sidebar {
        flex: 1 1 100%;
    }

    .right-heavy .panel-main {
        order: 1;
    }

    .right-heavy .panel-sidebar {
        order: 2;
    }

    .hero-text {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        max-width: 100%;
        margin-top: 32px;
    }

    .hero-rule {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 1px;
        margin: 24px 0;
    }

    .hero-rule.visible {
        height: 80px;
    }

    .threshold-content {
        padding: 0 24px;
    }

    .date-pillar {
        writing-mode: horizontal-tb;
        font-size: 64px;
    }

    .diagonal-cut {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    }
}
