/* ======================================
   bada.news — Fairycore Neon-Electric
   ====================================== */

/* ---- CSS Custom Properties ---- */
:root {
    --deep-void: #0d0221;
    --enchanted-dark: #1a0a2e;
    --neon-magenta: #ff2d95;
    --neon-cyan: #00f5d4;
    --neon-violet: #b537f2;
    --marble-vein: #f0c9cf;
    --petal-white: #f0e6f6;
    --spore-gold: #ffd700;
    --fairy-gradient: linear-gradient(135deg, #ff2d95 0%, #b537f2 45%, #00f5d4 100%);
    --marble-base: radial-gradient(ellipse at 30% 50%, #1a0a2e 0%, #0d0221 70%);
    --glow-spread: radial-gradient(circle, rgba(255,45,149,0.15) 0%, transparent 70%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-void);
    color: var(--petal-white);
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* ---- Marble Background ---- */
.marble-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: var(--marble-base);
}

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

.marble-filters {
    position: absolute;
    width: 0;
    height: 0;
}

/* ---- Central Vine ---- */
.central-vine {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

.vine-path {
    stroke-dasharray: 8000;
    stroke-dashoffset: 8000;
    transition: stroke-dashoffset 0.1s linear;
}

/* ---- Margin Gardens ---- */
.margin-garden {
    position: fixed;
    top: 0;
    width: 120px;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 10vh 0;
}

.margin-garden--left {
    left: 2vw;
}

.margin-garden--right {
    right: 2vw;
}

.botanical-svg {
    width: 60px;
    height: auto;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

.botanical-svg.proximity-active {
    opacity: 1 !important;
    filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.4));
}

.fern { height: 120px; }
.rose { width: 40px; height: 40px; }
.mushroom { width: 50px; height: 50px; }
.ivy { width: 40px; height: 180px; }

.rose--1, .rose--2 {
    animation: rose-rotate 20s linear infinite;
}

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

/* ---- Sections Common ---- */
.section {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 8vh, 6rem) 1rem;
}

/* ---- Glow Orbs ---- */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.glow-orb--hero {
    width: 500px;
    height: 500px;
    background: var(--glow-spread);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fairy-breathe-orb 4s ease-in-out infinite;
}

.glow-orb--understory {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(181,55,242,0.1) 0%, transparent 70%);
    top: 30%;
    right: -100px;
}

.glow-orb--roots {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0,245,212,0.1) 0%, transparent 70%);
    bottom: 20%;
    left: -80px;
}

@keyframes fairy-breathe-orb {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ---- Reveal Mask System ---- */
.reveal-mask {
    overflow: hidden;
    display: inline-block;
}

.logotype-container .reveal-mask {
    display: inline-block;
}

/* ---- Section Dividers ---- */
.section-divider {
    margin-top: auto;
    padding-top: 3rem;
}

.divider-svg {
    width: 200px;
    height: 40px;
    opacity: 0.7;
}

/* ---- ACT 1: CANOPY (Hero) ---- */
.section--canopy {
    justify-content: center;
    padding-bottom: 4rem;
}

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

.logotype-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
}

.logotype-letter {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: var(--neon-magenta);
    display: inline-block;
    transform: translateX(-110%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fairy-breathe 4s ease-in-out infinite;
    font-feature-settings: 'liga' 1, 'onum' 1;
}

.logotype-letter[data-direction="right"] {
    transform: translateX(110%);
}

.logotype-letter[data-direction="bottom"] {
    transform: translateY(110%);
}

.logotype-letter.revealed {
    transform: translateX(0) translateY(0);
}

.logotype-dot {
    margin: 0 0.05em;
}

@keyframes fairy-breathe {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255,45,149,0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(255,45,149,0.6)) drop-shadow(0 0 40px rgba(181,55,242,0.2)); }
}

.tagline {
    font-family: 'Crimson Pro', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--marble-vein);
    margin-top: 1.5rem;
    letter-spacing: 0.08em;
    opacity: 0.8;
    transform: translateY(100%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

.tagline.revealed {
    transform: translateY(0);
}

/* Moth */
.moth-svg {
    position: absolute;
    width: 60px;
    height: 40px;
    z-index: 3;
    opacity: 0;
    animation: moth-flight 12s ease-in-out 2s forwards;
}

@keyframes moth-flight {
    0% { top: 60%; left: -10%; opacity: 0; transform: rotate(-10deg) scale(0.8); }
    10% { opacity: 0.7; }
    25% { top: 30%; left: 25%; transform: rotate(5deg) scale(1); }
    50% { top: 45%; left: 55%; transform: rotate(-8deg) scale(0.9); }
    75% { top: 25%; left: 80%; transform: rotate(3deg) scale(1.1); }
    90% { opacity: 0.7; }
    100% { top: 15%; left: 110%; opacity: 0; transform: rotate(-5deg) scale(0.7); }
}

/* ---- Section Headers ---- */
.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 5vh, 4rem);
    z-index: 2;
    position: relative;
}

.section-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: var(--neon-magenta);
    font-feature-settings: 'liga' 1, 'onum' 1;
    animation: fairy-breathe 4s ease-in-out infinite;
}

.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    display: inline-block;
    margin-top: 0.75rem;
}

/* ---- Slide Reveal States ---- */
.slide-reveal {
    display: inline-block;
}

.slide-reveal[data-direction="left"] {
    transform: translateX(-110%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-reveal[data-direction="right"] {
    transform: translateX(110%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-reveal[data-direction="bottom"] {
    transform: translateY(110%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-reveal[data-direction="diagonal"] {
    transform: translate(-80%, 80%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-reveal.revealed {
    transform: translate(0, 0);
}

/* ---- ACT 2: UNDERSTORY (Content Cards) ---- */
.section--understory {
    padding-top: 2rem;
}

.card-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 4vh, 3.5rem);
    max-width: 680px;
    width: 100%;
    z-index: 2;
    position: relative;
}

.content-card {
    position: relative;
    width: 100%;
    border: 1px solid transparent;
    border-image: linear-gradient(135deg, #ff2d95, #b537f2, #00f5d4) 1;
    background: rgba(26, 10, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.5s ease, transform 0.5s ease;
}

.content-card:hover {
    box-shadow: 0 0 15px rgba(255,45,149,0.3), 0 0 30px rgba(0,245,212,0.15);
}

.card--rotate-pos { transform: rotate(0.5deg); }
.card--rotate-neg { transform: rotate(-0.5deg); }
.card--rotate-pos-sm { transform: rotate(0.3deg); }
.card--rotate-neg-sm { transform: rotate(-0.3deg); }

.card-fern {
    position: absolute;
    top: -10px;
    left: -5px;
    width: 40px;
    height: 60px;
    z-index: 3;
}

.card-fern .fern-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease;
}

.content-card.fern-visible .card-fern .fern-path {
    stroke-dashoffset: 0;
}

.card-inner {
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.card-meta {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--neon-magenta);
    margin-bottom: 1rem;
    font-feature-settings: 'liga' 1, 'onum' 1;
}

.card-body {
    color: var(--petal-white);
    line-height: 1.72;
    opacity: 0.9;
}

.card-dewdrops {
    display: flex;
    gap: 8px;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.dewdrop {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(0,245,212,0.3));
    animation: dewdrop-pulse 3s ease-in-out infinite;
}

.dewdrop:nth-child(2) { animation-delay: 0.5s; }
.dewdrop:nth-child(3) { animation-delay: 1s; }

@keyframes dewdrop-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ---- ACT 3: ROOT NETWORK ---- */
.section--roots {
    padding-top: 2rem;
}

.root-network {
    position: relative;
    width: 100%;
    max-width: 680px;
    z-index: 2;
}

.root-svg {
    width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
    margin-bottom: 2rem;
}

.root-branch {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.2s ease;
}

.root-svg.branches-visible .root-branch {
    stroke-dashoffset: 0;
}

.root-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
}

.root-link {
    display: block;
    padding: 1.2rem 1.5rem;
    text-decoration: none;
    border: 1px solid rgba(181, 55, 242, 0.3);
    background: rgba(13, 2, 33, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.root-link:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0,245,212,0.25);
    background: rgba(26, 10, 46, 0.7);
}

.root-link-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    display: block;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.root-link:hover .root-link-label {
    color: var(--spore-gold);
}

.root-link-desc {
    font-family: 'Crimson Pro', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--marble-vein);
    opacity: 0.7;
    display: block;
}

/* ---- ACT 4: SPORE CLOUD (Footer) ---- */
.section--spores {
    min-height: 80vh;
    justify-content: center;
}

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

.spore-text {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    color: var(--marble-vein);
    line-height: 1.6;
    font-feature-settings: 'liga' 1, 'onum' 1;
}

.spore-text--1 { opacity: 0.9; }
.spore-text--2 { opacity: 0.7; transform: translateY(5px); }
.spore-text--3 { opacity: 0.5; transform: translateY(10px); margin-top: 0.5rem; }

.spore-text--2.dissolved { opacity: 0.4; }
.spore-text--3.dissolved { opacity: 0.25; transform: translateY(20px); }

.spore-whisper {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--neon-violet);
    margin-top: 2rem;
    opacity: 0.4;
    letter-spacing: 0.1em;
    display: block;
}

.spore-particles {
    position: relative;
    width: 300px;
    height: 100px;
    margin: 3rem auto 0;
}

.spore-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--neon-violet);
    opacity: 0;
    animation: spore-float 6s ease-in-out infinite;
}

.spore-dot--1 { left: 20%; top: 50%; animation-delay: 0s; background: var(--neon-magenta); }
.spore-dot--2 { left: 40%; top: 30%; animation-delay: 0.8s; background: var(--neon-cyan); }
.spore-dot--3 { left: 60%; top: 60%; animation-delay: 1.5s; }
.spore-dot--4 { left: 80%; top: 40%; animation-delay: 2.2s; background: var(--marble-vein); }
.spore-dot--5 { left: 30%; top: 70%; animation-delay: 3s; background: var(--neon-magenta); }
.spore-dot--6 { left: 55%; top: 20%; animation-delay: 3.8s; background: var(--spore-gold); }
.spore-dot--7 { left: 75%; top: 55%; animation-delay: 4.5s; background: var(--neon-cyan); }

@keyframes spore-float {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    20% { opacity: 0.6; }
    50% { opacity: 0.8; transform: translateY(-20px) scale(1.2); }
    80% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-40px) scale(0.5); }
}

/* Final Dewdrop */
.final-dewdrop {
    margin-top: 3rem;
    text-align: center;
}

.dewdrop--final {
    width: 10px;
    height: 10px;
    animation: final-pulse 4s ease-in-out infinite;
}

@keyframes final-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); box-shadow: none; }
    25% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 15px rgba(0,245,212,0.5); }
    35% { opacity: 0.5; transform: scale(1); }
    55% { opacity: 1; transform: scale(1.5); box-shadow: 0 0 15px rgba(0,245,212,0.5); }
    65% { opacity: 0.3; transform: scale(1); }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
    .margin-garden {
        width: 30px;
        opacity: 0.3;
    }

    .margin-garden--left { left: 0; }
    .margin-garden--right { right: 0; }

    .botanical-svg {
        width: 25px;
    }

    .card-stack {
        max-width: 92vw;
    }

    .card--rotate-pos { transform: rotate(0.2deg); }
    .card--rotate-neg { transform: rotate(-0.2deg); }
    .card--rotate-pos-sm { transform: rotate(0.1deg); }
    .card--rotate-neg-sm { transform: rotate(-0.1deg); }

    .root-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .root-svg {
        max-height: 200px;
    }

    .logotype-letter {
        font-size: clamp(3rem, 10vw, 5rem);
    }
}

@media (max-width: 480px) {
    .margin-garden {
        display: none;
    }

    .section {
        padding: 2rem 0.75rem;
    }

    .card-inner {
        padding: 1.2rem;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .logotype-letter,
    .section-title {
        animation: none;
        filter: drop-shadow(0 0 8px rgba(255,45,149,0.3));
    }

    .moth-svg { animation: none; display: none; }
    .rose--1, .rose--2 { animation: none; }
    .dewdrop { animation: none; opacity: 0.7; }
    .spore-dot { animation: none; }
    .dewdrop--final { animation: none; opacity: 0.5; }
    .glow-orb--hero { animation: none; }
    .vine-path { stroke-dashoffset: 0 !important; }

    .slide-reveal,
    .logotype-letter,
    .tagline {
        transform: none !important;
        transition: opacity 0.3s ease !important;
    }
}
