/* ==============================================
   judge.club - Vaporwave Judicial Salon
   ==============================================
   Palette:
   #c4b5fd - wisteria violet (gradient start)
   #f0abfc - orchid pink (gradient end)
   #fdf4ff - ghost lavender (background warm)
   #1e1b2e - midnight ink (text primary)
   #6b5fa0 - dusk purple (text secondary)
   #e8ddd4 - warm marble cream (accent marble)
   #fb923c - sunset tangerine (highlight)
   #d4c5f9 - light lavender (border/rule)
   #8b7fc7 - muted violet (margin notes)
   ============================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.7;
    color: #1e1b2e;
    background-color: #fdf4ff;
    overflow-x: hidden;
    position: relative;
}

/* ---- CRT Scan Line Overlay ---- */
#crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0.03) 2px
    );
    transition: opacity 1.5s ease;
}

#crt-overlay.visible {
    opacity: 1;
}

/* ---- Section Spacing ---- */
section {
    position: relative;
}

#docket,
#deliberation {
    padding: clamp(60px, 10vh, 140px) clamp(20px, 5vw, 80px);
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #c4b5fd 0%, #f0abfc 100%);
    z-index: 0;
    animation: heroGradientMorph 25s ease-in-out infinite alternate;
}

@keyframes heroGradientMorph {
    0% {
        background: linear-gradient(180deg, #c4b5fd 0%, #f0abfc 100%);
    }
    33% {
        background: linear-gradient(200deg, #d4c5f9 0%, #f0abfc 60%, #c4b5fd 100%);
    }
    66% {
        background: linear-gradient(160deg, #f0abfc 0%, #c4b5fd 50%, #d4c5f9 100%);
    }
    100% {
        background: linear-gradient(180deg, #d4c5f9 0%, #c4b5fd 100%);
    }
}

/* Grid overlay on hero */
.hero-gradient-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.02) 3px,
        rgba(0, 0, 0, 0.02) 4px
    );
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-family: 'Literata', serif;
    font-weight: 800;
    font-size: clamp(36px, 7vw, 80px);
    color: #1e1b2e;
    text-shadow: 2px 2px 0 rgba(240, 171, 252, 0.6);
    opacity: 0;
    transform: translateY(20px);
    margin-top: 30px;
    letter-spacing: -0.02em;
}

.hero-title.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: #6b5fa0;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(10px);
    max-width: 500px;
}

.hero-subtitle.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

/* ============================================
   MARBLE BUST SILHOUETTES
   ============================================ */
.marble-bust {
    width: 160px;
    height: 200px;
    position: relative;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.marble-bust.revealed {
    opacity: 1;
    transform: scale(1);
}

#marble-bust-hero {
    width: 180px;
    height: 220px;
}

/* Classical bust silhouette shape using clip-path */
.marble-bust .bust-gradient {
    width: 100%;
    height: 100%;
    clip-path: polygon(
        50% 0%,
        62% 2%,
        72% 8%,
        78% 16%,
        80% 25%,
        79% 35%,
        75% 42%,
        78% 45%,
        82% 48%,
        80% 52%,
        72% 55%,
        68% 58%,
        74% 62%,
        82% 66%,
        90% 72%,
        95% 78%,
        100% 85%,
        100% 100%,
        0% 100%,
        0% 85%,
        5% 78%,
        10% 72%,
        18% 66%,
        26% 62%,
        32% 58%,
        28% 55%,
        20% 52%,
        18% 48%,
        22% 45%,
        25% 42%,
        21% 35%,
        20% 25%,
        22% 16%,
        28% 8%,
        38% 2%
    );
    background: linear-gradient(135deg, #c4b5fd, #f0abfc, #d4c5f9);
    background-size: 200% 200%;
    animation: bustGradientShift 8s ease-in-out infinite alternate;
}

#marble-bust-hero .bust-gradient {
    animation: bustGradientShift 6s ease-in-out infinite alternate;
}

.bust-variant-1 .bust-gradient {
    background: linear-gradient(225deg, #f0abfc, #c4b5fd, #fb923c);
    background-size: 200% 200%;
    animation: bustGradientShift2 10s ease-in-out infinite alternate;
}

.bust-variant-2 .bust-gradient {
    background: linear-gradient(45deg, #d4c5f9, #fb923c, #f0abfc);
    background-size: 200% 200%;
    animation: bustGradientShift3 12s ease-in-out infinite alternate;
}

@keyframes bustGradientShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes bustGradientShift2 {
    0% { background-position: 100% 0%; }
    100% { background-position: 0% 100%; }
}

@keyframes bustGradientShift3 {
    0% { background-position: 50% 0%; }
    100% { background-position: 50% 100%; }
}

/* Section break busts */
.section-break {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(40px, 6vh, 80px) 0;
    background-color: #fdf4ff;
}

/* ============================================
   THE DOCKET SECTION
   ============================================ */
#docket {
    background-color: #fdf4ff;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: clamp(40px, 6vh, 80px);
}

.section-title {
    font-family: 'Literata', serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 64px);
    color: #1e1b2e;
    letter-spacing: -0.01em;
}

.marble-accent {
    flex-shrink: 0;
}

.marble-accent-square {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #e8ddd4, #d4c5f9 60%, #f0abfc);
    border-radius: 4px;
}

.marble-accent-circle {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 40% 40%, #e8ddd4, #c4b5fd 60%, #d4c5f9);
    border-radius: 50%;
}

/* Docket flow — editorial rhythm */
.docket-flow {
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 6vh, 80px);
}

.docket-block {
    max-width: 38em;
}

.docket-block.text-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.docket-block.text-block h3 {
    font-family: 'Literata', serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 32px);
    color: #1e1b2e;
    margin-bottom: 20px;
}

.docket-block.text-block p {
    text-indent: 2em;
    margin-bottom: 1em;
    color: #1e1b2e;
}

.docket-block.text-block p:last-child {
    margin-bottom: 0;
}

/* Alternating alignment */
.docket-block:nth-child(even) {
    align-self: flex-end;
}

.docket-block:nth-child(odd) {
    align-self: flex-start;
}

/* Marble blocks */
.docket-block.marble-block {
    width: 180px;
    height: 180px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.marble-texture {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(232, 221, 212, 0.8), transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(212, 197, 249, 0.6), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(240, 171, 252, 0.3), transparent 70%),
        linear-gradient(135deg, #e8ddd4, #fdf4ff);
}

.marble-texture-alt {
    background:
        radial-gradient(ellipse at 60% 20%, rgba(196, 181, 253, 0.7), transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(232, 221, 212, 0.6), transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(240, 171, 252, 0.4), transparent 50%),
        linear-gradient(225deg, #d4c5f9, #e8ddd4);
}

.marble-texture-small {
    width: 60px;
    height: 60px;
    border-radius: 4px;
}

/* Pull quotes */
.docket-block.pull-quote {
    max-width: calc(38em * 1.2);
    padding: 30px 0;
    border-top: 1px solid #d4c5f9;
    border-bottom: 1px solid #d4c5f9;
    opacity: 0;
    transform: scale(0.9);
    filter: blur(2px);
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.docket-block.pull-quote.visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.docket-block.pull-quote blockquote {
    font-family: 'Literata', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(22px, 3.5vw, 42px);
    color: #6b5fa0;
    line-height: 1.4;
    margin-bottom: 16px;
}

.docket-block.pull-quote cite {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #8b7fc7;
    font-style: normal;
}

/* ============================================
   THE DELIBERATION ROOM
   ============================================ */
#deliberation {
    background-color: #fdf4ff;
    max-width: 1200px;
    margin: 0 auto;
}

.deliberation-layout {
    position: relative;
}

/* Two-column layout */
.deliberation-columns {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 40px;
    margin-bottom: clamp(40px, 6vh, 80px);
}

.column h3 {
    font-family: 'Literata', serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 28px);
    color: #1e1b2e;
    margin-bottom: 20px;
}

.column p {
    text-indent: 2em;
    margin-bottom: 1em;
    color: #1e1b2e;
    max-width: 38em;
}

.column p:last-child {
    margin-bottom: 0;
}

.column-divider {
    width: 1px;
    background-color: #d4c5f9;
    min-height: 100%;
}

/* Fade reveal for columns */
.column.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.column.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Margin notes */
.margin-note {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #8b7fc7;
    line-height: 1.6;
    max-width: 220px;
    padding: 16px 0;
    margin-bottom: 30px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.margin-note.margin-note-left {
    transform: translateX(-30px);
}

.margin-note.margin-note-right {
    margin-left: auto;
    transform: translateX(30px);
}

.margin-note.visible {
    opacity: 1;
    transform: translateX(0);
}

.case-ref {
    display: block;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #fb923c;
    margin-bottom: 6px;
}

.margin-note p {
    text-indent: 0;
    margin: 0;
    color: #8b7fc7;
    font-size: 12px;
}

/* Marble break row */
.marble-break {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 40px 0;
}

/* ============================================
   MEMBERSHIP SECTION
   ============================================ */
#membership {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(60px, 10vh, 140px) clamp(20px, 5vw, 80px);
}

.membership-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #fdf4ff 0%, #c4b5fd 40%, #f0abfc 70%, #fdf4ff 100%);
    z-index: 0;
    animation: membershipGradientMorph 30s ease-in-out infinite alternate;
}

@keyframes membershipGradientMorph {
    0% {
        background: linear-gradient(180deg, #fdf4ff 0%, #c4b5fd 40%, #f0abfc 70%, #fdf4ff 100%);
    }
    50% {
        background: linear-gradient(200deg, #fdf4ff 0%, #f0abfc 35%, #c4b5fd 65%, #fdf4ff 100%);
    }
    100% {
        background: linear-gradient(160deg, #fdf4ff 0%, #d4c5f9 40%, #c4b5fd 70%, #fdf4ff 100%);
    }
}

.membership-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
}

.membership-statement {
    font-family: 'Literata', serif;
    font-weight: 800;
    font-size: clamp(32px, 6vw, 72px);
    color: #1e1b2e;
    line-height: 1.2;
    margin-bottom: 40px;
    text-shadow: 1px 1px 0 rgba(240, 171, 252, 0.4);
}

.membership-closing {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 2vw, 22px);
    color: #6b5fa0;
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE: MOBILE (below 900px)
   ============================================ */
@media (max-width: 900px) {
    .deliberation-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .column-divider {
        display: none;
    }

    .margin-note {
        max-width: 100%;
        padding-left: 20px;
        border-left: 2px solid #d4c5f9;
        margin-bottom: 24px;
    }

    .margin-note.margin-note-left,
    .margin-note.margin-note-right {
        margin-left: 0;
        transform: translateX(0);
    }

    .margin-note.margin-note-left {
        opacity: 0;
        transform: translateY(10px);
    }

    .margin-note.margin-note-right {
        opacity: 0;
        transform: translateY(10px);
    }

    .margin-note.visible {
        transform: translateY(0);
    }

    .docket-block:nth-child(even),
    .docket-block:nth-child(odd) {
        align-self: stretch;
    }

    .docket-block.marble-block {
        width: 120px;
        height: 120px;
        align-self: center;
    }

    .docket-block.pull-quote {
        max-width: 100%;
    }

    .marble-bust {
        width: 120px;
        height: 150px;
    }

    #marble-bust-hero {
        width: 140px;
        height: 170px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: clamp(28px, 10vw, 48px);
    }

    .section-title {
        font-size: clamp(24px, 7vw, 40px);
    }

    .docket-block.pull-quote blockquote {
        font-size: clamp(18px, 5vw, 28px);
    }

    .membership-statement {
        font-size: clamp(26px, 8vw, 48px);
    }
}
