/* courts.studio - Art-Deco Institutional Courthouse */

:root {
    --gold-primary: #c5a251;
    --deep-charcoal: #1e1e28;
    --navy-judicial: #141428;
    --ivory-parchment: #f0ead6;
    --malachite-green: #2d6a4f;
    --brass-highlight: #d4a843;
    --warm-stone: #8a7968;
    --rose-blush: #b5838d;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-charcoal);
    color: var(--ivory-parchment);
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* === ROTUNDA SECTION === */
.rotunda {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dome-pattern {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dome-rings {
    width: 90vmin;
    height: 90vmin;
    max-width: 800px;
    max-height: 800px;
}

.dome-ring {
    transform-origin: center;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: drawRing 3s ease-out forwards;
}

.ring-1 { animation-delay: 0s; }
.ring-2 { animation-delay: 0.3s; }
.ring-3 { animation-delay: 0.6s; }
.ring-4 { animation-delay: 0.9s; }
.ring-5 { animation-delay: 1.2s; }
.ring-6 { animation-delay: 1.5s; }
.ring-7 { animation-delay: 1.8s; }

.dome-oculus {
    opacity: 0;
    animation: fadeIn 1s ease-out 2.4s forwards;
}

.rotunda-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-arc {
    width: clamp(300px, 60vw, 600px);
    height: auto;
    opacity: 0;
    transform: scale(0.9);
    animation: arcExpand 1.5s ease-out 0.5s forwards;
}

.arc-text {
    font-family: 'Cinzel Decorative', 'Playfair Display', serif;
}

.rotunda-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--warm-stone);
    margin-top: 30px;
    display: flex;
    align-items: center;
}

.typed-line {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 2s steps(40, end) 2.5s forwards;
}

.type-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--gold-primary);
    margin-left: 2px;
    animation: blinkCursor 0.8s step-end infinite;
}

/* === FRIEZES === */
.frieze {
    padding: 10px 0;
    overflow: hidden;
}

.frieze-svg {
    width: 100%;
    height: 20px;
    display: block;
}

.frieze-path {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
}

.frieze.animate .frieze-path {
    animation: drawFrieze 1.2s ease-out forwards;
}

/* === COLONNADE SECTION === */
.colonnade {
    min-height: 100vh;
    padding: 80px 40px;
}

.colonnade-inner {
    display: flex;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
}

.pilaster {
    width: 20px;
    flex-shrink: 0;
}

.pilaster svg {
    width: 20px;
    height: 100%;
    min-height: 400px;
}

.col-block {
    flex: 1;
    padding: 40px 30px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.col-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.col-left { transition-delay: 0s; }
.col-center { transition-delay: 0.25s; }
.col-right { transition-delay: 0.5s; }

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 600;
    letter-spacing: 0.08em;
    font-variant: small-caps;
    color: var(--gold-primary);
    margin-bottom: 24px;
}

.section-heading.light {
    color: var(--ivory-parchment);
}

.colonnade p,
.gallery p,
.chamber p {
    margin-bottom: 20px;
}

/* === GALLERY SECTION === */
.gallery {
    min-height: 100vh;
    padding: 80px 0;
    overflow: hidden;
}

.gallery-panel {
    max-width: 900px;
    margin: -30px auto 0;
    padding: 60px 50px;
    position: relative;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-panel:first-child {
    margin-top: 0;
}

.gallery-panel.visible {
    opacity: 1;
}

.panel-dark {
    background: var(--navy-judicial);
    border: 1px solid rgba(197,162,81,0.3);
    transform: rotate(-2deg) perspective(800px) rotateY(5deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.panel-dark.visible {
    transform: rotate(-2deg) perspective(800px) rotateY(0deg);
}

.panel-light {
    background: var(--ivory-parchment);
    color: var(--deep-charcoal);
    border: 1px solid var(--rose-blush);
    transform: rotate(2deg) perspective(800px) rotateY(-5deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.panel-light.visible {
    transform: rotate(2deg) perspective(800px) rotateY(0deg);
}

.panel-light .section-heading {
    color: var(--deep-charcoal);
}

/* === CHAMBER SECTION === */
.chamber {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 40px;
}

.chamber-border {
    position: absolute;
    inset: 40px;
    max-width: 820px;
    max-height: 620px;
    margin: auto;
    pointer-events: none;
}

.chain-border {
    width: 100%;
    height: 100%;
}

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

.chamber.animate .chain-path {
    animation: drawChain 5s ease-out forwards;
}

.chamber-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.chamber.animate .chamber-content {
    opacity: 1;
}

.chamber-heading {
    text-align: center;
    margin-bottom: 40px;
}

.chamber p {
    line-height: 1.85;
}

/* === SEAL SECTION === */
.seal-section {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
}

.seal-container {
    width: clamp(250px, 50vw, 400px);
    height: clamp(250px, 50vw, 400px);
}

.seal-svg {
    width: 100%;
    height: 100%;
}

.seal-outer,
.seal-inner-ring {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.seal-section.animate .seal-outer {
    animation: drawSealCircle 1s ease-out forwards;
}

.seal-section.animate .seal-inner-ring {
    animation: drawSealCircle 1s ease-out 0.3s forwards;
}

.seal-rays line {
    opacity: 0;
    transform-origin: 200px 200px;
    transform: scale(0);
}

.seal-section.animate .seal-rays line {
    animation: rayExpand 0.6s ease-out forwards;
}

.seal-section.animate .seal-rays line:nth-child(1) { animation-delay: 1.2s; }
.seal-section.animate .seal-rays line:nth-child(2) { animation-delay: 1.25s; }
.seal-section.animate .seal-rays line:nth-child(3) { animation-delay: 1.3s; }
.seal-section.animate .seal-rays line:nth-child(4) { animation-delay: 1.35s; }
.seal-section.animate .seal-rays line:nth-child(5) { animation-delay: 1.4s; }
.seal-section.animate .seal-rays line:nth-child(6) { animation-delay: 1.45s; }
.seal-section.animate .seal-rays line:nth-child(7) { animation-delay: 1.5s; }
.seal-section.animate .seal-rays line:nth-child(8) { animation-delay: 1.55s; }
.seal-section.animate .seal-rays line:nth-child(9) { animation-delay: 1.6s; }
.seal-section.animate .seal-rays line:nth-child(10) { animation-delay: 1.65s; }
.seal-section.animate .seal-rays line:nth-child(11) { animation-delay: 1.7s; }
.seal-section.animate .seal-rays line:nth-child(12) { animation-delay: 1.75s; }
.seal-section.animate .seal-rays line:nth-child(13) { animation-delay: 1.8s; }
.seal-section.animate .seal-rays line:nth-child(14) { animation-delay: 1.85s; }
.seal-section.animate .seal-rays line:nth-child(15) { animation-delay: 1.9s; }
.seal-section.animate .seal-rays line:nth-child(16) { animation-delay: 1.95s; }
.seal-section.animate .seal-rays line:nth-child(17) { animation-delay: 2.0s; }
.seal-section.animate .seal-rays line:nth-child(18) { animation-delay: 2.05s; }
.seal-section.animate .seal-rays line:nth-child(19) { animation-delay: 2.1s; }
.seal-section.animate .seal-rays line:nth-child(20) { animation-delay: 2.15s; }
.seal-section.animate .seal-rays line:nth-child(21) { animation-delay: 2.2s; }
.seal-section.animate .seal-rays line:nth-child(22) { animation-delay: 2.25s; }
.seal-section.animate .seal-rays line:nth-child(23) { animation-delay: 2.3s; }
.seal-section.animate .seal-rays line:nth-child(24) { animation-delay: 2.35s; }

.seal-scales {
    opacity: 0;
}

.seal-section.animate .seal-scales {
    animation: fadeIn 1s ease-out 2.5s forwards;
}

.seal-section.animate .seal-svg {
    animation: sealGlow 0.6s ease-in-out 3.5s;
}

.seal-caption {
    font-family: 'Commissioner', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--warm-stone);
    margin-top: 30px;
}

/* === FOOTER === */
.courthouse-footer {
    padding: 40px;
    text-align: center;
    background: var(--navy-judicial);
}

.footer-text {
    font-family: 'Commissioner', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--warm-stone);
}

/* === KEYFRAMES === */
@keyframes drawRing {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes arcExpand {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

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

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

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

@keyframes rayExpand {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes sealGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5) drop-shadow(0 0 20px rgba(212,168,67,0.6)); }
    100% { filter: brightness(1); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .colonnade-inner {
        flex-direction: column;
    }

    .pilaster {
        display: none;
    }

    .col-block {
        padding: 30px 20px;
    }

    .gallery-panel {
        margin-left: 20px;
        margin-right: 20px;
        padding: 40px 30px;
    }

    .panel-dark {
        transform: rotate(-1deg);
    }

    .panel-dark.visible {
        transform: rotate(-1deg);
    }

    .panel-light {
        transform: rotate(1deg);
    }

    .panel-light.visible {
        transform: rotate(1deg);
    }

    .chamber {
        padding: 60px 20px;
    }

    .chamber-border {
        inset: 20px;
    }
}
