/* persona.quest - Blobitecture Marble Rotunda */
/* Palette: Creamy-Pastel / Marble-Classical */

/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
    --marble-white: #f4efe7;
    --alabaster-cream: #ede5d8;
    --basalt: #2c2926;
    --fossil-gray: #7a736b;
    --oculus-gold: #c4a265;
    --rose-vein: #d4a8a0;
    --smoke-vein: #b8b0a4;
    --porphyry: #6b4a3e;
    --deep-warm: #e6ddd0;
}

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

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

body {
    font-family: 'Libre Caslon Text', serif;
    font-weight: 400;
    color: var(--basalt);
    background-color: var(--marble-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Geological layering: background shifts from top to bottom */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--marble-white) 0%,
        var(--alabaster-cream) 50%,
        var(--deep-warm) 100%
    );
    z-index: -2;
    pointer-events: none;
}

/* =========================================
   COLUMN FLUTING BACKGROUND
   ========================================= */
#column-fluting {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        to right,
        rgba(184, 176, 164, 0.2) 0px,
        rgba(184, 176, 164, 0.2) 0.5px,
        transparent 0.5px,
        transparent 12px
    );
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(
        to right,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0) calc(50% - 420px),
        rgba(0,0,0,0) calc(50% + 420px),
        rgba(0,0,0,1) 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0,0,0,1) 0%,
        rgba(0,0,0,0) calc(50% - 420px),
        rgba(0,0,0,0) calc(50% + 420px),
        rgba(0,0,0,1) 100%
    );
}

/* =========================================
   SVG DEFS (hidden)
   ========================================= */
svg[style*="position:absolute"] {
    pointer-events: none;
}

/* =========================================
   NAVIGATION PILL
   ========================================= */
.nav-pill {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 24px;
    background: var(--alabaster-cream);
    border-radius: 50% 50% 48% 52% / 52% 48% 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.3s ease;
    box-shadow:
        0 2px 8px rgba(44, 41, 38, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    background-image:
        radial-gradient(ellipse at 50% 50%, rgba(212, 168, 160, 0.1) 0%, transparent 70%),
        linear-gradient(35deg, rgba(184, 176, 164, 0.12) 0%, transparent 50%);
}

.nav-pill.visible {
    opacity: 1;
}

.nav-pill:hover {
    transform: translateX(-50%) scale(1.08);
    border-radius: 48% 52% 50% 50% / 50% 50% 52% 48%;
}

.nav-pill-letter {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: var(--oculus-gold);
    text-transform: uppercase;
}

/* =========================================
   HERO SECTION - THE OCULUS
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.oculus {
    position: relative;
    width: 70vmin;
    height: 70vmin;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow:
        0 0 60px rgba(196, 162, 101, 0.08),
        0 0 120px rgba(212, 168, 160, 0.06),
        inset 0 0 80px rgba(244, 239, 231, 0.4);
}

.oculus.revealed {
    opacity: 1;
}

.oculus-marble-surface {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(212, 168, 160, 0.12) 0%, transparent 70%),
        linear-gradient(35deg, rgba(184, 176, 164, 0.15) 0%, transparent 40%),
        linear-gradient(127deg, rgba(184, 176, 164, 0.1) 0%, transparent 50%),
        linear-gradient(78deg, rgba(184, 176, 164, 0.12) 0%, transparent 45%),
        var(--marble-white);
    filter: url(#marble-filter-1);
    animation: marbleRotate 120s linear infinite;
}

@keyframes marbleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Persona bust silhouette */
.bust-silhouette {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vmin;
    height: 60vmin;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Oculus text */
.oculus-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--basalt);
    text-shadow:
        1px 1px 1px rgba(244, 239, 231, 0.8),
        -1px -1px 1px rgba(44, 41, 38, 0.15),
        0 0 3px rgba(184, 176, 164, 0.3);
    opacity: 0;
    transition: opacity 0.8s ease, filter 1.2s ease;
    filter: url(#text-morph);
    line-height: 1;
}

.hero-title.resolved {
    opacity: 1;
    filter: none;
}

.hero-subtitle {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--oculus-gold);
    text-shadow:
        1px 1px 1px rgba(244, 239, 231, 0.8),
        -1px -1px 1px rgba(44, 41, 38, 0.1),
        0 0 3px rgba(184, 176, 164, 0.2);
    opacity: 0;
    transition: opacity 0.8s ease, filter 1.2s ease;
    filter: url(#text-morph);
    line-height: 1;
    margin-top: 0.2em;
}

.hero-subtitle.resolved {
    opacity: 1;
    filter: none;
}

/* Golden connecting line */
.golden-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, var(--oculus-gold), rgba(196, 162, 101, 0.2));
    transition: height 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.golden-line.drawn {
    height: 20vh;
}

/* =========================================
   BLOB SECTIONS
   ========================================= */
.blob-section {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 3vh 20px;
}

.blob-section.blob-wide {
    max-width: 100%;
}

.blob-section.blob-narrow {
    max-width: 100%;
}

.blob-container {
    position: relative;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
    border-radius: 42% 58% 52% 48% / 46% 54% 50% 50%;
    background: var(--alabaster-cream);
    box-shadow:
        0 8px 40px rgba(44, 41, 38, 0.06),
        0 2px 12px rgba(44, 41, 38, 0.04),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transition:
        border-radius 1.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
        filter 0.8s ease,
        opacity 0.8s ease;
    animation: blobBreathe 6s ease-in-out infinite;
    /* Initial state for morph-in */
    opacity: 0;
    transform: scale(0.6);
    filter: blur(4px);
}

.blob-section.blob-wide .blob-container {
    max-width: 780px;
    width: 100%;
}

.blob-section.blob-narrow .blob-container {
    max-width: 540px;
    width: 100%;
}

.blob-container.morphed-in {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
}

/* Marble texture overlay for blob containers */
.marble-bg {
    background-image:
        radial-gradient(ellipse at 50% 50%, rgba(212, 168, 160, 0.12) 0%, transparent 70%),
        linear-gradient(35deg, rgba(184, 176, 164, 0.15) 0%, transparent 40%),
        linear-gradient(127deg, rgba(184, 176, 164, 0.1) 0%, transparent 50%),
        linear-gradient(78deg, rgba(184, 176, 164, 0.12) 0%, transparent 45%);
    background-color: var(--alabaster-cream);
}

/* Negative margin stacked-stones effect */
.blob-section:nth-child(n+3) {
    margin-top: -3vh;
}

/* Hover morph */
.blob-container:hover {
    border-radius: 52% 48% 45% 55% / 54% 46% 52% 48%;
}

/* Blob breathing animation */
@keyframes blobBreathe {
    0%, 100% {
        border-radius: 42% 58% 52% 48% / 46% 54% 50% 50%;
    }
    50% {
        border-radius: 52% 48% 45% 55% / 54% 46% 52% 48%;
    }
}

/* =========================================
   TYPOGRAPHY
   ========================================= */

/* Accent labels */
.accent-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--oculus-gold);
    display: block;
    margin-bottom: 1rem;
}

/* Section headings */
.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--basalt);
    text-shadow:
        1px 1px 1px rgba(244, 239, 231, 0.8),
        -1px -1px 1px rgba(44, 41, 38, 0.15),
        0 0 3px rgba(184, 176, 164, 0.3);
    margin-bottom: 1.2rem;
    line-height: 1.15;
}

/* Body text */
.body-text {
    font-family: 'Libre Caslon Text', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    color: var(--basalt);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    margin-bottom: 1rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* =========================================
   ACANTHUS DIVIDERS
   ========================================= */
.acanthus-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2vh 0;
    position: relative;
    z-index: 1;
}

.acanthus-svg {
    width: 40%;
    max-width: 320px;
    height: auto;
    opacity: 0.7;
}

/* =========================================
   GOLD VEIN CONTAINER
   ========================================= */
.gold-vein-container {
    display: flex;
    justify-content: center;
    padding: 0;
    position: relative;
    height: 200px;
    overflow: visible;
}

.gold-vein {
    width: 200px;
    height: 300px;
    overflow: visible;
}

.gold-vein-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease;
}

.gold-vein-path.drawn {
    stroke-dashoffset: 0;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8vh 20px 6vh;
    margin-top: 4vh;
}

.laurel-wreath {
    position: relative;
    width: 200px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.laurel-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.footer-domain {
    position: relative;
    z-index: 1;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.4rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--basalt);
    text-shadow:
        1px 1px 1px rgba(244, 239, 231, 0.8),
        -1px -1px 1px rgba(44, 41, 38, 0.15),
        0 0 3px rgba(184, 176, 164, 0.3);
}

.footer-inscription {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fossil-gray);
    margin-top: 1.5rem;
}

/* =========================================
   SCROLL-LINKED OCULUS ZOOM
   (Handled via JS transforms, but base state)
   ========================================= */
.hero-section {
    will-change: transform;
}

.oculus {
    will-change: transform, opacity;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .blob-container {
        padding: 2rem 1.5rem;
    }

    .acanthus-svg {
        width: 60%;
    }

    #column-fluting {
        mask-image: linear-gradient(
            to right,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,0) 5%,
            rgba(0,0,0,0) 95%,
            rgba(0,0,0,1) 100%
        );
        -webkit-mask-image: linear-gradient(
            to right,
            rgba(0,0,0,1) 0%,
            rgba(0,0,0,0) 5%,
            rgba(0,0,0,0) 95%,
            rgba(0,0,0,1) 100%
        );
    }
}

@media (max-width: 480px) {
    .oculus {
        width: 85vmin;
        height: 85vmin;
    }

    .blob-container {
        border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%;
        padding: 1.8rem 1.2rem;
    }

    @keyframes blobBreathe {
        0%, 100% {
            border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%;
        }
        50% {
            border-radius: 60% 40% 35% 65% / 45% 55% 45% 55%;
        }
    }

    .gold-vein-container {
        height: 120px;
    }
}
