/* =============================================
   MasqproT.com - Art Deco Masquerade
   Palette: Deep Burgundy, Copper, Parchment
   Fonts: Poiret One, Caveat, Cormorant Garamond
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --deep-burgundy: #6B1D3A;
    --deepest-night: #1A0A12;
    --burnished-copper: #C4976D;
    --warm-parchment: #F2E6D9;
    --rose-beige: #E8D5C4;
    --darkest-burgundy: #3A0E22;
    --champagne-gold: #D4A843;
    --muted-plum: #8E4563;
    --copper-brightness: 1;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deepest-night);
    color: var(--rose-beige);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Poiret One', 'Didot', serif;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--warm-parchment);
}

.caveat {
    font-family: 'Caveat', cursive;
    color: var(--burnished-copper);
    filter: brightness(var(--copper-brightness));
}

.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    font-weight: 400;
    color: var(--rose-beige);
    max-width: 680px;
    margin: 0 auto 1.5em;
}

.body-text strong {
    font-weight: 600;
}

/* --- Side Borders (Decorative Frame) --- */
.side-border {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 70px;
    z-index: 10;
    pointer-events: none;
    background-attachment: fixed;
    background-repeat: repeat-y;
    background-size: 70px auto;
}

.side-border-left {
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='200' viewBox='0 0 70 200'%3E%3Cg stroke='%236B1D3A' stroke-width='1' fill='none' stroke-linecap='square'%3E%3C!-- Elongated diamond --%3E%3Cpolygon points='35,10 55,50 35,90 15,50'/%3E%3C!-- Small chevron --%3E%3Cpolyline points='20,105 35,120 50,105'/%3E%3C!-- Horizontal rule --%3E%3Cline x1='15' y1='135' x2='55' y2='135'/%3E%3C!-- Stepped zigzag --%3E%3Cpolyline points='15,155 25,145 35,155 45,145 55,155'/%3E%3C!-- Small diamond --%3E%3Cpolygon points='35,170 42,180 35,190 28,180'/%3E%3C/g%3E%3C/svg%3E");
}

.side-border-right {
    right: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='200' viewBox='0 0 70 200'%3E%3Cg stroke='%236B1D3A' stroke-width='1' fill='none' stroke-linecap='square'%3E%3C!-- Elongated diamond --%3E%3Cpolygon points='35,10 55,50 35,90 15,50'/%3E%3C!-- Small chevron --%3E%3Cpolyline points='20,105 35,120 50,105'/%3E%3C!-- Horizontal rule --%3E%3Cline x1='15' y1='135' x2='55' y2='135'/%3E%3C!-- Stepped zigzag --%3E%3Cpolyline points='15,155 25,145 35,155 45,145 55,155'/%3E%3C!-- Small diamond --%3E%3Cpolygon points='35,170 42,180 35,190 28,180'/%3E%3C/g%3E%3C/svg%3E");
}

/* --- Diamond Lattice Background Texture --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpolygon points='30,5 55,30 30,55 5,30' fill='none' stroke='%23D4A843' stroke-width='0.75'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 60px 60px;
}

/* --- Sections --- */
.section {
    position: relative;
    z-index: 1;
}

.opening-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.opening-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.content-section {
    padding: 120px 24px 160px;
    position: relative;
}

.section-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.closing-section {
    padding: 120px 24px 160px;
    text-align: center;
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Opening Sequence --- */
.fan-motif {
    opacity: 0;
}

.fan-motif .fan-ray {
    stroke: var(--champagne-gold);
    stroke-width: 1.5;
    stroke-linecap: square;
    opacity: 0;
}

.fan-motif.animate .fan-ray {
    animation: fanRayIn 80ms ease-out forwards;
}

@keyframes fanRayIn {
    from {
        opacity: 0;
        stroke-dasharray: 250;
        stroke-dashoffset: 250;
    }
    to {
        opacity: 1;
        stroke-dasharray: 250;
        stroke-dashoffset: 0;
    }
}

.site-title {
    font-size: 72px;
    letter-spacing: 0.12em;
    color: var(--warm-parchment);
    margin-top: 40px;
    opacity: 0;
}

.site-title.animate {
    opacity: 1;
}

.site-title .char {
    display: inline-block;
    opacity: 0;
}

.site-title .char.visible {
    animation: charFadeIn 200ms ease-out forwards;
}

@keyframes charFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tagline {
    font-size: 28px;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 800ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.tagline.animate {
    opacity: 1;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    animation: scrollBounce 2.5s ease-in-out infinite;
    animation-delay: 3s;
    opacity: 0;
}

.scroll-indicator.animate {
    animation: scrollFadeInBounce 2.5s ease-in-out infinite;
}

@keyframes scrollFadeInBounce {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.8; transform: translateX(-50%) translateY(8px); }
}

@keyframes scrollBounce {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.8; transform: translateX(-50%) translateY(8px); }
}

/* --- Section Headings --- */
.section-heading {
    font-size: 48px;
    margin-bottom: 40px;
    color: var(--warm-parchment);
    line-height: 1.2;
}

/* --- Icon Anchors --- */
.icon-anchor {
    margin-bottom: 40px;
}

.icon-anchor svg {
    display: block;
    margin: 0 auto;
}

/* --- Fade Reveal Pattern --- */
.fade-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

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

.fade-reveal[data-delay="300"] {
    transition-delay: 300ms;
}

/* --- Dividers --- */
.divider {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.divider-svg {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.divider .draw-lines line,
.divider .draw-lines polyline,
.divider .draw-lines polygon,
.divider .draw-lines path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.divider .draw-lines circle {
    opacity: 0;
    transition: opacity 0.8s ease 0.8s;
}

.divider.visible .draw-lines line,
.divider.visible .draw-lines polyline,
.divider.visible .draw-lines polygon,
.divider.visible .draw-lines path {
    stroke-dashoffset: 0;
}

.divider.visible .draw-lines circle {
    opacity: 1;
}

/* --- Feature List --- */
.feature-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chevron-bullet {
    flex-shrink: 0;
}

.feature-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--rose-beige);
}

/* --- Handwritten Annotations --- */
.annotation {
    position: relative;
    z-index: 5;
    max-width: 280px;
    padding: 16px 0;
}

.annotation .caveat {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    filter: brightness(var(--copper-brightness));
}

.annotation-right {
    margin-left: auto;
    margin-right: -10px;
    transform: rotate(2.5deg) translateY(30px);
    text-align: right;
    padding-right: 40px;
}

.annotation-right.visible {
    transform: rotate(2.5deg) translateY(0);
}

.annotation-left {
    margin-right: auto;
    margin-left: -10px;
    transform: rotate(-2deg) translateY(30px);
    text-align: left;
    padding-left: 40px;
}

.annotation-left.visible {
    transform: rotate(-2deg) translateY(0);
}

/* --- Closing Section --- */
.closing-fan {
    opacity: 0.6;
    margin-bottom: 30px;
}

.closing-fan line,
.closing-fan path {
    filter: brightness(var(--copper-brightness));
}

.closing-text {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.closing-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-plum);
}

/* --- Copper Shimmer --- */
.copper-shimmer {
    filter: brightness(var(--copper-brightness));
    transition: filter 100ms linear;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .side-border {
        display: none;
    }

    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg,
            transparent 0%,
            var(--deep-burgundy) 20%,
            var(--champagne-gold) 50%,
            var(--deep-burgundy) 80%,
            transparent 100%
        );
        opacity: 0.5;
        z-index: 100;
        pointer-events: none;
    }

    .section-heading {
        font-size: 36px;
    }

    .site-title {
        font-size: 48px;
    }

    .tagline {
        font-size: 22px;
    }

    .annotation {
        max-width: 220px;
    }

    .annotation .caveat {
        font-size: 22px;
    }

    .content-section {
        padding: 80px 24px 100px;
    }

    .closing-text {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 36px;
    }

    .section-heading {
        font-size: 28px;
    }

    .body-text {
        font-size: 16px;
    }

    .tagline {
        font-size: 18px;
    }

    .fan-motif {
        width: 200px;
        height: 200px;
    }

    .content-section {
        padding: 60px 20px 80px;
    }

    .annotation-right {
        padding-right: 20px;
    }

    .annotation-left {
        padding-left: 20px;
    }

    .annotation .caveat {
        font-size: 20px;
    }
}
