/* ============================================================
   courthouse.app -- Neoclassical Courthouse Design
   ============================================================ */

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

:root {
    --marble: #f0ece4;
    --bench: #3a2518;
    --brass: #b8963a;
    --column: #d4cec4;
    --ink: #1c1c1c;
    --parchment: #faf6ef;
    --seal: #6b1d1d;
    --shadow: #8a8278;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 400;
    color: var(--ink);
    background-color: var(--marble);
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
.inscription {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink);
    text-align: center;
}

.inscription-rule {
    width: 80px;
    height: 1px;
    background-color: var(--column);
    margin: 8px auto 0;
}

.section-rule {
    width: 120px;
    margin: 8px auto 48px;
}

/* --- The Bench: Navigation --- */
.bench {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bench);
    z-index: 1000;
    box-shadow: 0 3px 12px rgba(28, 28, 28, 0.35);
}

.bench-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.bench-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bench-scales-icon {
    flex-shrink: 0;
}

.bench-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brass);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bench-nav {
    list-style: none;
    display: flex;
    gap: 32px;
}

.bench-link {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--brass);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.bench-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--brass);
    transition: width 0.3s ease;
}

.bench-link:hover::after {
    width: 100%;
}

.bench-link:hover {
    color: var(--parchment);
}

.bench-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.bench-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brass);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- The Portico: Hero --- */
.portico {
    padding-top: 56px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--marble);
}

.pediment {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pediment::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 600px;
    height: 60px;
    background: var(--column);
    clip-path: polygon(0 100%, 50% 0%, 100% 100%);
    margin-top: 40px;
}

.scales-hero {
    margin-top: 20px;
    animation: settle 1s ease-out 500ms both;
    transform-origin: 50% 14px;
}

@keyframes settle {
    0% { transform: rotate(0deg); }
    30% { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

.portico-grid {
    display: grid;
    grid-template-columns: 8px 1fr 8px;
    width: 100%;
    max-width: 800px;
    flex: 1;
    padding: 0 32px;
}

.column {
    background: var(--column);
    background-image: linear-gradient(
        90deg,
        var(--column) 0%,
        #ddd8ce 30%,
        var(--column) 50%,
        #c8c2b8 70%,
        var(--column) 100%
    );
}

.portico-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 80px;
    text-align: center;
}

.portico-tagline {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 16px;
}

.portico-description {
    max-width: 480px;
    color: var(--shadow);
    margin-top: 24px;
    font-size: 1.05rem;
}

.portico-cta {
    display: inline-block;
    margin-top: 40px;
    padding: 14px 40px;
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--parchment);
    background: var(--bench);
    border: 2px solid var(--brass);
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.portico-cta:hover {
    background: var(--brass);
    color: var(--bench);
}

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0;
}

.flanking-column {
    width: 8px;
    height: 48px;
    background: var(--column);
    background-image: linear-gradient(
        90deg,
        var(--column) 0%,
        #ddd8ce 30%,
        var(--column) 50%,
        #c8c2b8 70%,
        var(--column) 100%
    );
}

/* --- The Chambers --- */
.chambers {
    padding: 100px 32px 80px;
    background: var(--parchment);
}

.chambers-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.aisle {
    background: var(--column);
    width: 1px;
}

.chamber-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bench);
    margin-bottom: 32px;
    text-align: center;
}

.chamber-card {
    background: var(--marble);
    padding: 28px 24px;
    margin-bottom: 20px;
    border-left: 3px solid var(--brass);
}

.chamber-card-heading {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.chamber-card p {
    color: var(--shadow);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- The Docket --- */
.docket {
    padding: 100px 32px 80px;
    background: var(--marble);
}

.docket-content {
    max-width: 800px;
    margin: 0 auto;
}

.docket-entry {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px 0;
}

.docket-number {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--brass);
    min-width: 60px;
    text-align: center;
    line-height: 1;
    padding-top: 4px;
}

.docket-heading {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.docket-detail p {
    color: var(--shadow);
    font-size: 0.95rem;
    line-height: 1.7;
}

.docket-divider {
    height: 1px;
    background: var(--column);
    margin: 0;
}

/* --- Records --- */
.records {
    padding: 100px 32px 80px;
    background: var(--parchment);
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.record-card {
    background: var(--marble);
    padding: 40px 28px;
    text-align: center;
    border-top: 3px solid var(--seal);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.record-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(138, 130, 120, 0.2);
}

.record-seal {
    margin-bottom: 20px;
}

.record-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    margin-bottom: 12px;
}

.record-card p {
    color: var(--shadow);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.record-count {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--seal);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Footer --- */
.footer {
    background: var(--bench);
    color: var(--column);
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1fr;
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 64px 32px 48px;
}

.footer-divider {
    background: rgba(184, 150, 58, 0.3);
    width: 1px;
}

.footer-heading {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--brass);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--column);
    line-height: 1.8;
}

.footer-bar {
    border-top: 1px solid rgba(184, 150, 58, 0.2);
    padding: 20px 32px;
}

.footer-bar-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-size: 0.8rem;
    color: var(--shadow);
    letter-spacing: 0.06em;
}

.footer-latin {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--brass);
    letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .bench-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bench);
        flex-direction: column;
        padding: 16px 32px 24px;
        gap: 16px;
        box-shadow: 0 4px 12px rgba(28, 28, 28, 0.3);
    }

    .bench-nav.open {
        display: flex;
    }

    .bench-menu-toggle {
        display: flex;
    }

    .bench-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .bench-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .bench-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .portico-grid {
        padding: 0 16px;
    }

    .portico-center {
        padding: 40px 20px 60px;
    }

    .chambers-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .aisle {
        width: 100%;
        height: 1px;
        margin: 24px 0;
    }

    .records-grid {
        grid-template-columns: 1fr;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-divider {
        width: 100%;
        height: 1px;
    }

    .footer-bar-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .pediment::before {
        max-width: 300px;
        height: 40px;
    }

    .docket-entry {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
}
