/* ===================================
   moot.ing — Art Deco Debate Hall
   =================================== */

/* --- CSS Custom Properties (Design Palette) --- */
:root {
    /* Color Palette */
    --color-deco-navy: #2A2840;
    --color-muted-violet: #4A4860;
    --color-lavender-grey: #8A88A0;
    --color-pastel-cream: #F8F4EE;
    --color-deco-gold: #B0A080;
    --color-ripple-warm: #D0C0A0;
    --color-blush-pink: #E8D0D0;
    --color-mint-accent: #90C0B0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: var(--color-muted-violet);
    background-color: var(--color-pastel-cream);
    overflow-x: hidden;
}

/* --- Typography --- */
.hero-title {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.08em;
    color: var(--color-deco-navy);
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    letter-spacing: 0.25em;
    color: var(--color-lavender-grey);
    text-transform: uppercase;
    text-align: center;
    margin-top: 0.8rem;
    position: relative;
    z-index: 2;
}

.section-heading {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    letter-spacing: 0.08em;
    color: var(--color-deco-navy);
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.85;
    color: var(--color-muted-violet);
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
}

.section-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--color-lavender-grey);
    text-transform: uppercase;
    display: block;
    text-align: center;
    margin-top: 2.5rem;
}

/* --- Sections --- */
.section {
    position: relative;
    width: 100%;
    padding: 6rem 2rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-content {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-pastel-cream);
    padding-bottom: 3rem;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Sunburst */
.sunburst-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(80vw, 600px);
    height: min(80vw, 600px);
    z-index: 1;
    pointer-events: none;
}

.sunburst {
    width: 100%;
    height: 100%;
}

.sunburst-rays line {
    stroke: var(--color-deco-gold);
    stroke-width: 1;
    opacity: 0;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.sunburst-rays.animate line {
    animation: drawRay 1.5s ease forwards;
}

.sunburst-rays.animate line:nth-child(1) { animation-delay: 0s; }
.sunburst-rays.animate line:nth-child(2) { animation-delay: 0.08s; }
.sunburst-rays.animate line:nth-child(3) { animation-delay: 0.16s; }
.sunburst-rays.animate line:nth-child(4) { animation-delay: 0.24s; }
.sunburst-rays.animate line:nth-child(5) { animation-delay: 0.32s; }
.sunburst-rays.animate line:nth-child(6) { animation-delay: 0.4s; }
.sunburst-rays.animate line:nth-child(7) { animation-delay: 0.48s; }
.sunburst-rays.animate line:nth-child(8) { animation-delay: 0.56s; }
.sunburst-rays.animate line:nth-child(9) { animation-delay: 0.64s; }
.sunburst-rays.animate line:nth-child(10) { animation-delay: 0.72s; }
.sunburst-rays.animate line:nth-child(11) { animation-delay: 0.8s; }
.sunburst-rays.animate line:nth-child(12) { animation-delay: 0.88s; }
.sunburst-rays.animate line:nth-child(13) { animation-delay: 0.96s; }
.sunburst-rays.animate line:nth-child(14) { animation-delay: 1.04s; }
.sunburst-rays.animate line:nth-child(15) { animation-delay: 1.12s; }
.sunburst-rays.animate line:nth-child(16) { animation-delay: 1.2s; }

@keyframes drawRay {
    0% {
        stroke-dashoffset: 400;
        opacity: 0;
    }
    20% {
        opacity: 0.25;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.25;
    }
}

.sunburst-center {
    fill: none;
    stroke: var(--color-deco-gold);
    stroke-width: 1;
    opacity: 0;
    transition: opacity 1s ease 0.6s;
}

.sunburst-inner {
    fill: none;
    stroke: var(--color-deco-gold);
    stroke-width: 0.5;
    opacity: 0;
    transition: opacity 1s ease 0.9s;
}

.sunburst-rays.animate ~ .sunburst-center,
.sunburst-rays.animate ~ .sunburst-inner {
    opacity: 0.2;
}

/* Hero Divider */
.hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease 1.5s;
}

.hero-section.visible .hero-divider {
    opacity: 1;
}

.deco-divider {
    width: 100%;
    height: 60px;
    display: block;
}

/* --- Deco Section Dividers --- */
.deco-section-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    background-color: var(--color-pastel-cream);
}

.deco-section-divider svg {
    width: 100%;
    height: 40px;
    display: block;
}

.deco-section-divider.zigzag-divider svg,
.fan-divider svg {
    height: 60px;
}

.pyramid-divider svg {
    height: 60px;
}

/* --- Chamber Section --- */
.chamber-section {
    background-color: var(--color-pastel-cream);
    position: relative;
}

.chamber-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(176, 160, 128, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(138, 136, 160, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* --- Discourse Section --- */
.discourse-section {
    background-color: var(--color-blush-pink);
    position: relative;
}

.discourse-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(232, 208, 208, 0) 0%, rgba(248, 244, 238, 0.3) 100%);
    pointer-events: none;
}

.discourse-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem auto;
    max-width: 760px;
}

.column-title {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.06em;
    color: var(--color-deco-navy);
    text-align: center;
    margin-bottom: 0.8rem;
}

.column-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.8;
    color: var(--color-muted-violet);
    text-align: center;
}

/* --- Gallery Section --- */
.gallery-section {
    background-color: var(--color-pastel-cream);
    position: relative;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(248, 244, 238, 0.92), rgba(248, 244, 238, 0.92)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><rect fill="%23B0A080" opacity="0.02" width="400" height="400"/></svg>');
    filter: sepia(0.3) contrast(1.1);
    pointer-events: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin: 2.5rem auto;
    max-width: 800px;
}

.gallery-card {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
    border: 1px solid rgba(176, 160, 128, 0.25);
    background: rgba(248, 244, 238, 0.5);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.gallery-card:hover {
    border-color: rgba(176, 160, 128, 0.5);
    background: rgba(248, 244, 238, 0.8);
}

.card-deco-frame {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.2rem;
    opacity: 0.5;
}

.card-deco-frame svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    color: var(--color-deco-navy);
    margin-bottom: 0.6rem;
}

.card-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-muted-violet);
}

/* --- Proceedings Section --- */
.proceedings-section {
    background-color: var(--color-blush-pink);
    position: relative;
}

.proceedings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(232, 208, 208, 1) 0%, rgba(248, 244, 238, 0.2) 50%, rgba(232, 208, 208, 1) 100%);
    pointer-events: none;
}

.proceedings-list {
    max-width: 700px;
    margin: 2rem auto;
}

.proceeding-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.8rem 0;
    border-bottom: 1px solid rgba(176, 160, 128, 0.3);
    position: relative;
}

.proceeding-item:last-child {
    border-bottom: none;
}

.proceeding-date {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--color-deco-gold);
    min-width: 50px;
    text-align: center;
    line-height: 1;
    padding-top: 0.3rem;
}

.proceeding-content {
    flex: 1;
}

.proceeding-title {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    letter-spacing: 0.04em;
    color: var(--color-deco-navy);
    margin-bottom: 0.4rem;
}

.proceeding-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(0.88rem, 1.05vw, 0.98rem);
    line-height: 1.8;
    color: var(--color-muted-violet);
}

/* --- Principles Section --- */
.principles-section {
    background-color: var(--color-pastel-cream);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 2.5rem auto;
    max-width: 880px;
}

.principle-item {
    text-align: center;
    padding: 1.5rem 1rem;
}

.principle-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.6;
}

.principle-icon svg {
    width: 100%;
    height: 100%;
}

.principle-title {
    font-family: 'Libre Bodoni', serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: var(--color-deco-navy);
    margin-bottom: 0.5rem;
}

.principle-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--color-muted-violet);
}

/* --- Closing Section --- */
.closing-section {
    background-color: var(--color-deco-navy);
    padding: 8rem 2rem;
}

.closing-section .section-heading {
    color: var(--color-pastel-cream);
}

.closing-section .section-body {
    color: rgba(248, 244, 238, 0.75);
}

.closing-section .section-label {
    color: var(--color-lavender-grey);
}

.closing-sunburst {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.closing-sunburst svg {
    width: 100%;
    height: 100%;
}

.closing-ornament {
    width: 120px;
    margin: 2rem auto 0;
}

.closing-ornament svg {
    width: 100%;
    height: auto;
}

.closing-ornament svg line {
    stroke: var(--color-mint-accent);
}

.closing-ornament svg polygon {
    stroke: var(--color-mint-accent);
}

/* --- Deco Chevrons --- */
.deco-chevron {
    width: 40px;
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.deco-chevron svg {
    width: 100%;
    height: auto;
}

/* --- Mint Accent --- */
.discourse-section .section-heading {
    border-bottom: 2px solid var(--color-mint-accent);
    display: inline-block;
    padding-bottom: 0.3rem;
    margin-left: auto;
    margin-right: auto;
}

.discourse-section .section-content {
    text-align: center;
}

/* --- Ripple Effect --- */
#ripple-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    /* var(--color-ripple-warm) at 20% opacity */
    background: radial-gradient(circle, var(--color-ripple-warm)33 0%, var(--color-ripple-warm)00 70%);
    transform: scale(0);
    animation: rippleExpand 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .discourse-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .principles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .proceeding-item {
        gap: 1.2rem;
    }

    .proceeding-date {
        min-width: 35px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .principles-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .section {
        padding: 3rem 1rem;
    }
}
