/* =======================================================
   LLITTL.ai — Styles
   Colors: #C4621A #A8440F #2D2118 #EDE0C4 #7EC8C8 #E8836A #FAF6EE #F5EDD8
   Fonts: Nunito 800/700, Nunito Sans 400/500/300, Pacifico 400
   ======================================================= */

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

:root {
    --amber-tide: #C4621A;
    --burnt-sienna: #A8440F;
    --charcoal-soft: #2D2118;
    --pattern-cream: #EDE0C4;
    --irid-aqua: #7EC8C8;
    --soft-coral: #E8836A;
    --pale-lumen: #FAF6EE;
    --bubble-cream: #F5EDD8;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bubble-cream);
    color: var(--charcoal-soft);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    cursor: none;
}

/* --- Cursor Companion --- */
#cursor-bubble {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--irid-aqua);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: cursor-color-cycle 3s linear infinite;
    transition: border-color 0.1s ease;
}

@keyframes cursor-color-cycle {
    0%   { border-color: var(--irid-aqua); }
    33%  { border-color: var(--amber-tide); }
    66%  { border-color: var(--soft-coral); }
    100% { border-color: var(--irid-aqua); }
}

/* On quote panel, cursor switches to cream */
body.on-quote-panel #cursor-bubble {
    border-color: var(--bubble-cream);
    animation: none;
}

/* --- Scroll Progress Indicator --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1000;
}

#scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--irid-aqua);
    transition: width 0.1s linear;
}

/* --- Main Horizontal Scroll Container --- */
#scroll-container {
    display: flex;
    flex-direction: row;
    height: 100svh;
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* --- Panels --- */
.panel {
    position: relative;
    height: 100svh;
    flex-shrink: 0;
    overflow: hidden;
}

.panel-entry {
    width: 100vw;
    background: var(--bubble-cream);
}

.panel-features {
    width: 150vw;
    background: var(--pale-lumen);
}

.panel-quote {
    width: 80vw;
    background: var(--amber-tide);
}

.panel-capabilities {
    width: 130vw;
    background: var(--bubble-cream);
}

.panel-closing {
    width: 100vw;
    background: var(--charcoal-soft);
}

/* --- Pattern Borders (Pattern B: hex outline strip) --- */
.pattern-border-top,
.pattern-border-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 16px;
    z-index: 20;
    background: var(--bubble-cream);
}

.panel-features .pattern-border-top,
.panel-features .pattern-border-bottom,
.panel-capabilities .pattern-border-top,
.panel-capabilities .pattern-border-bottom {
    background: var(--pale-lumen);
}

.pattern-border-top {
    top: 0;
}

.pattern-border-bottom {
    bottom: 0;
}

/* --- Panel Divider (Pattern A: diamond lattice) --- */
.panel-divider {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 30;
    background-color: var(--amber-tide);
    background-image:
        repeating-linear-gradient(
            45deg,
            var(--pattern-cream) 0px,
            var(--pattern-cream) 2px,
            transparent 2px,
            transparent 14px
        ),
        repeating-linear-gradient(
            -45deg,
            var(--pattern-cream) 0px,
            var(--pattern-cream) 2px,
            transparent 2px,
            transparent 14px
        );
}

.panel-divider-light {
    background-color: var(--burnt-sienna);
    background-image:
        repeating-linear-gradient(
            45deg,
            var(--bubble-cream) 0px,
            var(--bubble-cream) 2px,
            transparent 2px,
            transparent 14px
        ),
        repeating-linear-gradient(
            -45deg,
            var(--bubble-cream) 0px,
            var(--bubble-cream) 2px,
            transparent 2px,
            transparent 14px
        );
}

/* =======================================================
   PANEL 1: ENTRY
   ======================================================= */

.entry-wordmark {
    position: absolute;
    bottom: 18%;
    left: 8%;
    z-index: 10;
}

.wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 96px;
    letter-spacing: -0.02em;
    color: var(--charcoal-soft);
    line-height: 1;
    margin-bottom: 12px;
}

.tagline {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--burnt-sienna);
    margin-bottom: 8px;
}

.entry-sub {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber-tide);
    opacity: 0.75;
}

/* =======================================================
   PANEL 2: FEATURES
   ======================================================= */

.feature-statement {
    position: absolute;
    z-index: 10;
}

.feature-1 {
    top: 28%;
    left: 10%;
}

.feature-2 {
    top: 52%;
    left: 38%;
}

.feature-3 {
    top: 74%;
    left: 68%;
}

.feature-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: var(--charcoal-soft);
    display: block;
}

.bubble-cluster {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

/* Cluster bubbles start invisible, expand when active */
.bubble-cluster .cluster-bubble {
    position: absolute;
    border-radius: 50%;
    fill: none;
    border: 1.5px solid var(--irid-aqua);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.bubble-cluster.bubbles-active .cluster-bubble {
    transform: scale(1);
    opacity: 1;
}

/* =======================================================
   PANEL 3: QUOTE
   ======================================================= */

.quote-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

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

.pull-quote-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 70%;
    max-width: 480px;
}

.pull-quote {
    font-family: 'Pacifico', cursive;
    font-weight: 400;
    font-size: 42px;
    color: var(--bubble-cream);
    margin-bottom: 20px;
    line-height: 1.1;
}

.pull-quote-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: var(--pattern-cream);
    line-height: 1.7;
}

/* =======================================================
   PANEL 4: CAPABILITIES
   ======================================================= */

.capabilities-headline {
    position: absolute;
    top: 22%;
    left: 6%;
    z-index: 10;
}

.cap-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--burnt-sienna);
}

.capability-cards {
    position: absolute;
    bottom: 16%;
    left: 6%;
    display: flex;
    gap: 32px;
    z-index: 10;
    width: calc(100% - 120px);
}

.capability-card {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 340px;
    padding: 28px 24px 24px;
    background: var(--pale-lumen);
    transform: translateX(-40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.6s ease;
}

.capability-card.card-visible {
    transform: translateX(0);
    opacity: 1;
}

.capability-card:nth-child(1) { transition-delay: 0s; }
.capability-card:nth-child(2) { transition-delay: 0.1s; }
.capability-card:nth-child(3) { transition-delay: 0.2s; }

/* SVG dashed border overlay */
.card-border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.card-border-svg rect {
    width: calc(100% - 3px);
    height: calc(100% - 3px);
}

.card-icon {
    margin-bottom: 16px;
}

.card-header {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--charcoal-soft);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.card-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--charcoal-soft);
    line-height: 1.7;
    opacity: 0.85;
}

/* =======================================================
   PANEL 5: CLOSING
   ======================================================= */

.closing-wordmark {
    position: absolute;
    top: 12%;
    right: 8%;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 48px;
    letter-spacing: -0.02em;
    color: var(--amber-tide);
    z-index: 10;
}

.closing-caption {
    position: absolute;
    bottom: 30%;
    right: 8%;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pattern-cream);
    z-index: 10;
}

.closing-cta {
    position: absolute;
    bottom: 22%;
    right: 8%;
    z-index: 10;
}

.closing-link {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--soft-coral);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 131, 106, 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.closing-link:hover {
    color: var(--bubble-cream);
    border-color: var(--bubble-cream);
}

/* =======================================================
   AMBIENT BUBBLE LAYER
   ======================================================= */

.bubble-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* Bubble SVG circles are injected by JS */
.bubble-layer .ambient-bubble {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--irid-aqua);
    background: transparent;
    pointer-events: none;
}

.bubble-layer-dark .ambient-bubble {
    border-color: rgba(196, 98, 26, 0.6);
}

/* =======================================================
   RESPONSIVE: Mobile Vertical Fallback (≤768px)
   ======================================================= */

@media (max-width: 768px) {
    html, body {
        overflow: hidden;
        height: 100%;
    }

    #scroll-container {
        flex-direction: column;
        height: auto;
        overflow-x: hidden;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .panel {
        width: 100vw !important;
        height: 100svh;
        scroll-snap-align: start;
    }

    /* Rotate panel dividers to horizontal separators */
    .panel-divider {
        position: absolute;
        left: 0;
        bottom: 0;
        top: auto;
        right: auto;
        width: 100%;
        height: 40px;
        background-image:
            repeating-linear-gradient(
                135deg,
                var(--pattern-cream) 0px,
                var(--pattern-cream) 2px,
                transparent 2px,
                transparent 14px
            ),
            repeating-linear-gradient(
                -135deg,
                var(--pattern-cream) 0px,
                var(--pattern-cream) 2px,
                transparent 2px,
                transparent 14px
            );
    }

    .wordmark {
        font-size: 56px;
    }

    .capability-cards {
        flex-direction: column;
        overflow-y: auto;
        bottom: 10%;
        left: 6%;
        width: calc(100% - 48px);
        gap: 16px;
    }

    .capability-card {
        max-width: 100%;
        transform: translateX(0);
        opacity: 1;
    }

    .feature-1 { top: 20%; left: 8%; }
    .feature-2 { top: 44%; left: 8%; }
    .feature-3 { top: 68%; left: 8%; }

    .feature-text { font-size: 28px; }

    .pull-quote { font-size: 32px; }

    #cursor-bubble { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-bubble,
    .cluster-bubble,
    .capability-card,
    #cursor-bubble {
        animation: none !important;
        transition: none !important;
    }
}
