/* ============================================================================
   judge.club Stylesheet
   Legal serif authoritative aesthetic
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    color: #1a1a14;
    background: linear-gradient(135deg, #f5f0e8 0%, #faf7f2 100%);
    line-height: 1.85;
    letter-spacing: 0.3px;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
    height: 100vh;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(92, 92, 61, 0.02) 0px,
            rgba(92, 92, 61, 0.02) 2px,
            transparent 2px,
            transparent 4px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(92, 92, 61, 0.015) 0px,
            rgba(92, 92, 61, 0.015) 1px,
            transparent 1px,
            transparent 2px
        ),
        #2c1810;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 100%;
    padding: 0 2rem;
}

.brass-rule {
    border-top: 1px solid #c9a84c;
    margin: 2rem auto;
    opacity: 0.9;
}

.brass-rule-top,
.brass-rule-bottom {
    max-width: 40%;
}

.domain-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #c9a84c;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.judicial-motto {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    color: #c9a84c;
    font-style: italic;
    letter-spacing: 0.05em;
    margin: 1rem 0;
    opacity: 0.95;
}

/* Scales animation */
#scales {
    width: 120px;
    height: 80px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pendulum 3s ease-in-out infinite alternate;
}

#scales svg {
    width: 100%;
    height: 100%;
}

@keyframes pendulum {
    0% {
        transform: rotateZ(-3deg);
    }
    50% {
        transform: rotateZ(0deg);
    }
    100% {
        transform: rotateZ(3deg);
    }
}

/* ============================================================================
   Opinion Sections
   ============================================================================ */

.opinion {
    padding: 4rem 2rem;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.opinion-container {
    position: relative;
}

.opinion-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.opinion-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #8b1a1a;
    flex: 1;
    line-height: 1.3;
    font-variant: small-caps;
}

.margin-note {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.75rem;
    color: #5c5c3d;
    font-style: italic;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    line-height: 1.4;
    min-width: 40px;
    padding: 1rem 0.5rem;
    opacity: 0.75;
}

.opinion-text {
    font-size: 1.05rem;
    color: #1a1a14;
    line-height: 1.85;
    column-count: 1;
}

.opinion-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.opinion-text p:first-letter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2em;
    font-weight: 700;
    color: #c9a84c;
    float: left;
    line-height: 1;
    margin-right: 0.1em;
    margin-top: 0.05em;
}

/* Gavel ornament */
.gavel-ornament {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    height: 50px;
}

.gavel-ornament svg {
    width: 50px;
    height: 50px;
    opacity: 0.8;
    transition: transform 0.3s ease-out;
}

.gavel-ornament:hover svg {
    transform: rotateZ(-15deg);
}

.gavel-shape {
    transform-origin: 20px 20px;
}

/* Scroll trigger animation for gavel */
.opinion.visible .gavel-ornament svg {
    animation: gavelStrike 0.3s ease-out;
}

@keyframes gavelStrike {
    0% {
        transform: rotateZ(0deg);
    }
    100% {
        transform: rotateZ(-15deg);
    }
}

/* ============================================================================
   Closing Section
   ============================================================================ */

.closing {
    padding: 4rem 2rem;
    background: linear-gradient(
        135deg,
        #2c1810 0%,
        #3a2218 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
}

.closing-container {
    text-align: center;
    max-width: 720px;
}

.closing-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #8b1a1a;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.brass-rule-small {
    border-top: 2px solid #c9a84c;
    width: 80px;
    margin: 0 auto;
    opacity: 0.8;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .opinion {
        padding: 2.5rem 1.5rem;
    }

    .opinion-header {
        flex-direction: column;
        gap: 1rem;
    }

    .margin-note {
        writing-mode: horizontal-tb;
        transform: none;
        min-width: auto;
        font-size: 0.65rem;
        opacity: 0.6;
    }

    .opinion-text p:first-letter {
        font-size: 1.8em;
    }

    .domain-name {
        font-size: 2rem;
    }

    .closing-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .opinion {
        padding: 2rem 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .brass-rule-top,
    .brass-rule-bottom {
        max-width: 60%;
    }

    .domain-name {
        font-size: 1.5rem;
        letter-spacing: 0.1em;
    }

    .judicial-motto {
        font-size: 0.9rem;
    }

    .opinion-text {
        font-size: 1rem;
    }

    .closing-text {
        font-size: 1.2rem;
    }
}

/* ============================================================================
   Print Styles (Legal Document Feel)
   ============================================================================ */

@media print {
    body {
        background: white;
        color: #2c1810;
    }

    .hero {
        background: white;
        color: #2c1810;
    }

    .domain-name {
        color: #2c1810;
    }

    .brass-rule {
        border-top: 1px solid #2c1810;
    }
}

/* ============================================================================
   Accessibility: Text Selection
   ============================================================================ */

::selection {
    background-color: #c9a84c;
    color: #2c1810;
}

::-moz-selection {
    background-color: #c9a84c;
    color: #2c1810;
}
