/* ==========================================================
   moot.ing — Styles
   Hand-drawn courtroom notebook aesthetic
   ========================================================== */

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

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

body {
    background-color: #F8F4ED;
    color: #2A2622;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.4vw, 1.08rem);
    line-height: 1.78;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* --- Notebook Ruled Lines (repeating background) --- */
/* Rule line color: #C8C0B4 at 0.2 opacity */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 27px,
        #C8C0B433 27px,
        #C8C0B433 28px
    );
    pointer-events: none;
    z-index: 0;
}

/* --- Red Margin Line --- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 80px;
    bottom: 0;
    width: 1px;
    background-color: rgba(196, 119, 106, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    color: #2A2622;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
}

h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin-bottom: 0.75em;
}

p {
    margin-bottom: 1.2em;
}

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

/* --- Case Citation Style --- */
.case-citation {
    font-style: italic;
    font-size: 0.9rem;
    color: #7A6B5A;
    border-left: 2px solid rgba(196, 119, 106, 0.4);
    padding-left: 1em;
    margin-top: 1em;
}

/* ==========================================================
   HERO SECTION — Full-screen notebook opening
   ========================================================== */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    padding-left: 80px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.02em;
    margin-bottom: 0.2em;
}

.hero-subtitle {
    font-family: 'Architects Daughter', cursive;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    color: #7A6B5A;
    letter-spacing: 0.1em;
}

/* ==========================================================
   CONTENT ZONES — Bench / Bar / Gallery
   ========================================================== */
.content-zone {
    position: relative;
    z-index: 2;
    padding: 3rem 2rem 3rem 110px;
}

/* Bench zone — larger type, more spacious */
.zone-bench .content-block h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

/* Bar zone — standard */
.zone-bar .content-block h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

/* Gallery zone — slightly smaller, denser */
.zone-gallery .content-block {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
}

.zone-gallery .content-block h2 {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

/* ==========================================================
   CONTENT BLOCKS — F-pattern widths + layered depth
   ========================================================== */
.content-block {
    position: relative;
    background-color: rgba(248, 244, 237, 0.7);
    padding: 2rem 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 2px;
    box-shadow: 2px 3px 8px rgba(42, 38, 34, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Default: hidden for reveal animation */
    opacity: 0;
    transform: translateX(-30px);
}

.content-block.revealed {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 3px 5px 14px rgba(42, 38, 34, 0.12);
}

.content-block.revealed:hover {
    transform: translateY(-2px);
}

/* F-Pattern column widths */
.content-block--wide {
    max-width: 83.33%;  /* 10/12 columns */
}

.content-block--medium {
    max-width: 66.67%;  /* 8/12 columns */
}

.content-block--narrow {
    max-width: 50%;     /* 6/12 columns */
}

/* Layered depth: older content slightly faded */
.zone-bar .content-block {
    opacity: 0;
}

.zone-bar .content-block.revealed {
    opacity: 0.97;
}

.zone-gallery .content-block {
    opacity: 0;
}

.zone-gallery .content-block.revealed {
    opacity: 0.93;
}

/* ==========================================================
   EXHIBIT BLOCKS — Evidence document styling
   ========================================================== */
.exhibit {
    border: 1px solid rgba(122, 107, 90, 0.25);
    background-color: #D4C8A81F; /* #D4C8A8 at ~0.12 opacity */
    position: relative;
}

.exhibit-label {
    font-family: 'Architects Daughter', cursive;
    font-size: 0.85rem;
    color: #C4776A;
    position: absolute;
    top: -0.6em;
    left: 1.5rem;
    background-color: #F8F4ED;
    padding: 0 0.5em;
    letter-spacing: 0.05em;
}

/* ==========================================================
   MARGIN ANNOTATIONS — Hand-drawn marginalia
   ========================================================== */
.margin-annotation {
    font-family: 'Architects Daughter', cursive;
    font-size: 0.8rem;
    color: #7A6B5A;
    position: absolute;
    left: -110px;
    top: 1.5rem;
    width: 95px;
    text-align: right;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.content-block.revealed .margin-annotation {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   GAVEL BUTTON — Scroll-to-top
   ========================================================== */
#gavel-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: rgba(248, 244, 237, 0.9);
    border: 1px solid rgba(122, 107, 90, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.6;
}

#gavel-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#gavel-btn.pulse {
    animation: gavelPulse 1s ease-in-out;
}

@keyframes gavelPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ==========================================================
   GESTURE LINES SVG OVERLAY
   ========================================================== */
.gesture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0.15;
}

/* ==========================================================
   DECORATIVE VIGNETTES
   ========================================================== */
.vignette {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

#vignette-scales {
    top: 15vh;
    left: 15px;
}

#vignette-gavel {
    bottom: 20vh;
    left: 18px;
}

/* ==========================================================
   LINKS
   ========================================================== */
a {
    color: #5A6E82;
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 110, 130, 0.3);
    transition: border-color 0.2s ease;
}

a:hover {
    border-color: #5A6E82;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
    body::after {
        left: 40px;
    }

    .content-zone {
        padding-left: 60px;
        padding-right: 1.5rem;
    }

    .hero-content {
        padding-left: 40px;
    }

    .margin-annotation {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        text-align: left;
        margin-bottom: 0.75rem;
        opacity: 1;
        transform: none;
    }

    .content-block--wide,
    .content-block--medium,
    .content-block--narrow {
        max-width: 100%;
    }

    .vignette {
        display: none;
    }
}

@media (max-width: 600px) {
    body::after {
        left: 20px;
    }

    .content-zone {
        padding-left: 35px;
        padding-right: 1rem;
    }

    .hero-content {
        padding-left: 20px;
    }

    .content-block {
        padding: 1.5rem 1.5rem;
    }
}
