/* ============================================
   namu.farm - Holographic Agrarian Descent
   ============================================ */
:root {
    --terracotta: #C4704E;
    --deep-clay: #8B4A32;
    --celadon-mist: #9EBAA8;
    --abyssal-indigo: #1E2A3A;
    --holo-gold: #D4A96A;
    --iridescent-rose: #C78B8B;
    --foam-white: #F0EDE6;
    --spectral-teal: #5BA8A0;
    --jade: #4A7C6F;
    --depth: 0;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--terracotta);
    color: var(--foam-white);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    overflow-x: hidden;
    transition: background-color 0.1s linear;
}

/* ==============================
   NOISE OVERLAY
   ============================== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    mix-blend-mode: overlay;
}

/* ==============================
   DEPTH INDICATOR
   ============================== */
.depth-indicator {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 50;
}
.depth-bubble {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background: conic-gradient(from 0deg, var(--holo-gold), var(--iridescent-rose), var(--spectral-teal), var(--celadon-mist), var(--holo-gold)) 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;
    animation: depthPulse 3s ease-in-out infinite, holoSpin 12s linear infinite;
}
@keyframes depthPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
@keyframes holoSpin {
    to { background: conic-gradient(from 360deg, var(--holo-gold), var(--iridescent-rose), var(--spectral-teal), var(--celadon-mist), var(--holo-gold)) border-box; }
}

/* ==============================
   BUBBLE FIELD
   ============================== */
.bubble-field {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border: 1.5px solid;
    border-image: conic-gradient(from var(--holo-angle, 0deg), var(--holo-gold), var(--iridescent-rose), var(--spectral-teal), var(--celadon-mist), var(--holo-gold)) 1;
    box-shadow: inset 0 0 10px rgba(240, 237, 230, 0.03);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    animation: bubbleRise var(--rise-duration, 60s) linear infinite, holoRotate 12s linear infinite;
    animation-delay: var(--rise-delay, 0s);
}
.bubble:hover {
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(91, 168, 160, 0.4);
}
@keyframes bubbleRise {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(var(--drift-x, 30px)); opacity: 0; }
}
@keyframes holoRotate {
    to { --holo-angle: 360deg; }
}

/* ==============================
   TERRACES
   ============================== */
.terrace {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 3;
}

.terrace--surface {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.surface-content {
    position: relative;
    z-index: 5;
    text-align: center;
}
.hero-title {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: 8vw;
    letter-spacing: 0.15em;
    color: var(--holo-gold);
    line-height: 1;
    margin-bottom: 2rem;
}
.hero-tagline {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--foam-white);
    opacity: 0.8;
    max-width: 480px;
    margin: 0 auto;
}

.terrace--first {
    min-height: 100vh;
    position: relative;
}
.terrace--mid {
    min-height: 150vh;
    position: relative;
}
.terrace--deep {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ==============================
   TEXT FLOATS
   ============================== */
.text-float {
    position: absolute;
    max-width: 420px;
    padding: 2rem;
    background: rgba(139, 74, 50, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.text-float.visible {
    opacity: 1;
    transform: translateY(0);
}
.text-float--center {
    position: absolute;
    max-width: 540px;
}

.body-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--foam-white);
}
.caption-text {
    font-size: 0.875rem;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.8;
}

.section-heading {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: 4vw;
    letter-spacing: 0.15em;
    color: var(--holo-gold);
    margin-bottom: 2rem;
}

/* ==============================
   BOTANICALS
   ============================== */
.botanical {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}
.botanical--tree {
    width: 30vw;
    max-width: 300px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 80vh;
}
.botanical--leaf {
    position: absolute;
    width: 15vw;
    max-width: 150px;
}
.botanical--roots {
    position: absolute;
    bottom: 0;
    width: 80vw;
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
}

/* Deco Arch */
.deco-arch {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 50vw;
    max-width: 400px;
    z-index: 1;
    pointer-events: none;
}

/* ==============================
   HOLOGRAPHIC DIVIDERS
   ============================== */
.holo-divider {
    width: 100%;
    height: 1px;
    background: conic-gradient(from 0deg, var(--holo-gold), var(--iridescent-rose), var(--spectral-teal), var(--celadon-mist), var(--holo-gold));
    background-size: 200% 100%;
    animation: holoShift 8s linear infinite;
    position: relative;
    z-index: 5;
}
@keyframes holoShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ==============================
   DEEP FLOOR
   ============================== */
.deep-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 0 clamp(1rem, 5vw, 3rem);
}
.deep-heading {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.15em;
    color: var(--holo-gold);
    line-height: 1.2;
}

.final-bubble {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: conic-gradient(from 0deg, var(--holo-gold), var(--iridescent-rose), var(--spectral-teal), var(--celadon-mist), var(--holo-gold)) 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;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4rem;
    position: relative;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.final-bubble:hover {
    transform: scale(1.6);
}
.final-bubble-text {
    font-family: 'Poiret One', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--holo-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.final-bubble:hover .final-bubble-text {
    opacity: 1;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .text-float {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none;
        margin: 2rem clamp(1rem, 5vw, 2rem);
        max-width: 100%;
    }
    .text-float.visible {
        transform: none;
    }
    .text-float--center {
        position: relative;
        transform: none !important;
    }
    .hero-title {
        font-size: 12vw;
    }
    .section-heading {
        font-size: 7vw;
    }
    .terrace--mid {
        min-height: 120vh;
    }
}
