/* aiice.io - Neomorphism Soft UI - Living Organism Aesthetic */
/* Palette: #f0e6ef, #f7edf6, #ffffff, #d4c2d3, #a855f7, #fb923c, #3b1f3b */

:root {
    --surface: #f0e6ef;
    --raised: #f7edf6;
    --highlight: rgba(255, 255, 255, 0.7);
    --shadow: #d4c2d3;
    --purple: #a855f7;
    --orange: #fb923c;
    --text: #3b1f3b;
    --pulse: rgba(168, 85, 247, 0.2);
    --shadow-neo: 8px 8px 16px #d4c2d3, -8px -8px 16px rgba(255, 255, 255, 0.7);
    --shadow-neo-lg: 12px 12px 24px #d4c2d3, -12px -12px 24px rgba(255, 255, 255, 0.7);
    --shadow-neo-inset: inset 4px 4px 8px #d4c2d3, inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--surface);
    color: var(--text);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ================================= */
/* Grain Texture Overlay             */
/* ================================= */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ================================= */
/* Sections                          */
/* ================================= */
.neo-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    gap: 2.5rem;
    overflow: hidden;
}

.inhale {
    padding: 8rem 6rem;
}

.exhale {
    padding: 5rem 2rem;
}

/* ================================= */
/* Section Labels                    */
/* ================================= */
.section-label {
    margin-bottom: 1rem;
}

.label-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    font-variant: small-caps;
    letter-spacing: 0.15em;
    color: var(--purple);
    background: var(--raised);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-neo);
    display: inline-block;
}

/* ================================= */
/* Morphing Blobs                    */
/* ================================= */
.morph-blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    will-change: border-radius;
}

.blob-hero {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--raised), var(--surface));
    box-shadow: var(--shadow-neo-lg);
    z-index: 0;
    animation: morph 10s ease-in-out infinite, blob-activate 2s ease-out forwards;
    opacity: 0.9;
}

@keyframes blob-activate {
    0% {
        background: linear-gradient(135deg, var(--raised), var(--surface));
    }
    100% {
        background: linear-gradient(135deg, var(--raised), rgba(168, 85, 247, 0.08));
    }
}

.blob-bg {
    width: 180px;
    height: 180px;
    background: var(--pulse);
    opacity: 0.35;
    z-index: 0;
}

/* Discovery blobs - polyrhythmic */
.blob-discovery-1 {
    left: 5%;
    top: 15%;
    width: 220px;
    height: 220px;
    animation: morph 8s ease-in-out infinite;
}

.blob-discovery-2 {
    right: 8%;
    top: 40%;
    width: 160px;
    height: 160px;
    animation: morph 12s ease-in-out infinite reverse;
}

.blob-discovery-3 {
    left: 40%;
    bottom: 10%;
    width: 140px;
    height: 140px;
    animation: morph 15s ease-in-out infinite;
    background: rgba(251, 146, 60, 0.15);
}

/* Interaction blobs */
.blob-interaction-1 {
    right: 5%;
    top: 20%;
    width: 200px;
    height: 200px;
    animation: morph 9s ease-in-out infinite;
}

.blob-interaction-2 {
    left: 10%;
    bottom: 15%;
    width: 170px;
    height: 170px;
    animation: morph 11s ease-in-out infinite reverse;
    background: rgba(251, 146, 60, 0.12);
}

/* Symbiosis blobs - synchronized */
.blob-symbiosis-1 {
    left: 10%;
    top: 25%;
    width: 200px;
    height: 200px;
    animation: morph-sync 6s ease-in-out infinite;
}

.blob-symbiosis-2 {
    right: 10%;
    top: 35%;
    width: 180px;
    height: 180px;
    animation: morph-sync 6s ease-in-out infinite;
}

.blob-symbiosis-3 {
    left: 45%;
    bottom: 15%;
    width: 150px;
    height: 150px;
    animation: morph-sync 6s ease-in-out infinite;
    background: rgba(251, 146, 60, 0.12);
}

@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 38% 62% / 62% 52% 48% 38%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    75% {
        border-radius: 42% 58% 62% 38% / 38% 48% 52% 62%;
    }
}

@keyframes morph-sync {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

/* ================================= */
/* Pulse Rings                       */
/* ================================= */
.pulse-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--purple);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation: pulseExpand 5s ease-out infinite;
}

.ring-1 { animation-delay: 0s; }
.ring-2 { animation-delay: 1.7s; }
.ring-3 { animation-delay: 3.4s; }

@keyframes pulseExpand {
    0% {
        width: 60px;
        height: 60px;
        opacity: 0.5;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* ================================= */
/* Gradient Orbs (bioluminescence)   */
/* ================================= */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pulse), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.orb-hero {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

.orb-discovery-1 {
    width: 400px;
    height: 400px;
    left: -5%;
    top: 10%;
    opacity: 0.2;
}

.orb-discovery-2 {
    width: 350px;
    height: 350px;
    right: -5%;
    bottom: 10%;
    opacity: 0.15;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.15), transparent 70%);
}

.orb-interaction {
    width: 500px;
    height: 500px;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

.orb-symbiosis {
    width: 600px;
    height: 600px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.25;
}

/* ================================= */
/* Hero Section                      */
/* ================================= */
.section-hero {
    min-height: 100vh;
    background: var(--surface);
}

.hero-pod {
    position: relative;
    z-index: 2;
    text-align: center;
    background: var(--raised);
    border-radius: 32px;
    padding: 3.5rem 5rem;
    box-shadow: var(--shadow-neo-lg);
    animation: hero-emerge 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: scale(0.85) translateY(20px);
}

@keyframes hero-emerge {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.brand-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 6rem);
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-sub {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    color: var(--purple);
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 30px;
    height: 50px;
    border-radius: 15px;
    background: var(--raised);
    box-shadow: var(--shadow-neo);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(20px);
        opacity: 0.3;
    }
}

/* ================================= */
/* Wave Dividers                     */
/* ================================= */
.wave-divider {
    position: relative;
    z-index: 1;
    margin-top: -2px;
    margin-bottom: -2px;
    line-height: 0;
}

.wave-divider svg {
    width: 100%;
    height: 80px;
    display: block;
}

.wave-flip {
    transform: scaleY(-1);
}

/* ================================= */
/* Connection Lines (SVG)            */
/* ================================= */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.connection-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.connection-path.drawn {
    stroke-dashoffset: 0;
}

/* ================================= */
/* Content Pods                      */
/* ================================= */
.pods-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    align-items: flex-start;
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.content-pod {
    position: relative;
    background: var(--raised);
    border-radius: 24px;
    padding: 2.2rem 2.5rem;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-neo);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.content-pod.visible {
    opacity: 1;
    transform: scale(1);
}

.content-pod.pressed {
    box-shadow: var(--shadow-neo-inset);
    transform: scale(0.97);
}

.wide-pod {
    max-width: 520px;
}

/* Breathing dot */
.breath-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--purple);
    margin-bottom: 1rem;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Synchronized breathing for symbiosis section */
.sync-breath {
    animation: breathe-sync 4s ease-in-out infinite;
}

@keyframes breathe-sync {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.pod-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.pod-body {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(59, 31, 59, 0.65);
}

/* Pod pop animation (scale 0.8 -> 1.05 -> 1.0) */
.pod-pop.visible {
    animation: pod-pop-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pod-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    70% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tilt effect placeholder - actual tilt via JS */
.pod-tilt {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
}

.pod-tilt:hover {
    box-shadow: 10px 10px 20px #d4c2d3, -10px -10px 20px rgba(255, 255, 255, 0.8);
}

/* ================================= */
/* Final Pod (Symbiosis)             */
/* ================================= */
.final-pod {
    position: relative;
    z-index: 1;
    background: var(--raised);
    border-radius: 32px;
    padding: 3.5rem 3rem;
    max-width: 520px;
    text-align: center;
    box-shadow: var(--shadow-neo-lg);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.final-pod.visible {
    opacity: 1;
    transform: scale(1);
}

.glow-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 40px var(--pulse), 0 0 80px rgba(168, 85, 247, 0.1);
    margin: 0 auto 1.5rem;
    animation: glow-breathe 4s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 40px var(--pulse), 0 0 80px rgba(168, 85, 247, 0.1);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(168, 85, 247, 0.35), 0 0 120px rgba(168, 85, 247, 0.15);
    }
}

.final-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(59, 31, 59, 0.7);
}

.final-signature {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sig-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: breathe 4s ease-in-out infinite;
}

.sig-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ================================= */
/* Floating Navigation               */
/* ================================= */
.floating-nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--raised);
    border-radius: 50px;
    padding: 0.6rem 1rem;
    box-shadow: var(--shadow-neo-lg);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.4rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.3s ease, box-shadow 0.3s ease, gap 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.nav-item:hover,
.nav-item.active {
    background: var(--surface);
    box-shadow: var(--shadow-neo-inset);
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--shadow);
    flex-shrink: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-item.active .nav-dot {
    background: var(--purple);
    transform: scale(1.1);
}

.nav-item:hover .nav-dot {
    background: var(--orange);
}

.nav-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    font-variant: small-caps;
    letter-spacing: 0.05em;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.nav-item:hover .nav-label,
.nav-item.active .nav-label {
    max-width: 100px;
    opacity: 1;
}

/* ================================= */
/* Fade In utility                   */
/* ================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================= */
/* Responsive                        */
/* ================================= */
@media (max-width: 768px) {
    .blob-hero {
        width: 280px;
        height: 280px;
    }

    .hero-pod {
        padding: 2.5rem 2rem;
    }

    .inhale {
        padding: 5rem 1.5rem;
    }

    .exhale {
        padding: 4rem 1.5rem;
    }

    .neo-section {
        padding: 5rem 1.5rem;
    }

    .blob-bg {
        display: none;
    }

    .gradient-orb {
        opacity: 0.1;
    }

    .pods-container {
        flex-direction: column;
        align-items: center;
    }

    .content-pod {
        max-width: 100%;
    }

    .wide-pod {
        max-width: 100%;
    }

    .floating-nav {
        bottom: 1rem;
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
    }

    .wave-divider svg {
        height: 50px;
    }

    .final-pod {
        padding: 2.5rem 1.5rem;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 3rem;
    }

    .hero-pod {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .content-pod {
        padding: 1.5rem;
        border-radius: 20px;
    }
}
