/* ==============================================
   AIICE.IO — Memphis Design + Earth Tones
   Dreamy-Ethereal AI Intelligence Platform
   ============================================== */

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

:root {
    --warm-linen: #f5efe6;
    --pale-sand: #e8dfd4;
    --clay-blush: #d4a574;
    --dark-umber: #2d2013;
    --burnt-sienna: #b85c38;
    --sage-moss: #7a8b6f;
    --ochre-gold: #d4a03c;
    --dusty-rose: #c97b7b;
    --espresso: #3d2b1f;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    color: var(--dark-umber);
    background: var(--warm-linen);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    color: var(--dark-umber);
}

h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
}

p {
    max-width: 38em;
    margin-bottom: 1em;
}

.label {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--burnt-sienna);
    display: block;
    margin-bottom: 1rem;
}

.label-light {
    color: var(--ochre-gold);
}

.text-light {
    color: var(--warm-linen);
}

.text-muted {
    color: var(--pale-sand);
    opacity: 0.85;
}

/* ---------- Navigation ---------- */
.nav-pill {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.65rem 2rem;
    border-radius: 999px;
    background: rgba(245, 239, 230, 0.85);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 2px 20px rgba(45, 32, 19, 0.08);
    transition: box-shadow 0.3s ease;
}

.nav-pill:hover {
    box-shadow: 0 4px 30px rgba(45, 32, 19, 0.12);
}

.nav-wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--burnt-sienna);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark-umber);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--burnt-sienna);
}

/* ---------- Sections Base ---------- */
.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ---------- Zigzag Dividers ---------- */
.zigzag-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 24px;
    z-index: 2;
}

.zigzag-sand {
    background: linear-gradient(135deg, var(--pale-sand) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(225deg, var(--pale-sand) 33.33%, transparent 33.33%) 0 0;
    background-size: 24px 24px;
    background-position: 0 0;
    background-repeat: repeat-x;
}

.zigzag-espresso {
    background: linear-gradient(135deg, var(--espresso) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(225deg, var(--espresso) 33.33%, transparent 33.33%) 0 0;
    background-size: 24px 24px;
    background-position: 0 0;
    background-repeat: repeat-x;
}

.zigzag-linen {
    background: linear-gradient(135deg, var(--warm-linen) 33.33%, transparent 33.33%) 0 0,
                linear-gradient(225deg, var(--warm-linen) 33.33%, transparent 33.33%) 0 0;
    background-size: 24px 24px;
    background-position: 0 0;
    background-repeat: repeat-x;
}

/* ---------- Section 1: Opening ---------- */
.section-opening {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, var(--pale-sand) 0%, var(--warm-linen) 60%);
    border-bottom: 6px solid var(--clay-blush);
}

.opening-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.opening-wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 12vw, 8rem);
    color: var(--burnt-sienna);
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.opening-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    color: var(--dark-umber);
    opacity: 0.7;
    max-width: none;
}

/* ---------- Section 2: About ---------- */
.section-about {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--pale-sand);
    border-bottom: 6px solid var(--burnt-sienna);
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--dark-umber);
    opacity: 0.85;
}

.about-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration {
    width: 100%;
    max-width: 380px;
    height: auto;
}

/* ---------- Section 3: Process (Dark) ---------- */
.section-process {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--espresso);
    border-bottom: 6px solid var(--ochre-gold);
    padding: 100px 0;
}

.process-header {
    margin-bottom: 4rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.process-step {
    position: relative;
    padding: 2rem;
    border-radius: 12px;
    background: rgba(245, 239, 230, 0.05);
    border: 1px solid rgba(245, 239, 230, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.process-step:hover {
    background: rgba(245, 239, 230, 0.08);
    border-color: rgba(245, 239, 230, 0.2);
}

.step-number {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    color: var(--ochre-gold);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.process-step h3 {
    color: var(--warm-linen);
    margin-bottom: 0.75rem;
}

.process-step p {
    font-size: 1rem;
    line-height: 1.7;
}

/* ---------- Section 4: Living System ---------- */
.section-living {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--warm-linen);
    border-bottom: 6px solid var(--sage-moss);
    padding: 80px 0;
}

.living-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.living-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.living-text h2 {
    color: var(--burnt-sienna);
    margin-bottom: 1.5rem;
}

.living-text p {
    color: var(--dark-umber);
    opacity: 0.85;
}

/* ---------- Section 5: Closing ---------- */
.section-closing {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clay-blush);
    border-bottom: 6px solid var(--espresso);
    padding: 80px 0;
    text-align: center;
}

.closing-content {
    position: relative;
    z-index: 1;
}

.closing-content h2 {
    color: var(--espresso);
    margin-bottom: 1.5rem;
}

.closing-message {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--dark-umber);
    opacity: 0.8;
    max-width: 32em;
    margin: 0 auto 2.5rem auto;
}

.cta-button {
    display: inline-block;
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--warm-linen);
    background: var(--espresso);
    padding: 1rem 2.5rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(61, 43, 31, 0.3);
}

.cta-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(212, 160, 60, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-ripple.active {
    animation: rippleEffect 0.6s ease-out forwards;
}

@keyframes rippleEffect {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 300px; height: 300px; opacity: 0; }
}

/* ---------- Memphis Totem ---------- */
.memphis-totem {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 0;
}

.totem-left {
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
}

.totem-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dusty-rose);
    opacity: 0.4;
}

.totem-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 34px solid var(--sage-moss);
    opacity: 0.35;
}

.totem-rect {
    width: 30px;
    height: 50px;
    background: var(--ochre-gold);
    opacity: 0.3;
    border-radius: 3px;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--espresso);
    padding: 2.5rem 48px;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-wordmark {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--burnt-sienna);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--pale-sand);
    opacity: 0.6;
    max-width: none;
}

/* ---------- Memphis Decorative Shapes ---------- */
.memphis-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.shape-circle {
    border-radius: 50%;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: var(--dusty-rose);
    opacity: 0.1;
    top: 15%;
    right: 10%;
    transform: scale(0.6);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}

.shape-2 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid var(--sage-moss);
    opacity: 0.08;
    bottom: 20%;
    left: 8%;
    transform: scale(0.6) rotate(-10deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}

.shape-3 {
    width: 200px;
    top: 30%;
    left: 5%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.shape-4 {
    top: 25%;
    right: 18%;
    display: flex;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.shape-5 {
    width: 60px;
    height: 60px;
    background: var(--ochre-gold);
    opacity: 0.1;
    bottom: 25%;
    right: 20%;
    transform: scale(0.6) rotate(15deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}

.shape-6 {
    width: 250px;
    height: 250px;
    background: var(--burnt-sienna);
    opacity: 0.06;
    top: -60px;
    right: -40px;
}

.shape-7 {
    width: 60px;
    bottom: 15%;
    right: 3%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.shape-8 {
    bottom: 10%;
    left: 5%;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.shape-9 {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 170px solid var(--dusty-rose);
    opacity: 0.06;
    top: 10%;
    right: 5%;
    transform: scale(0.6) rotate(12deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-10 {
    width: 180px;
    height: 180px;
    background: var(--ochre-gold);
    opacity: 0.05;
    bottom: 15%;
    left: -30px;
    transform: scale(0.6);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-11 {
    top: 20%;
    left: 8%;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.shape-12 {
    width: 80px;
    height: 80px;
    background: var(--burnt-sienna);
    opacity: 0.08;
    top: 10%;
    right: 5%;
    transform: scale(0.6) rotate(20deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-13 {
    width: 180px;
    bottom: 8%;
    left: 3%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.shape-14 {
    top: 15%;
    left: 4%;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.shape-15 {
    width: 160px;
    height: 160px;
    background: var(--warm-linen);
    opacity: 0.15;
    top: 10%;
    right: 8%;
    transform: scale(0.6);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-16 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid var(--sage-moss);
    opacity: 0.1;
    bottom: 15%;
    right: 15%;
    transform: scale(0.6) rotate(-8deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-17 {
    width: 150px;
    top: 40%;
    right: 3%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.shape-18 {
    bottom: 20%;
    left: 15%;
    display: flex;
    gap: 14px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* ---------- Dots ---------- */
.dot {
    display: block;
    border-radius: 50%;
}

.dot-rose {
    width: 12px;
    height: 12px;
    background: var(--dusty-rose);
}

.dot-gold {
    width: 10px;
    height: 10px;
    background: var(--ochre-gold);
}

.dot-sienna {
    width: 10px;
    height: 10px;
    background: var(--burnt-sienna);
}

.dot-gold-light {
    width: 10px;
    height: 10px;
    background: var(--ochre-gold);
    opacity: 0.5;
}

.dot-rose-light {
    width: 12px;
    height: 12px;
    background: var(--dusty-rose);
    opacity: 0.5;
}

/* ---------- Skeleton Loading ---------- */
.skeleton-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: var(--clay-blush);
    border-radius: 12px;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.skeleton-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-dark {
    background: rgba(184, 92, 56, 0.2);
}

.skeleton-dark::after {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-overlay.revealed {
    opacity: 0;
}

/* ---------- Content Reveal Animation ---------- */
.section-content {
    position: relative;
}

.section-content > *:not(.skeleton-overlay) {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.section-content.revealed > *:not(.skeleton-overlay) {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.section-content.revealed > *:nth-child(2) { transition-delay: 0.08s; }
.section-content.revealed > *:nth-child(3) { transition-delay: 0.16s; }
.section-content.revealed > *:nth-child(4) { transition-delay: 0.24s; }
.section-content.revealed > *:nth-child(5) { transition-delay: 0.32s; }
.section-content.revealed > *:nth-child(6) { transition-delay: 0.40s; }

/* ---------- Memphis Shape Entrance (in-view) ---------- */
.section.in-view .shape-circle {
    transform: scale(1) rotate(0deg);
    opacity: 0.1;
}

.section.in-view .shape-triangle {
    transform: scale(1) rotate(0deg);
}

.section.in-view .shape-rect {
    transform: scale(1) rotate(15deg);
}

.section.in-view .shape-squiggle {
    opacity: 0.6;
}

.section.in-view .shape-dots {
    opacity: 0.7;
}

/* Specific overrides for shapes with fixed opacity */
.section-about.in-view .shape-6 {
    opacity: 0.06;
}

.section-process.in-view .shape-9 {
    transform: scale(1) rotate(12deg);
    opacity: 0.06;
}

.section-process.in-view .shape-10 {
    transform: scale(1);
    opacity: 0.05;
}

.section-closing.in-view .shape-15 {
    transform: scale(1);
    opacity: 0.15;
}

.section-closing.in-view .shape-16 {
    transform: scale(1) rotate(-8deg);
    opacity: 0.1;
}

/* ---------- Squiggle Draw Animation ---------- */
.squiggle-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.2s ease;
}

.section.in-view .squiggle-path {
    stroke-dashoffset: 0;
}

/* ---------- Ripple Ring Animation ---------- */
.ripple-ring {
    animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { r: 25; opacity: 0.3; }
    50% { r: 35; opacity: 0.1; }
}

/* ---------- Data Dot Float ---------- */
.data-dot {
    animation: floatDot 4s ease-in-out infinite alternate;
}

.data-dot:nth-child(even) {
    animation-delay: -2s;
}

@keyframes floatDot {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5px, -8px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid,
    .living-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-inner {
        padding: 0 24px;
    }

    .nav-pill {
        padding: 0.5rem 1.25rem;
        gap: 1rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .opening-wordmark {
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .memphis-totem {
        display: none;
    }

    .footer {
        padding: 2rem 24px;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    .section-opening {
        padding: 0 16px;
    }

    .section-inner {
        padding: 0 16px;
    }

    .footer {
        padding: 1.5rem 16px;
    }

    h2 {
        font-size: clamp(1.75rem, 6vw, 3rem);
    }
}
