/* ============================================
   MasqueradeProtocol.com — Styles
   Duotone: Deep Violet (#3b1261) + Coral (#e85d75)
   ============================================ */

/* Fonts: Libre Baskerville, Source Serif 4, Space Grotesk, Cutive Mono (Google Fonts) */
/* === CSS Custom Properties === */
:root {
    --primary-dark: #3b1261;
    --primary-light: #e85d75;
    --bg-midnight: #0e0b1a;
    --surface-plum: #1e1433;
    --text-cream: #f5ede0;
    --text-lavender: #b8a9d4;
    --accent-gold: #d4a843;
    --watercolor-coral: rgba(232, 93, 117, 0.1);
    --watercolor-violet: rgba(59, 18, 97, 0.3);

    --violet-mid: #6b2fa0;
    --shadow-violet: rgba(107, 47, 160, 0.2);
    --shadow-coral: rgba(232, 93, 117, 0.15);

    --font-headline: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-accent: 'Space Grotesk', system-ui, sans-serif;
    --font-cipher: 'Cutive Mono', 'Courier New', monospace;

    --bento-gap: 12px;
    --bento-radius: 8px;

    --bg-color: #0e0b1a;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-cream);
    background-color: var(--bg-color);
    transition: background-color 800ms ease;
    overflow-x: hidden;
    position: relative;
}

body[data-chamber="2"] {
    --bg-color: #160e24;
    background-color: var(--bg-color);
}

body[data-chamber="3"] {
    --bg-color: #1a0f1e;
    background-color: var(--bg-color);
}

body[data-chamber="4"] {
    --bg-color: #0e0b1a;
    background-color: var(--bg-color);
}

h1, h2, h3 {
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--text-cream);
}

h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    letter-spacing: -0.015em;
    text-shadow: 0 0 40px rgba(232, 93, 117, 0.3);
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.2em;
}

em {
    font-style: italic;
    color: var(--primary-light);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 300ms ease;
}

a:hover {
    color: var(--primary-light);
}

/* === Background Watercolor Bleeds === */
.bg-bleed {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    opacity: 0.6;
    transition: transform 2s ease-out;
}

.bleed-1 {
    width: 60vw;
    height: 60vw;
    top: -20vw;
    left: -15vw;
    background: radial-gradient(ellipse at 30% 40%, rgba(232, 93, 117, 0.08) 0%, transparent 70%);
}

.bleed-2 {
    width: 50vw;
    height: 50vw;
    top: 40vh;
    right: -20vw;
    background: radial-gradient(ellipse at 60% 50%, rgba(59, 18, 97, 0.15) 0%, transparent 70%);
}

.bleed-3 {
    width: 45vw;
    height: 45vw;
    bottom: -10vw;
    left: 20vw;
    background: radial-gradient(ellipse at 50% 60%, rgba(232, 93, 117, 0.06) 0%, transparent 65%);
}

/* ============================================
   INVITATION SECTION
   ============================================ */
.invitation {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    background: 
        radial-gradient(ellipse at 50% 40%, rgba(59, 18, 97, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 70%, rgba(232, 93, 117, 0.08) 0%, transparent 50%);
}

/* Mask */
.invitation-mask {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 320px;
    height: 200px;
    animation: breathe 4s ease-in-out infinite;
}

.mask-half {
    width: 160px;
    height: 200px;
    position: relative;
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.mask-left {
    clip-path: inset(0 0 0 0);
}

.mask-right {
    clip-path: inset(0 0 0 0);
}

body.mask-split .mask-left {
    transform: translateX(-120px) rotate(-8deg);
    opacity: 0;
}

body.mask-split .mask-right {
    transform: translateX(120px) rotate(8deg);
    opacity: 0;
}

.mask-shape {
    width: 320px;
    height: 200px;
    position: absolute;
    top: 0;
    background: 
        radial-gradient(ellipse at 50% 45%, rgba(59, 18, 97, 0.9) 0%, rgba(59, 18, 97, 0.4) 45%, transparent 70%),
        radial-gradient(ellipse at 50% 50%, rgba(107, 47, 160, 0.5) 0%, transparent 60%);
    clip-path: ellipse(50% 42% at 50% 45%);
}

.mask-left .mask-shape {
    left: 0;
}

.mask-right .mask-shape {
    right: 0;
    left: auto;
    transform: translateX(-160px);
}

.mask-eye {
    position: absolute;
    width: 24px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-light);
    top: 38%;
    animation: eyePulse 3s ease-in-out infinite;
    box-shadow: 0 0 20px var(--primary-light), 0 0 40px rgba(232, 93, 117, 0.4);
}

.left-eye {
    left: 28%;
}

.right-eye {
    left: 28%;
}

.mask-right .right-eye {
    left: auto;
    right: calc(28% - 160px);
    left: 28%;
}

@keyframes eyePulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 15px var(--primary-light); }
    50% { opacity: 1; box-shadow: 0 0 30px var(--primary-light), 0 0 60px rgba(232, 93, 117, 0.5); }
}

/* Invitation Text */
.invitation-text {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--text-cream);
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 1s ease-out 1.2s forwards;
    margin-top: 2rem;
    text-shadow: 0 0 30px rgba(232, 93, 117, 0.2);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 2.8s forwards;
}

.scroll-hint-label {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-lavender);
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-lavender), transparent);
    animation: scrollPulse 2s ease-in-out infinite 3s;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.5; height: 40px; }
    50% { opacity: 1; height: 55px; }
}

/* ============================================
   CHAMBER COMMON STYLES
   ============================================ */
.chamber {
    position: relative;
    padding: 6rem 4rem;
    z-index: 1;
    min-height: 100vh;
}

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

.chamber-numeral {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 20vw;
    color: rgba(59, 18, 97, 0.04);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
    user-select: none;
}

.chamber-title-bar {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.chamber-label {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
}

.chamber-name {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-lavender);
}

/* ============================================
   BENTO GRID SYSTEM
   ============================================ */
.bento-grid {
    display: grid;
    gap: var(--bento-gap);
    position: relative;
    z-index: 2;
}

.bento-cell {
    background: var(--surface-plum);
    border-radius: var(--bento-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.85) translateY(30px);
    transition: opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1), 
                transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bento-cell.visible {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(var(--organic-rotate, 0deg));
}

.bento-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bento-radius);
    border: 1px solid rgba(107, 47, 160, 0.2); /* #6b2fa0 at 20% */
    pointer-events: none;
}

/* Organic offset + colored shadows */
.bento-cell:nth-child(odd) {
    --organic-rotate: 0.3deg;
    box-shadow: 4px 6px 20px var(--shadow-violet);
}

.bento-cell:nth-child(even) {
    --organic-rotate: -0.4deg;
    box-shadow: -3px 5px 18px var(--shadow-coral);
}

/* ============================================
   CHAMBER 1 — THE FOYER
   ============================================ */
.foyer-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    max-width: 900px;
    margin: 0 auto;
}

.foyer-hero {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    background: 
        radial-gradient(ellipse at 40% 30%, rgba(232, 93, 117, 0.1) 0%, transparent 60%),
        var(--surface-plum);
}

.mask-breathing-container {
    width: 180px;
    height: 150px;
    animation: breathe 4s ease-in-out infinite;
}

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

.eye-glow {
    animation: eyePulse 3s ease-in-out infinite;
}

.foyer-hero-text {
    font-family: var(--font-headline);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    text-align: center;
    line-height: 1.5;
    color: var(--text-cream);
    margin-top: 1rem;
    margin-bottom: 0;
}

.foyer-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(ellipse at 60% 70%, rgba(59, 18, 97, 0.4) 0%, transparent 70%),
        var(--surface-plum);
}

.tagline-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-lavender);
    margin-bottom: 0;
}

.foyer-quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(232, 93, 117, 0.08) 0%, transparent 60%),
        var(--surface-plum);
}

.rotating-quote {
    position: relative;
    min-height: 80px;
}

.quote-text {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-lavender);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 800ms ease;
}

.quote-text.active {
    opacity: 1;
    position: relative;
}

.quote-attr {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    display: block;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .foyer-grid {
        grid-template-columns: 1fr;
    }
    .foyer-hero {
        grid-column: 1;
        grid-row: auto;
    }
}

/* ============================================
   CHAMBER 2 — THE GALLERY (Flip Cards)
   ============================================ */
.gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-card {
    padding: 0;
    overflow: visible;
    background: none;
    box-shadow: none;
}

.gallery-card::before {
    display: none;
}

.gallery-card.cell-2x1 {
    grid-column: span 2;
}

.flip-card {
    width: 100%;
    height: 100%;
    min-height: 220px;
    perspective: 1200px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 500ms ease;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--bento-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flip-card-front {
    background: var(--surface-plum);
    overflow: hidden;
    border: 1px solid rgba(107, 47, 160, 0.2);
}

.flip-card-front:nth-child(odd) {
    box-shadow: 4px 6px 20px var(--shadow-violet);
}

.flip-card-back {
    background: var(--text-cream);
    color: var(--bg-midnight);
    transform: rotateY(180deg);
    overflow-y: auto;
    box-shadow: 4px 6px 24px var(--shadow-coral);
    border: 1px solid rgba(232, 93, 117, 0.2);
}

.flip-card-back h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.flip-card-back p {
    color: #2a1e3d;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Watercolor wash on card front */
.watercolor-wash {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    pointer-events: none;
}

.wash-violet {
    background: 
        radial-gradient(ellipse at 30% 60%, rgba(59, 18, 97, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(107, 47, 160, 0.3) 0%, transparent 50%);
}

.wash-coral {
    background:
        radial-gradient(ellipse at 60% 40%, rgba(232, 93, 117, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 25% 70%, rgba(59, 18, 97, 0.3) 0%, transparent 60%);
}

.wash-mixed {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(232, 93, 117, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 65% 35%, rgba(59, 18, 97, 0.35) 0%, transparent 55%);
}

.card-title-masked {
    position: relative;
    z-index: 1;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-cream);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-card.cell-2x1 {
        grid-column: span 1;
    }
}

/* ============================================
   CHAMBER 3 — THE LIBRARY
   ============================================ */
.library-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--bento-gap);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.library-text {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(232, 93, 117, 0.06) 0%, transparent 50%),
        var(--surface-plum);
}

.library-text h2 {
    text-shadow: 0 0 30px rgba(232, 93, 117, 0.2);
}

.library-text p {
    font-size: 1.05rem;
}

.library-artifacts {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: var(--bento-gap);
}

.artifact-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 120px;
}

.artifact-label {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-lavender);
    margin-top: 0.75rem;
    display: block;
}

/* Watercolor swatch */
.watercolor-swatch {
    width: 80px;
    height: 60px;
    position: relative;
}

.swatch-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
}

.swatch-violet {
    width: 50px;
    height: 50px;
    background: var(--primary-dark);
    top: 0;
    left: 0;
    opacity: 0.8;
}

.swatch-coral {
    width: 45px;
    height: 45px;
    background: var(--primary-light);
    bottom: 0;
    right: 0;
    opacity: 0.6;
}

/* Cipher block */
.cipher-block {
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 0;
}

/* Artifact mask icon */
.artifact-mask-icon {
    width: 70px;
    height: 55px;
}

/* Marginalia inline */
.marginalia-inline {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-lavender);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Quill */
.quill-container {
    margin: 2rem 0 1rem;
    overflow: hidden;
}

.quill-svg {
    width: 100%;
    max-width: 400px;
    height: 60px;
}

.quill-flourish {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 2s ease-out;
}

.quill-container.visible .quill-flourish {
    stroke-dashoffset: 0;
}

@media (max-width: 768px) {
    .library-layout {
        grid-template-columns: 1fr;
    }
    .library-artifacts {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

/* ============================================
   CHAMBER 4 — THE REVEAL
   ============================================ */
.chamber-reveal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.reveal-content {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    flex: 1;
}

.reveal-scroll {
    background:
        radial-gradient(ellipse at 50% 20%, rgba(59, 18, 97, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(232, 93, 117, 0.06) 0%, transparent 50%);
    padding: 3rem;
    border-radius: var(--bento-radius);
    border: 1px solid rgba(107, 47, 160, 0.15);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms ease, transform 800ms ease;
}

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

.reveal-large {
    font-family: var(--font-headline);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.5;
    text-align: center;
    margin: 2rem 0;
}

.gold-reveal {
    color: var(--accent-gold);
    text-shadow: 0 0 20px rgba(212, 168, 67, 0.3);
    transition: text-shadow 600ms ease;
}

.reveal-coda {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(184, 169, 212, 0.2);
}

.generated-mask-id {
    color: var(--accent-gold);
    font-weight: 700;
}

/* ============================================
   CIPHER TEXT
   ============================================ */
.cipher-text {
    font-family: var(--font-cipher);
    font-size: 0.85rem;
    color: var(--text-lavender);
    letter-spacing: 0.02em;
}

.cipher-fragment {
    display: block;
    padding: 1rem;
    background: rgba(14, 11, 26, 0.5);
    border-radius: 4px;
    border-left: 3px solid var(--primary-light);
    margin: 1.5rem 0;
}

/* ============================================
   MARGINALIA
   ============================================ */
.marginalia {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    max-width: 120px;
}

.marginalia-text {
    font-family: var(--font-cipher);
    font-size: 0.7rem;
    color: var(--text-lavender);
    opacity: 0.5;
    display: block;
    transform: rotate(-2deg);
    line-height: 1.5;
}

.marginalia-right .marginalia-text {
    transform: rotate(2deg);
    text-align: right;
}

@media (max-width: 900px) {
    .marginalia {
        display: none;
    }
}

/* ============================================
   RULED LINES
   ============================================ */
.ruled-line {
    position: relative;
    height: 1px;
    background: rgba(184, 169, 212, 0.3);
    margin: 1.5rem 0;
}

.ruled-line::before {
    content: '';
    position: absolute;
    left: 60px;
    top: -1px;
    width: 2px;
    height: 3px;
    background: rgba(232, 93, 117, 0.2);
}

.flip-card-back .ruled-line {
    background: rgba(42, 30, 61, 0.2);
}

.flip-card-back .ruled-line::before {
    background: rgba(232, 93, 117, 0.3);
}

/* ============================================
   INK DRIP DIVIDER
   ============================================ */
.ink-drip-divider {
    position: relative;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    z-index: 1;
    overflow: hidden;
}

.drip {
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    opacity: 0.6;
    animation: drip 3s ease-in-out infinite;
}

.drip-2 {
    animation-delay: 0.8s;
    opacity: 0.4;
    width: 4px;
    height: 4px;
}

.drip-3 {
    animation-delay: 1.6s;
    opacity: 0.3;
    width: 5px;
    height: 5px;
}

@keyframes drip {
    0% {
        transform: translateY(0) scale(1);
        border-radius: 50%;
        opacity: 0.6;
    }
    30% {
        transform: translateY(10px) scale(1, 1.3);
        border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    }
    60% {
        transform: translateY(45px) scale(0.8, 1.5);
        border-radius: 40% 40% 50% 50% / 20% 20% 80% 80%;
        opacity: 0.6;
    }
    100% {
        transform: translateY(70px) scale(0.5);
        opacity: 0;
    }
}

/* ============================================
   WAX SEAL
   ============================================ */
.wax-seal {
    width: 60px;
    height: 60px;
    margin: 1rem auto;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #e8b84d, var(--accent-gold) 50%, #a07828 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 
        0 0 0 3px rgba(212, 168, 67, 0.3),
        0 0 0 6px rgba(212, 168, 67, 0.15),
        0 0 0 10px rgba(212, 168, 67, 0.05),
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.seal-letter {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.4rem;
    color: #1a0f1e;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wax-seal-inline {
    width: 50px;
    height: 50px;
}

.wax-seal-inline .seal-letter {
    font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(107, 47, 160, 0.15);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-text {
    font-family: var(--font-headline);
    font-size: 1rem;
    color: var(--text-lavender);
    margin-bottom: 0;
}

.footer-sub {
    font-size: 0.7rem;
    margin-bottom: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

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

/* Cell stagger animation utility */
.bento-cell[data-delay="80"] { transition-delay: 80ms; }
.bento-cell[data-delay="160"] { transition-delay: 160ms; }
.bento-cell[data-delay="240"] { transition-delay: 240ms; }
.bento-cell[data-delay="320"] { transition-delay: 320ms; }
.bento-cell[data-delay="400"] { transition-delay: 400ms; }

/* ============================================
   WATERCOLOR BORDER-IMAGE ON BENTO CELLS
   ============================================ */
.foyer-hero::after,
.library-text::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bento-radius);
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(232, 93, 117, 0.3) 0%, transparent 50%, rgba(59, 18, 97, 0.3) 100%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   SCROLLBAR CUSTOMIZATION
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-midnight);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
