/* ============================================
   mystical.day - Scandinavian Crystal Observatory
   ============================================ */
:root {
    --bone-cream: #FAF4ED;
    --umber-black: #1A0E04;
    --carnelian: #C4712E;
    --siderite-gold: #D4943A;
    --iron-oxide: #8B4513;
    --deep-vein: #2C1810;
    --warm-stone: #E8DBC8;
    --citrine-flash: #E8A835;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--bone-cream);
    color: var(--umber-black);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    /* Bone marble subtle texture */
    background-image:
        radial-gradient(ellipse at 40% 60%, rgba(196, 113, 46, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(212, 148, 58, 0.015) 0%, transparent 40%),
        linear-gradient(147deg, rgba(139, 69, 19, 0.01) 0%, transparent 30%);
}

/* --- Column --- */
.column {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 10vw, 3rem);
}

/* ==============================
   THE APERTURE
   ============================== */
.aperture {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.marble-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.marble-bg--citrine {
    background:
        radial-gradient(ellipse at 30% 70%, rgba(196, 113, 46, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(212, 148, 58, 0.06) 0%, transparent 40%),
        linear-gradient(147deg, rgba(139, 69, 19, 0.03) 0%, transparent 30%, rgba(196, 113, 46, 0.05) 60%, transparent 100%),
        linear-gradient(327deg, transparent 0%, rgba(232, 168, 53, 0.04) 40%, transparent 70%);
    animation: marbleRotate 720s linear infinite;
}
@keyframes marbleRotate {
    to { transform: rotate(360deg); }
}

.aperture-title {
    font-family: 'Poiret One', Georgia, serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: var(--umber-black);
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: materialize 2s ease-out forwards;
}
@keyframes materialize {
    to { opacity: 1; }
}

.fracture-line {
    width: 120px;
    height: 1px;
    background: var(--carnelian);
    opacity: 0.4;
    margin: 4vh auto;
    position: relative;
    z-index: 1;
}
.fracture-line--light {
    background: var(--bone-cream);
    opacity: 0.3;
}

/* ==============================
   THE FACET CORRIDOR
   ============================== */
.corridor {
    padding: 8vh 0;
}
.body-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.75;
    color: var(--umber-black);
    margin-bottom: 4vh;
}
.body-text strong {
    font-weight: 700;
}

/* --- Crystalline Dividers --- */
.crystal-divider {
    position: relative;
    margin: 4vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Level 1: Simple Chevron */
.crystal-divider--1 {
    width: 60px;
    height: 40px;
}
.crystal-divider--1::before,
.crystal-divider--1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 1px;
    background: var(--carnelian);
    opacity: 0.15;
}
.crystal-divider--1::before {
    transform: translate(-100%, -50%) rotate(30deg);
}
.crystal-divider--1::after {
    transform: translate(0%, -50%) rotate(-30deg);
}

/* Level 2: Hexagonal outline */
.crystal-divider--2 {
    width: 80px;
    height: 60px;
}
.crystal-divider--2::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--carnelian);
    opacity: 0.2;
    transform: rotate(45deg);
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -20px;
}
.crystal-divider--2::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    border: 1px solid var(--siderite-gold);
    opacity: 0.1;
    transform: rotate(30deg);
    top: 50%;
    left: 50%;
    margin: -14px 0 0 -14px;
}

/* Level 3: Complex snowflake */
.crystal-divider--3 {
    width: 100px;
    height: 80px;
}
.crystal-divider--3::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 1px solid var(--carnelian);
    opacity: 0.15;
    transform: rotate(45deg);
    top: 50%;
    left: 50%;
    margin: -25px 0 0 -25px;
}
.crystal-divider--3::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1px solid var(--siderite-gold);
    opacity: 0.12;
    transform: rotate(15deg);
    top: 50%;
    left: 50%;
    margin: -18px 0 0 -18px;
}

/* Divider hover */
.crystal-divider:hover::before,
.crystal-divider:hover::after {
    opacity: 0.3;
    transition: opacity 400ms ease;
}

/* Divider fade-in (not slide) */
[data-divider] {
    opacity: 0;
    transition: opacity 1200ms ease;
}
[data-divider].visible {
    opacity: 1;
}

/* ==============================
   THE MINERAL CABINET
   ============================== */
.cabinet {
    padding: 8vh 0;
}
.section-heading {
    font-family: 'Poiret One', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: var(--umber-black);
    text-align: center;
    margin-bottom: 8vh;
}
.specimen {
    margin-bottom: 8vh;
}
.specimen-panel {
    aspect-ratio: 3 / 2;
    width: 100%;
    position: relative;
    border: 1px solid rgba(26, 14, 4, 0.2);
    overflow: hidden;
    transition: border-color 400ms ease;
}
.specimen-panel:hover {
    border-color: rgba(26, 14, 4, 0.5);
}

/* Marble variants */
.marble-bg--iron {
    background:
        radial-gradient(ellipse at 25% 75%, rgba(139, 69, 19, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 25%, rgba(196, 113, 46, 0.1) 0%, transparent 40%),
        linear-gradient(120deg, rgba(139, 69, 19, 0.06) 0%, transparent 40%, rgba(196, 113, 46, 0.08) 70%, transparent 100%),
        var(--warm-stone);
}
.marble-bg--warm {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(212, 148, 58, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(196, 113, 46, 0.06) 0%, transparent 40%),
        linear-gradient(200deg, rgba(232, 168, 53, 0.05) 0%, transparent 50%),
        var(--bone-cream);
}
.marble-bg--citrine-deep {
    background:
        radial-gradient(ellipse at 60% 40%, rgba(232, 168, 53, 0.1) 0%, transparent 45%),
        radial-gradient(ellipse at 30% 70%, rgba(139, 69, 19, 0.08) 0%, transparent 40%),
        linear-gradient(160deg, rgba(196, 113, 46, 0.07) 0%, transparent 35%, rgba(212, 148, 58, 0.09) 65%, transparent 100%),
        var(--warm-stone);
}

/* Corner facets */
.specimen-facet {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}
.specimen-facet--tl {
    top: 0;
    left: 0;
    background: var(--bone-cream);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.specimen-facet--br {
    bottom: 0;
    right: 0;
    background: var(--bone-cream);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.specimen-caption {
    display: block;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--iron-oxide);
    margin-top: 1rem;
    text-align: center;
}

/* ==============================
   THE DEEP VEIN
   ============================== */
.deep-vein {
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--bone-cream), var(--deep-vein));
    margin: 0 calc(-1 * clamp(1.5rem, 10vw, 3rem));
    padding: 0 clamp(1.5rem, 10vw, 3rem);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15vh;
}
.deep-vein-content {
    max-width: 680px;
    text-align: center;
}
.deep-heading {
    font-family: 'Poiret One', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.15em;
    line-height: 1.2;
    color: var(--bone-cream);
    margin-bottom: 4vh;
}
.deep-colophon {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bone-cream);
    opacity: 0.4;
    margin-top: 4vh;
}

/* ==============================
   REVEAL ANIMATION
   ============================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .column {
        padding: 0 clamp(1rem, 6vw, 2rem);
    }
    .deep-vein {
        margin: 0 calc(-1 * clamp(1rem, 6vw, 2rem));
        padding: 0 clamp(1rem, 6vw, 2rem);
        padding-bottom: 10vh;
    }
}
