* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --thornblack: #0d0a14;
    --abyssal-violet: #1a1429;
    --briar-indigo: #2e2248;
    --moonpetal: #e2d4f0;
    --mistgray: #9e95a8;
    --dewsilver: #b8b0c4;
    --blush-thorn: #8b5a6e;
    --fairy-venom: #6b4e8a;
    --cracked-petal: #c9a0b8;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--thornblack);
    color: var(--mistgray);
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Sigil */
.sigil {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    cursor: pointer;
}

.sigil:hover .sigil-node {
    animation: sigil-pulse 0.6s ease forwards;
}

@keyframes sigil-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Reveal system */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Bubbles */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(226, 212, 240, 0.08), rgba(107, 78, 138, 0.12));
    border: 1px solid rgba(201, 160, 184, 0.3);
    animation: bubble-float var(--bubble-duration, 35s) ease-in-out infinite;
    animation-delay: var(--bubble-delay, 0s);
    left: var(--bubble-x, 50%);
    top: var(--bubble-y, 50%);
    width: var(--bubble-size, 40px);
    height: var(--bubble-size, 40px);
}

.bubble.shattered {
    border-radius: 0;
    border-color: rgba(46, 34, 72, 0.5);
}

@keyframes bubble-float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-30px) translateX(10px); }
    50% { transform: translateY(-60px) translateX(-5px); }
    75% { transform: translateY(-30px) translateX(-10px); }
}

/* Section: The Veil */
.section-veil {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.veil-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--moonpetal);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.subtitle {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--mistgray);
    opacity: 0.85;
}

/* Thorn lines */
.thorn-line {
    position: absolute;
    width: 2px;
    height: 40vh;
    bottom: 0;
    background: linear-gradient(to top, var(--briar-indigo), transparent);
    z-index: 1;
}

.thorn-line-left {
    left: 15%;
    transform: rotate(15deg);
    transform-origin: bottom left;
}

.thorn-line-right {
    right: 15%;
    transform: rotate(-15deg);
    transform-origin: bottom right;
}

/* Section: The Fracture */
.section-fracture {
    position: relative;
    padding: 100px 5% 150px;
    min-height: 150vh;
}

.fracture-block {
    max-width: 550px;
    margin-bottom: 100px;
    padding: 40px 35px;
    background: rgba(26, 20, 41, 0.6);
    clip-path: polygon(2% 0%, 98% 3%, 100% 97%, 1% 100%);
    position: relative;
}

.fracture-block p {
    margin-bottom: 1em;
    color: var(--mistgray);
}

.fracture-block p:last-child {
    margin-bottom: 0;
}

/* Diagonal scars */
.diagonal-scar {
    position: relative;
    width: 100%;
    height: 80px;
    margin: 40px 0;
}

.scar-1 {
    clip-path: polygon(0% 60%, 100% 20%, 100% 25%, 0% 65%);
    background: linear-gradient(to right, var(--briar-indigo), transparent);
}

.scar-2 {
    clip-path: polygon(0% 30%, 100% 55%, 100% 60%, 0% 35%);
    background: linear-gradient(to left, var(--briar-indigo), transparent);
}

.scar-3 {
    clip-path: polygon(0% 70%, 100% 40%, 100% 45%, 0% 75%);
    background: linear-gradient(to right, var(--briar-indigo), transparent 80%);
}

/* Section: The Briar */
.section-briar {
    position: relative;
    padding: 80px 5% 150px;
    min-height: 130vh;
    background: linear-gradient(to bottom, var(--thornblack), var(--abyssal-violet));
}

.briar-card {
    max-width: 500px;
    padding: 35px 30px;
    margin-bottom: 30px;
    background: rgba(46, 34, 72, 0.3);
    position: relative;
}

.briar-card:nth-child(2) {
    clip-path: polygon(3% 2%, 97% 0%, 100% 95%, 0% 98%);
}

.briar-card:nth-child(3) {
    clip-path: polygon(0% 3%, 95% 0%, 98% 100%, 2% 97%);
}

.briar-card:nth-child(4) {
    clip-path: polygon(1% 0%, 100% 4%, 97% 98%, 3% 100%);
}

.briar-card:nth-child(5) {
    clip-path: polygon(4% 1%, 98% 3%, 100% 96%, 0% 100%);
}

.briar-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10px;
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, var(--briar-indigo), transparent);
    transform: rotate(37deg);
    transform-origin: left;
}

.briar-card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 15px;
    width: 45px;
    height: 1px;
    background: linear-gradient(to left, var(--briar-indigo), transparent);
    transform: rotate(127deg);
    transform-origin: right;
}

.briar-card p {
    margin-bottom: 1em;
    color: var(--mistgray);
}

.briar-card p:last-child {
    margin-bottom: 0;
}

/* Section: The Clearing */
.section-clearing {
    position: relative;
    padding: 150px 5%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clearing-block {
    max-width: 600px;
    padding: 50px 45px;
    background: rgba(26, 20, 41, 0.4);
    clip-path: polygon(1% 0%, 99% 1%, 100% 99%, 0% 100%);
    text-align: center;
}

.clearing-block p {
    margin-bottom: 1.2em;
    color: var(--dewsilver);
    font-size: 1.05em;
}

.clearing-block p:last-child {
    margin-bottom: 0;
}

/* Section: The Root */
.section-root {
    position: relative;
    padding: 80px 5% 120px;
    min-height: 60vh;
    background: var(--thornblack);
}

.root-card {
    max-width: 420px;
    padding: 30px 25px;
    margin-bottom: 20px;
    background: rgba(46, 34, 72, 0.25);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    line-height: 1.8;
    color: var(--dewsilver);
}

.root-card:nth-child(1) {
    clip-path: polygon(5% 0%, 100% 6%, 95% 100%, 0% 94%);
}

.root-card:nth-child(2) {
    clip-path: polygon(0% 5%, 97% 0%, 100% 92%, 3% 100%);
}

.root-card:nth-child(3) {
    clip-path: polygon(2% 3%, 100% 0%, 98% 97%, 0% 100%);
}

.root-card:nth-child(4) {
    clip-path: polygon(0% 0%, 96% 4%, 100% 100%, 4% 96%);
}

.root-card p {
    margin-bottom: 0.8em;
}

.root-card p:first-child {
    color: var(--moonpetal);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.root-card p:last-child {
    margin-bottom: 0;
}

.closing-whisper {
    text-align: center;
    margin-top: 100px;
    padding: 0 20px;
}

.closing-whisper p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--cracked-petal);
    opacity: 0.7;
}

/* Mobile */
@media (max-width: 768px) {
    .fracture-block {
        margin-left: 5% !important;
        max-width: 85%;
    }

    .briar-card {
        margin-left: 5% !important;
        max-width: 85%;
    }

    .root-card {
        margin-left: 5% !important;
        max-width: 85%;
    }

    .thorn-line {
        height: 25vh;
    }

    .briar-card::before,
    .briar-card::after {
        width: 35px;
    }
}
