/* ==========================================================================
   a6c.xyz - Art Deco Luxury Coordinate System
   Colors: #0a0a0f, #0f1a2e, #c9a84c, #8b7335, #1a6b5a, #8b1a2b, #e8e0d0, #7a7a8a
   Fonts: Poiret One, Cinzel Decorative, Cormorant Garamond, Josefin Sans
   ========================================================================== */

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

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

body {
    background-color: #0a0a0f;
    color: #e8e0d0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Typography Utility --- */
.engraved-text {
    color: #c9a84c;
    text-shadow:
        0 1px 0 #1a1a2f,
        0 -1px 0 rgba(201, 168, 76, 0.3);
}

/* ==========================================================================
   Hero Vault
   ========================================================================== */
#hero-vault {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0f;
    overflow: hidden;
}

#hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* --- Rosette SVG --- */
#rosette-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vmin;
    height: 90vmin;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#rosette-svg.visible {
    opacity: 1;
}

#rosette-svg .ray {
    stroke: #c9a84c;
    stroke-linecap: round;
    fill: none;
    will-change: stroke-dashoffset;
}

#rosette-svg .primary-ray {
    stroke-width: 2.5;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

#rosette-svg .secondary-ray {
    stroke-width: 1.5;
    stroke-opacity: 0.7;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

#rosette-svg .tertiary-ray {
    stroke-width: 0.8;
    stroke-opacity: 0.4;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

#rosette-svg .ray.animate {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-out;
}

#rosette-svg .ring {
    fill: none;
    stroke: #c9a84c;
    stroke-width: 0.8;
    stroke-opacity: 0.2;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

#rosette-svg .ring.animate {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s ease-out;
}

#rosette-svg .diamond {
    fill: #c9a84c;
    opacity: 0;
    transition: opacity 0.6s ease 1.8s;
}

#rosette-svg .diamond.visible {
    opacity: 1;
}

#rosette-svg .axis-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 24px;
    fill: #c9a84c;
    text-anchor: middle;
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.8s ease 2s;
}

#rosette-svg .axis-label.visible {
    opacity: 0.6;
}

/* Rosette collapse on scroll */
#rosette-svg.collapsed {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0.1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* --- Hero Cartouche --- */
#hero-cartouche {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease, letter-spacing 0.8s ease;
}

#hero-cartouche.visible {
    opacity: 1;
}

.cartouche-border-top,
.cartouche-border-bottom {
    width: 200px;
    height: 2px;
    margin: 0 auto;
    position: relative;
}

.cartouche-border-top {
    margin-bottom: 24px;
    background: linear-gradient(90deg, transparent, #c9a84c 20%, #c9a84c 80%, transparent);
}

.cartouche-border-top::before,
.cartouche-border-top::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #c9a84c;
    transform: rotate(45deg);
}

.cartouche-border-top::before { left: 20%; }
.cartouche-border-top::after { right: 20%; }

.cartouche-border-bottom {
    margin-top: 24px;
    background: linear-gradient(90deg, transparent, #c9a84c 20%, #c9a84c 80%, transparent);
}

.cartouche-border-bottom::before,
.cartouche-border-bottom::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #c9a84c;
    transform: rotate(45deg);
}

.cartouche-border-bottom::before { left: 20%; }
.cartouche-border-bottom::after { right: 20%; }

#hero-title {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 10vw, 9rem);
    text-transform: uppercase;
    letter-spacing: 0.8em;
    color: #c9a84c;
    text-shadow:
        0 1px 0 #1a1a2f,
        0 -1px 0 rgba(201, 168, 76, 0.3);
    transition: letter-spacing 0.8s ease;
}

#hero-cartouche.visible #hero-title {
    letter-spacing: 0.25em;
}

.hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7a7a8a;
    margin-top: 8px;
}

/* ==========================================================================
   Geometric Tramlines
   ========================================================================== */
.tramline {
    position: relative;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tramline::before,
.tramline::after {
    content: '';
    position: absolute;
    height: 2px;
    background: #c9a84c;
}

.tramline-z1::before {
    width: 60%;
    top: 50%;
    left: 20%;
    transform: rotate(3deg);
}

.tramline-z1::after {
    width: 60%;
    top: calc(50% + 10px);
    left: 20%;
    transform: rotate(3deg);
    opacity: 0.4;
}

.tramline-z2::before {
    width: 60%;
    top: 50%;
    left: 20%;
    transform: rotate(-3deg);
}

.tramline-z2::after {
    width: 60%;
    top: calc(50% + 10px);
    left: 20%;
    transform: rotate(-3deg);
    opacity: 0.4;
}

/* ==========================================================================
   Junction Diamonds
   ========================================================================== */
.junction-diamond {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* ==========================================================================
   Diagonal Passages
   ========================================================================== */
.diagonal-passage {
    position: relative;
    min-height: 80vh;
    padding: 80px 0;
    overflow: hidden;
}

/* Diagonal clip-path for passage one (upper-left to lower-right) */
#diagonal-one {
    background-color: #0f1a2e;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

/* Diagonal clip-path for passage two (upper-right to lower-left) */
#diagonal-two {
    background-color: #0f1a2e;
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
}

/* Ziggurat Step Profiles */
.ziggurat-top,
.ziggurat-bottom {
    position: relative;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ziggurat-top::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    background:
        linear-gradient(to right, transparent 0%, transparent 10%, #c9a84c 10%, #c9a84c 10.5%, transparent 10.5%,
        transparent 89.5%, #c9a84c 89.5%, #c9a84c 90%, transparent 90%);
}

.ziggurat-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    background:
        linear-gradient(to right, transparent 0%, transparent 10%, #c9a84c 10%, #c9a84c 10.5%, transparent 10.5%,
        transparent 89.5%, #c9a84c 89.5%, #c9a84c 90%, transparent 90%);
}

/* Sunray step border motif */
.diagonal-passage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #c9a84c 0px,
        #c9a84c 2px,
        #1a6b5a 2px,
        #1a6b5a 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: 0.5;
}

.diagonal-passage::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #c9a84c 0px,
        #c9a84c 2px,
        #1a6b5a 2px,
        #1a6b5a 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: 0.5;
}

/* Diagonal Content */
.diagonal-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 40px;
    position: relative;
}

/* Chevron Borders */
.chevron-border {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
}

.chevron-border.left {
    left: 0;
    background: repeating-linear-gradient(
        180deg,
        #c9a84c 0px,
        #c9a84c 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.3;
    clip-path: polygon(100% 0, 100% 100%, 0 90%, 0 10%);
}

.chevron-border.right {
    right: 0;
    background: repeating-linear-gradient(
        180deg,
        #c9a84c 0px,
        #c9a84c 8px,
        transparent 8px,
        transparent 16px
    );
    opacity: 0.3;
    clip-path: polygon(0 0, 0 100%, 100% 90%, 100% 10%);
}

/* Passage Text */
.passage-text {
    padding: 0 40px;
}

.passage-paragraph {
    margin-bottom: 28px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.8;
    color: #e8e0d0;
    opacity: 0;
    transform: translate(10px, 10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.passage-paragraph.visible {
    opacity: 1;
    transform: translate(0, 0);
}

.passage-paragraph em {
    color: #c9a84c;
    font-style: italic;
}

.compass-point {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.compass-point svg {
    transition: transform 3s ease-in-out;
}

.compass-point:hover svg {
    transform: rotate(360deg);
}

/* ==========================================================================
   Central Medallion
   ========================================================================== */
#central-medallion {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0f;
    overflow: hidden;
}

.medallion-container {
    position: relative;
    width: 80vmin;
    height: 80vmin;
    max-width: 600px;
    max-height: 600px;
}

#compass-rose {
    width: 100%;
    height: 100%;
}

/* Compass Rings with orrery rotation */
.compass-ring {
    fill: none;
    stroke: #c9a84c;
    stroke-width: 1;
}

.compass-ring-5 {
    stroke-opacity: 0.15;
    animation: rotateRing 120s linear infinite;
    transform-origin: 300px 300px;
}

.compass-ring-4 {
    stroke-opacity: 0.25;
    animation: rotateRingReverse 90s linear infinite;
    transform-origin: 300px 300px;
}

.compass-ring-3 {
    stroke-opacity: 0.35;
    animation: rotateRing 60s linear infinite;
    transform-origin: 300px 300px;
}

.compass-ring-2 {
    stroke-opacity: 0.45;
    animation: rotateRingReverse 45s linear infinite;
    transform-origin: 300px 300px;
}

.compass-ring-1 {
    stroke-opacity: 0.6;
    animation: rotateRing 30s linear infinite;
    transform-origin: 300px 300px;
}

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

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

/* Compass Rays */
.compass-ray {
    stroke: #c9a84c;
    stroke-width: 1.5;
    stroke-opacity: 0.5;
}

.compass-ray-diag {
    stroke: #8b7335;
    stroke-width: 0.8;
    stroke-opacity: 0.3;
}

/* Compass Quadrants (hover areas) */
.compass-quadrant {
    fill: transparent;
    stroke: none;
    cursor: pointer;
    transition: fill 0.4s ease;
}

.compass-quadrant:hover {
    fill: rgba(26, 107, 90, 0.2);
}

.compass-quadrant.active {
    fill: rgba(26, 107, 90, 0.25);
}

.compass-center {
    fill: #c9a84c;
}

/* Compass Tooltip */
.compass-tooltip {
    position: absolute;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8b7335, #c9a84c);
    color: #0a0a0f;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compass-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-label {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.2em;
}

.tooltip-desc {
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Timeline (Diagonal Passage Two)
   ========================================================================== */
.timeline {
    position: relative;
}

.timeline-station {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 12px;
}

.station-diamond {
    flex-shrink: 0;
    padding-top: 4px;
}

.station-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.station-year {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c9a84c;
    text-shadow:
        0 1px 0 #1a1a2f,
        0 -1px 0 rgba(201, 168, 76, 0.3);
}

.station-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.8;
    color: #e8e0d0;
}

.timeline-rail {
    width: 2px;
    height: 40px;
    margin-left: 7px;
    background: linear-gradient(to bottom, #c9a84c, #8b7335);
    opacity: 0.4;
}

/* ==========================================================================
   Enamel Inlay Panels
   ========================================================================== */
#enamel-panels {
    padding: 100px 40px;
    text-align: center;
    background-color: #0a0a0f;
}

.section-heading {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c9a84c;
    text-shadow:
        0 1px 0 #1a1a2f,
        0 -1px 0 rgba(201, 168, 76, 0.3);
    margin-bottom: 60px;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.enamel-panel {
    perspective: 1000px;
}

.panel-inner {
    position: relative;
    background-color: #0f1a2e;
    border: 1px solid #c9a84c;
    padding: 48px 32px;
    text-align: center;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.panel-inner:hover {
    box-shadow: inset 0 0 30px rgba(26, 107, 90, 0.3);
}

.panel-icon {
    margin-bottom: 24px;
}

.panel-title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c9a84c;
    text-shadow:
        0 1px 0 #1a1a2f,
        0 -1px 0 rgba(201, 168, 76, 0.3);
    margin-bottom: 16px;
}

.panel-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: #7a7a8a;
}

/* ==========================================================================
   Footer Plinth
   ========================================================================== */
#footer-plinth {
    position: relative;
    margin-top: 60px;
}

.plinth-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.plinth-band-1 {
    height: 40px;
    background-color: #0f1a2e;
}

.plinth-band-2 {
    height: 30px;
    background-color: #0c1424;
}

.plinth-band-3 {
    height: 24px;
    background-color: #0a0f1c;
}

.plinth-band-4 {
    height: 50px;
    background-color: #080c16;
}

.plinth-band-5 {
    height: 40px;
    background-color: #060a12;
}

.footer-rosette {
    opacity: 0.5;
}

.footer-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #7a7a8a;
}

.footer-separator {
    color: #c9a84c;
    opacity: 0.4;
}

.footer-meta {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #7a7a8a;
    opacity: 0.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .diagonal-content {
        padding: 30px 20px;
    }

    .passage-text {
        padding: 0 16px;
    }

    #diagonal-one,
    #diagonal-two {
        clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    }

    .panels-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }

    #enamel-panels {
        padding: 60px 20px;
    }

    .cartouche-border-top,
    .cartouche-border-bottom {
        width: 140px;
    }

    .medallion-container {
        width: 90vmin;
        height: 90vmin;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .section-heading {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }

    .diagonal-content {
        padding: 20px 12px;
    }

    .passage-text {
        padding: 0 8px;
    }
}
