/* =============================================================
   sora.markets — Art Deco Pavilion
   Midnight & Gold duotone. Sunburst geometry. Layered nacre.
   ============================================================= */

:root {
    --bg-deep: #0A0D1A;
    --bg-mid: #12162A;
    --bg-light: #1A1F38;
    --bg-sky-top: #1A2040;

    --gold-primary: #C9A84C;
    --gold-light: #E8D5A0;
    --gold-dim: #8A7A4A;
    --shell-accent: #D4B86A;

    --text-primary: #E8E0D0;
    --text-secondary: #A0988A;

    --font-display: "Poiret One", "Cormorant Garamond", serif;
    --font-body: "Cormorant Garamond", Georgia, serif;
    --font-label: "Josefin Sans", "Helvetica Neue", sans-serif;
    --font-kanji: "Noto Serif JP", "Cormorant Garamond", serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0; /* Art Deco — no rounded corners */
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* =============================================================
   Fixed Sunburst Background Layer
   ============================================================= */

.sunburst-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.sunburst-fixed .sunburst-rays line {
    stroke: var(--gold-primary);
    stroke-width: 0.08;
    opacity: 0.22;
    vector-effect: non-scaling-stroke;
}

/* Subtle pulse on the fixed sunburst */
.sunburst-fixed .sunburst-rays {
    animation: sunburst-breath 14s ease-in-out infinite;
    transform-origin: 50% 30%;
}

@keyframes sunburst-breath {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

/* =============================================================
   Fixed Hall Navigation
   ============================================================= */

.hall-nav {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-primary);
    padding: 10px 16px;
    border: 1px solid rgba(201, 168, 76, 0.35);
    background: rgba(10, 13, 26, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    gap: 10px;
    align-items: center;
    transition: opacity 600ms ease, transform 600ms ease;
}

.hall-nav-prefix {
    color: var(--gold-dim);
}

.hall-nav-name {
    color: var(--gold-light);
    transition: opacity 400ms ease, transform 400ms ease;
}

.hall-nav-name.is-changing {
    opacity: 0;
    transform: translateY(-4px);
}

/* =============================================================
   Pavilion Container
   ============================================================= */

.pavilion {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hall {
    position: relative;
    width: 100%;
    z-index: 1;
}

/* =============================================================
   Hall 1: Entrance (0–120vh)
   ============================================================= */

.hall-entrance {
    height: 120vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    position: relative;
}

.entrance-center {
    position: relative;
    text-align: center;
    width: min(720px, 88vw);
    transform: translateY(0);
    opacity: 0;
    transition: opacity 1200ms ease, transform 1200ms ease;
}

.entrance-center.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.entrance-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 80px 20px rgba(201, 168, 76, 0.08),
                0 0 160px 40px rgba(201, 168, 76, 0.04);
    pointer-events: none;
    z-index: -1;
}

.entrance-ornament-top,
.entrance-ornament-bottom {
    width: 320px;
    margin: 0 auto;
    opacity: 0.85;
}

.entrance-ornament-top { margin-bottom: 28px; }
.entrance-ornament-bottom { margin-top: 18px; }

.ornament-band {
    width: 100%;
    height: 28px;
    overflow: visible;
}

.ornament-band line,
.ornament-band polygon {
    stroke: var(--gold-primary);
    stroke-width: 1;
    fill: none;
}

.domain-display {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 6.4vw, 64px);
    letter-spacing: 0.06em;
    color: var(--gold-light);
    line-height: 1.1;
    text-shadow: 0 0 24px rgba(201, 168, 76, 0.18);
    margin-bottom: 20px;
}

.entrance-tagline {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 6px;
}

.entrance-prelude {
    margin-top: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 16px;
    line-height: 1.85;
}

.entrance-scroll-cue {
    position: absolute;
    bottom: -90px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.scroll-arrow {
    width: 12px;
    height: 24px;
    animation: scroll-cue 2.4s ease-in-out infinite;
}

.scroll-arrow line,
.scroll-arrow polyline {
    stroke: var(--gold-dim);
    stroke-width: 1;
    fill: none;
}

@keyframes scroll-cue {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* =============================================================
   Hall 2: Chamber of Spirals (120–260vh)
   ============================================================= */

.hall-spirals {
    min-height: 140vh;
    padding: 18vh 6vw 12vh;
    position: relative;
}

.hall-heading {
    text-align: center;
    margin: 0 auto 80px;
    max-width: 720px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms ease, transform 900ms ease;
}

.hall-heading.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hall-eyebrow {
    display: inline-block;
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 18px;
    padding: 0 14px;
    position: relative;
}

.hall-eyebrow::before,
.hall-eyebrow::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 36px;
    height: 1px;
    background: var(--gold-dim);
    opacity: 0.6;
}
.hall-eyebrow::before { right: 100%; }
.hall-eyebrow::after { left: 100%; }

.hall-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(32px, 4.4vw, 48px);
    letter-spacing: 0.05em;
    color: var(--gold-light);
    margin-bottom: 14px;
    line-height: 1.15;
}

.hall-deck {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 16px;
    max-width: 580px;
    margin: 0 auto;
}

.spiral-orbit {
    position: relative;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    min-height: 900px;
}

.spiral-panel {
    position: absolute;
    width: 380px;
    background: var(--bg-mid);
    border: 1px solid var(--gold-primary);
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 900ms ease, transform 900ms ease, box-shadow 600ms ease;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.0);
}

.spiral-panel::before,
.spiral-panel::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid var(--gold-primary);
}

.spiral-panel::before {
    top: -6px;
    left: -6px;
    border-right: none;
    border-bottom: none;
}

.spiral-panel::after {
    bottom: -6px;
    right: -6px;
    border-left: none;
    border-top: none;
}

.spiral-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.spiral-panel:hover {
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.14),
                0 0 0 1px rgba(232, 213, 160, 0.45);
}

/* Asymmetrical orbit positions — each panel touches a radial */
.spiral-panel--p1 { top: 0;    left: 0;   transform: translate(0, 30px); }
.spiral-panel--p2 { top: 60px;  right: 0;  transform: translate(0, 30px); }
.spiral-panel--p3 { top: 460px; left: 60px; transform: translate(0, 30px); }
.spiral-panel--p4 { top: 520px; right: 80px; transform: translate(0, 30px); }

.spiral-panel--p1.is-visible { transform: translate(0, 0); }
.spiral-panel--p2.is-visible { transform: translate(0, 0); }
.spiral-panel--p3.is-visible { transform: translate(0, 0); }
.spiral-panel--p4.is-visible { transform: translate(0, 0); }

.spiral-panel-frame {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, rgba(201, 168, 76, 0.04) 0%, rgba(201, 168, 76, 0) 100%);
    border: 1px solid rgba(201, 168, 76, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    position: relative;
}

.spiral-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.spiral-svg .spiral-form line,
.spiral-svg .spiral-form polyline,
.spiral-svg .spiral-form polygon {
    stroke: var(--shell-accent);
    stroke-width: 1;
    fill: rgba(201, 168, 76, 0.04);
}

.spiral-svg .spiral-form line {
    fill: none;
}

.spiral-panel-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-index {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--gold-dim);
    text-transform: uppercase;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: 0.04em;
    color: var(--gold-light);
    line-height: 1.2;
}

.spiral-panel-text p {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
}

/* =============================================================
   Hall 3: The Nacre Gallery (260–380vh)
   ============================================================= */

.hall-nacre {
    min-height: 120vh;
    padding: 16vh 0 14vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hall-nacre .hall-heading {
    margin-bottom: 70px;
    padding: 0 6vw;
}

.nacre-band {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 560px;
    background: radial-gradient(ellipse at center,
        var(--bg-light) 0%,
        var(--bg-mid) 70%,
        var(--bg-mid) 100%);
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nacre-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gold-primary);
}

.nacre-corner--tl { top: 18px; left: 18px; border-right: none; border-bottom: none; }
.nacre-corner--tr { top: 18px; right: 18px; border-left: none; border-bottom: none; }
.nacre-corner--bl { bottom: 18px; left: 18px; border-right: none; border-top: none; }
.nacre-corner--br { bottom: 18px; right: 18px; border-left: none; border-top: none; }

.nacre-stack {
    position: relative;
    width: min(720px, 88vw);
    height: 380px;
}

.nacre-panel {
    position: absolute;
    width: 380px;
    height: 220px;
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.3);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity 1100ms ease, transform 1100ms ease;
    transform: translate(-12px, -12px);
}

.nacre-panel.is-visible { opacity: 1; }

.nacre-panel--1 {
    top: 0;
    left: 0;
    transition-delay: 0ms;
}
.nacre-panel--1.is-visible { transform: translate(0, 0); }

.nacre-panel--2 {
    top: 60px;
    left: 120px;
    transition-delay: 200ms;
}
.nacre-panel--2.is-visible { transform: translate(0, 0); }

.nacre-panel--3 {
    top: 120px;
    left: 240px;
    transition-delay: 400ms;
}
.nacre-panel--3.is-visible { transform: translate(0, 0); }

.nacre-num {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--gold-primary);
    text-transform: uppercase;
}

.nacre-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 0.04em;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.nacre-panel p {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
}

.nacre-caption {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: max-content;
    max-width: 90%;
}

.nacre-caption-label {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--gold-primary);
    text-transform: uppercase;
}

.nacre-caption-meta {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 13px;
    color: var(--text-secondary);
}

/* =============================================================
   Hall 4: The Sky Vault (380–500vh)
   ============================================================= */

.hall-sky {
    min-height: 120vh;
    background: linear-gradient(to top,
        var(--bg-deep) 0%,
        var(--bg-mid) 15%,
        var(--bg-sky-top) 60%,
        var(--bg-sky-top) 80%,
        var(--bg-deep) 100%);
    padding: 12vh 6vw 8vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sky-dome {
    position: relative;
    width: 640px;
    max-width: 90vw;
    height: 640px;
    max-height: 90vw;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 1400ms ease, transform 1400ms ease;
}

.sky-dome.is-visible {
    opacity: 1;
    transform: scale(1);
}

.sky-dome-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 80px 20px rgba(201, 168, 76, 0.08),
                0 0 200px 60px rgba(201, 168, 76, 0.05);
    pointer-events: none;
}

.ceiling-sunburst {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ceiling-rays line {
    stroke: var(--gold-primary);
    stroke-width: 1;
    opacity: 0.5;
}

.ceiling-rings circle {
    stroke: var(--gold-primary);
    stroke-width: 1;
    opacity: 0.28;
}

.ceiling-ornaments polygon {
    stroke: var(--shell-accent);
    stroke-width: 1;
    fill: rgba(212, 184, 106, 0.06);
}

/* Slow rotation on the ceiling rays */
.ceiling-rays {
    transform-origin: 50% 50%;
    animation: ceiling-rotate 120s linear infinite;
}

.ceiling-rings {
    transform-origin: 50% 50%;
    animation: ceiling-rotate 200s linear infinite reverse;
}

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

.sky-kanji {
    position: relative;
    z-index: 2;
    font-family: var(--font-kanji);
    font-weight: 400;
    font-size: 80px;
    color: var(--gold-light);
    line-height: 1;
    text-shadow: 0 0 30px rgba(201, 168, 76, 0.35),
                 0 0 60px rgba(201, 168, 76, 0.15);
}

.sky-romaji {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--gold-primary);
    text-transform: uppercase;
    z-index: 2;
}

.sky-passage {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms ease, transform 900ms ease;
}

.sky-passage.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sky-passage-rule {
    width: 80px;
    height: 1px;
    background: var(--gold-primary);
    margin: 0 auto 22px;
    opacity: 0.6;
    position: relative;
}

.sky-passage-rule::before,
.sky-passage-rule::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border: 1px solid var(--gold-primary);
    transform: translateY(-50%) rotate(45deg);
    background: var(--bg-deep);
}
.sky-passage-rule::before { left: -10px; }
.sky-passage-rule::after { right: -10px; }

.sky-passage-rule:last-of-type {
    margin: 22px auto 22px;
}

.sky-passage-text {
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.85;
    font-style: italic;
    margin-bottom: 0;
}

.sky-passage-text em {
    font-family: var(--font-kanji);
    font-style: normal;
    color: var(--gold-light);
    font-size: 22px;
    padding: 0 4px;
}

.sky-colophon {
    font-family: var(--font-label);
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--gold-dim);
    text-transform: uppercase;
    line-height: 2;
}

/* =============================================================
   Responsive — keep the geometry, compress the orbits
   ============================================================= */

@media (max-width: 980px) {
    .spiral-orbit {
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .spiral-panel {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: min(420px, 92vw);
        transform: translateY(30px) !important;
    }

    .spiral-panel.is-visible {
        transform: translateY(0) !important;
    }

    .nacre-stack {
        width: 90vw;
        height: 460px;
    }

    .nacre-panel {
        width: min(320px, 70vw);
        height: 200px;
        padding: 22px 24px;
    }

    .nacre-panel--1 { top: 0; left: 0; }
    .nacre-panel--2 { top: 100px; left: 12vw; }
    .nacre-panel--3 { top: 200px; left: 22vw; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }

    .hall-nav { font-size: 9px; padding: 8px 12px; }
    .hall-nav-prefix { display: none; }

    .domain-display { font-size: 38px; }

    .entrance-prelude { font-size: 15px; }

    .nacre-stack {
        width: 92vw;
        height: 480px;
    }

    .nacre-panel {
        width: min(280px, 78vw);
        height: 200px;
    }

    .nacre-panel--1 { top: 0; left: 0; }
    .nacre-panel--2 { top: 110px; left: 8vw; }
    .nacre-panel--3 { top: 220px; left: 16vw; }

    .sky-kanji { font-size: 64px; }

    .sky-passage-text { font-size: 16px; }
}
