/* ============================================================
   MasqproT.com — Styles
   Color Palette:
     #0A0A0F - Obsidian Black (Primary BG)
     #1A1525 - Midnight Aubergine (Secondary BG)
     #C9A84C - Antique Gold (Primary Accent)
     #8B6914 - Burnished Copper (Secondary Accent)
     #E8D5A3 - Champagne (Tertiary Accent)
     #F0E8D8 - Parchment Cream (Text Primary)
     #9B8EA0 - Dust Mauve (Text Secondary)
     #8B2500 - Venetian Red (Danger/Alert)

   Fonts:
     Playfair Display 700 — Display/Titles
     Cormorant Garamond 400/600 — Body/Protocol
     Josefin Sans 300 — Accent/Labels/UI
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0A0A0F;
    color: #F0E8D8;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Noise Texture Overlay ---- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBbl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X6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Gy6ElQmpCQk2WzYJL6jqRKZ1YjXP3S0ZrS8dSLxkbQw9q9K3crb4zr42N7VhUbH1+2bbxfzLmGveEvHyUL0x24bGeJvOtfUd6V/ct/cv3PZmT3C/sXPlx/ct2f3BxuvXDkxPD2SWzOn+X/HcMIJxLPhHDlf/Grj38E/oq8bG/c/4i+H7pr+P/Y9a+3LljZtWv4vZj/NvNV7lv7u9cm/Wrm3++z7x/GH7x/7p1Y/b5T5uf5j7J/3X1z4bfBn03c/3m17m3Y+/f3tj8cfFzy/ML5s+ufSr/9cftj48/Tbq5/Wv/19+d3Py95/e3B/5L7sn8t+Sf2z5Z/rPz/u+D8P");
    background-repeat: repeat;
    mix-blend-mode: overlay;
}

/* ---- Cursor Spotlight ---- */
#cursor-spotlight {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover #cursor-spotlight {
    opacity: 1;
}

/* ---- Navigation Monogram ---- */
#nav-monogram {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border: 1px solid #C9A84C;
    background: transparent;
    color: #C9A84C;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#nav-monogram:hover {
    background-color: #C9A84C;
    color: #0A0A0F;
}

/* ---- Navigation Overlay ---- */
#nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.97);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

#nav-overlay.open {
    transform: translateX(0);
}

#nav-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: #C9A84C;
    font-size: 48px;
    cursor: pointer;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    line-height: 1;
    transition: color 0.3s ease;
}

#nav-close:hover {
    color: #E8D5A3;
}

#nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: #F0E8D8;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateX(40px);
}

#nav-overlay.open .nav-link {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}

#nav-overlay.open .nav-link:nth-child(1) { transition-delay: 0.15s; }
#nav-overlay.open .nav-link:nth-child(2) { transition-delay: 0.25s; }
#nav-overlay.open .nav-link:nth-child(3) { transition-delay: 0.35s; }
#nav-overlay.open .nav-link:nth-child(4) { transition-delay: 0.45s; }
#nav-overlay.open .nav-link:nth-child(5) { transition-delay: 0.55s; }

.nav-link:hover {
    color: #C9A84C;
}

/* ---- General Section Styles ---- */
.act {
    position: relative;
    width: 100%;
}

/* ---- Section Headings ---- */
.section-heading-wrap {
    text-align: center;
    padding: 80px 20px 60px;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: 54px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #F0E8D8;
    margin: 20px 0;
}

/* ---- Filigree Rules ---- */
.filigree-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 300px;
    margin: 0 auto;
}

.filigree-rule .diamond {
    width: 8px;
    height: 8px;
    background-color: #C9A84C;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.filigree-rule .line {
    flex: 1;
    height: 1px;
    background-color: #C9A84C;
}

.filigree-rule .circle-node {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #C9A84C;
    flex-shrink: 0;
}

/* ---- Act 1: The Seal ---- */
.act-seal {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.seal-container {
    position: relative;
    z-index: 2;
}

#wax-seal {
    width: 160px;
    height: 160px;
    transition: filter 0.3s ease;
}

.seal-half {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.4s ease;
    transform-origin: center center;
}

.seal-cracking #seal-left {
    transform: translateX(-60px) rotate(-5deg);
    opacity: 0.6;
}

.seal-cracking #seal-right {
    transform: translateX(60px) rotate(5deg);
    opacity: 0.6;
}

.seal-cracking #seal-crack {
    opacity: 1;
    animation: crack-flash 0.3s ease-out;
}

@keyframes crack-flash {
    0% { opacity: 0; stroke-width: 6; }
    50% { opacity: 1; stroke-width: 4; }
    100% { opacity: 0.5; stroke-width: 2; }
}

/* Hero Title */
.hero-title {
    position: absolute;
    z-index: 1;
    font-family: 'Playfair Display', serif;
    font-size: 84px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #F0E8D8;
    display: flex;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-title.visible {
    opacity: 1;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--delay) * 80ms + 200ms);
    background: linear-gradient(135deg, #8B6914, #C9A84C, #E8D5A3, #C9A84C, #8B6914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title.visible .hero-letter {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    position: absolute;
    bottom: 20%;
    z-index: 1;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9B8EA0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 1s, transform 0.8s ease 1s;
}

.hero-title.visible ~ .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Act 2: The Gallery ---- */
.act-gallery {
    min-height: 150vh;
    padding: 0 60px 120px;
    position: relative;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-panel {
    background-color: #1A1525;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    filter: blur(8px);
    opacity: 0.3;
    transition: filter 0.6s ease, opacity 0.6s ease, border-color 0.6s ease;
}

.masonry-panel.revealed {
    filter: blur(0);
    opacity: 1;
    border-color: #C9A84C;
}

.masonry-panel.blurred-sibling {
    filter: blur(3px);
    opacity: 0.7;
}

/* Border draw animation */
.masonry-panel.revealed {
    animation: border-draw 0.6s ease-out forwards;
}

@keyframes border-draw {
    0% {
        border-color: transparent;
        box-shadow: inset 0 0 0 0 #C9A84C;
    }
    100% {
        border-color: #C9A84C;
        box-shadow: inset 0 0 0 0 transparent;
    }
}

.panel-span-3 {
    grid-column: span 3;
}

.panel-span-5 {
    grid-column: span 5;
}

.panel-span-7 {
    grid-column: span 7;
}

.panel-inner {
    padding: 40px;
    position: relative;
}

.panel-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #E8D5A3;
    margin-bottom: 16px;
}

.panel-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.85;
    color: #F0E8D8;
    font-weight: 400;
}

.panel-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

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

.mask-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    opacity: 0.04;
    pointer-events: none;
}

.mask-watermark svg {
    width: 100%;
    height: auto;
}

.deco-pattern {
    margin-bottom: 20px;
    opacity: 0.4;
}

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

/* ---- Act 3: The Unmasking ---- */
.act-unmasking {
    min-height: 150vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.unmasking-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#unmasking-mask {
    position: relative;
    z-index: 2;
    width: 50vw;
    max-width: 800px;
    height: auto;
}

.unmasking-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: url(#mask-clip);
}

.deco-radial-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.deco-radial-pattern svg {
    width: 100%;
    height: 100%;
}

.unmasking-text {
    position: relative;
    text-align: center;
    padding: 40px;
    z-index: 3;
}

.unmasking-title {
    font-family: 'Playfair Display', serif;
    font-size: 60px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #F0E8D8;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #8B6914, #C9A84C, #E8D5A3, #C9A84C, #8B6914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unmasking-desc {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    line-height: 1.85;
    color: #E8D5A3;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Act 4: The Protocol ---- */
.act-protocol {
    min-height: 200vh;
    padding: 0 20px 120px;
}

.protocol-articles {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.protocol-article {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.protocol-article.revealed {
    opacity: 1;
    transform: translateY(0);
}

.article-seal {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin-top: 8px;
}

.article-seal svg {
    width: 100%;
    height: 100%;
}

.article-content {
    flex: 1;
}

.article-heading {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #E8D5A3;
    margin-bottom: 12px;
}

.article-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.85;
    color: #F0E8D8;
    font-weight: 400;
}

/* Filigree dividers */
.filigree-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 200px;
    margin: 0 auto;
    padding: 10px 0;
}

.filigree-divider .line-thin {
    flex: 1;
    height: 1px;
    background-color: #C9A84C;
    opacity: 0.5;
}

.filigree-divider .diamond-small {
    width: 6px;
    height: 6px;
    background-color: #C9A84C;
    transform: rotate(45deg);
    flex-shrink: 0;
    margin: 0 8px;
    opacity: 0.5;
}

/* Typewriter cursor */
.typewriter-cursor {
    width: 2px;
    height: 24px;
    background-color: #C9A84C;
    margin: 30px auto 0;
    animation: blink-cursor 1.06s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- Act 5: The Departure ---- */
.act-departure {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.departure-container {
    text-align: center;
    position: relative;
}

#departure-seal {
    width: 160px;
    height: 160px;
}

.departure-seal-half {
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.6s ease;
    transform-origin: center center;
}

/* Start split apart */
#departure-seal-left {
    transform: translateX(-60px) rotate(-5deg);
    opacity: 0.5;
}

#departure-seal-right {
    transform: translateX(60px) rotate(5deg);
    opacity: 0.5;
}

/* Reassemble when in view */
.departure-container.reassembled #departure-seal-left {
    transform: translateX(0) rotate(0);
    opacity: 1;
}

.departure-container.reassembled #departure-seal-right {
    transform: translateX(0) rotate(0);
    opacity: 1;
}

.departure-text {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9B8EA0;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s;
}

.departure-container.reassembled .departure-text {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Fade-to-black at end ---- */
.act-departure::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, transparent, #0A0A0F);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease;
}

.act-departure.fading::after {
    opacity: 1;
}

/* ---- Gold Metallic Gradient Utility ---- */
.gold-metallic {
    background: linear-gradient(135deg, #8B6914, #C9A84C, #E8D5A3, #C9A84C, #8B6914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Data-reveal elements (generic) ---- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }

    .panel-span-3 {
        grid-column: span 3;
    }

    .panel-span-5 {
        grid-column: span 6;
    }

    .panel-span-7 {
        grid-column: span 6;
    }

    .hero-title {
        font-size: 56px;
    }

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

    .nav-link {
        font-size: 36px;
    }

    .unmasking-title {
        font-size: 42px;
    }

    #unmasking-mask {
        width: 70vw;
    }
}

@media (max-width: 768px) {
    .act-gallery {
        padding: 0 20px 60px;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .panel-span-3,
    .panel-span-5,
    .panel-span-7 {
        grid-column: span 1;
    }

    .hero-title {
        font-size: 40px;
    }

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

    .panel-inner {
        padding: 24px;
    }

    .protocol-article {
        padding: 24px 0;
    }

    .article-heading {
        font-size: 22px;
    }

    .nav-link {
        font-size: 28px;
    }

    .unmasking-title {
        font-size: 32px;
    }

    .unmasking-desc {
        font-size: 18px;
    }

    #unmasking-mask {
        width: 90vw;
    }

    #nav-monogram {
        top: 16px;
        left: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .filigree-rule {
        width: 200px;
    }
}
