/* ============================================
   FLUID — Liquid Organic Experience
   Design System & Styles
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #F7F3EE;
    --bg-secondary: #EDE8E0;
    --bg-warm: #F0ECE6;
    --text-primary: #2C2825;
    --text-secondary: #8C837A;
    --text-muted: #B5ADA4;

    --clay: #C4A882;
    --clay-light: #D9C4A8;
    --clay-dark: #A68B6A;
    --moss: #A8B5A0;
    --moss-light: #C2CCBC;
    --mist: #B8C4CE;
    --mist-light: #D0D9E0;
    --rose: #D4A5A5;
    --rose-light: #E4C4C4;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 0.809rem;
    --space-md: 1.309rem;
    --space-lg: 2.118rem;
    --space-xl: 3.427rem;
    --space-2xl: 5.545rem;
    --space-3xl: 8.972rem;

    --radius-pill: 9999px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background-color: var(--clay-light);
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---- Custom Cursor ---- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--clay);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--transition-bounce),
                height 0.3s var(--transition-bounce),
                background-color 0.3s ease;
    mix-blend-mode: difference;
}

.cursor.hover {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 1.5px solid var(--clay);
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background-color: rgba(196, 168, 130, 0.15);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--transition-smooth),
                width 0.4s var(--transition-bounce),
                height 0.4s var(--transition-bounce);
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body { cursor: auto; }
    .cursor, .cursor-follower { display: none; }
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    transition: background-color 0.6s ease, backdrop-filter 0.6s ease;
}

.nav.scrolled {
    background-color: rgba(247, 243, 238, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.logo-blob {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--clay), var(--moss));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-breathe 6s ease-in-out infinite;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background-color: var(--clay);
    transition: width 0.4s var(--transition-smooth), left 0.4s var(--transition-smooth);
    border-radius: var(--radius-pill);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ---- Blob Keyframes ---- */
@keyframes blob-breathe {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg) scale(1);
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(2deg) scale(1.02);
    }
    50% {
        border-radius: 50% 50% 40% 60% / 40% 50% 60% 50%;
        transform: rotate(-1deg) scale(0.98);
    }
    75% {
        border-radius: 40% 60% 60% 40% / 60% 40% 50% 60%;
        transform: rotate(1deg) scale(1.01);
    }
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(2deg); }
    66% { transform: translate(-10px, 10px) rotate(-1deg); }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes liquid-reveal {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.hero-blob-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    animation: blob-breathe 8s ease-in-out infinite, blob-float 12s ease-in-out infinite;
    opacity: 0.6;
    filter: blur(0.5px);
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--clay) 0%, var(--moss) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: 0s;
    opacity: 0.7;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(225deg, var(--mist) 0%, var(--rose) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: -2s;
    opacity: 0.5;
    margin-left: 150px;
    margin-top: -100px;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, var(--clay-light) 0%, var(--moss-light) 100%);
    border-radius: 70% 30% 50% 50% / 50% 50% 30% 70%;
    animation-delay: -4s;
    opacity: 0.4;
    margin-left: -200px;
    margin-top: 150px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    padding: var(--space-xl);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(100%);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    opacity: 0;
}

.hero-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 450px;
    margin: 0 auto var(--space-lg);
    line-height: 1.8;
    opacity: 0;
}

/* ---- Liquid CTA Button ---- */
.hero-cta,
.contact-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    border: 1.5px solid var(--text-primary);
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: color 0.5s var(--transition-smooth);
    background: transparent;
    cursor: none;
}

.cta-text {
    position: relative;
    z-index: 2;
}

.cta-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--clay) 0%, var(--moss) 100%);
    transform: translateY(101%);
    transition: transform 0.5s var(--transition-bounce);
    border-radius: inherit;
    z-index: 1;
}

.hero-cta:hover,
.contact-cta:hover {
    color: var(--bg-primary);
    border-color: transparent;
}

.hero-cta:hover .cta-fill,
.contact-cta:hover .cta-fill {
    transform: translateY(0);
}

/* ---- Scroll Hint ---- */
.scroll-hint {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

.scroll-hint span {
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Section Common ---- */
.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ---- Philosophy Section ---- */
.philosophy {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl) var(--space-xl);
    overflow: hidden;
    background-color: var(--bg-primary);
}

.section-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    opacity: 0.15;
    pointer-events: none;
}

.blob-left {
    left: -150px;
    top: 20%;
    background: linear-gradient(135deg, var(--clay), var(--rose));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-breathe 10s ease-in-out infinite;
}

.philosophy-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-left: 10%;
}

.philosophy-title {
    margin-bottom: var(--space-lg);
}

.philosophy-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.philosophy-text p {
    font-size: 1.0625rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
}

.philosophy-blobs {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 500px;
    pointer-events: none;
}

.ph-blob {
    position: absolute;
    animation: blob-breathe 8s ease-in-out infinite;
}

.ph-blob-1 {
    width: 280px;
    height: 280px;
    background: linear-gradient(180deg, var(--mist) 0%, var(--mist-light) 100%);
    border-radius: 40% 60% 60% 40% / 60% 40% 50% 60%;
    top: 0;
    right: 0;
    opacity: 0.6;
}

.ph-blob-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(0deg, var(--rose) 0%, var(--rose-light) 100%);
    border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    bottom: 50px;
    left: 0;
    opacity: 0.5;
    animation-delay: -3s;
}

/* ---- Works Section ---- */
.works {
    padding: var(--space-3xl) var(--space-xl);
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.works-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.work-card {
    position: relative;
    padding: var(--space-xl);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: none;
    transition: transform 0.6s var(--transition-smooth);
}

.work-card:hover {
    transform: translateY(-8px);
}

.work-blob {
    position: absolute;
    inset: 0;
    animation: blob-breathe 7s ease-in-out infinite;
    transition: transform 0.6s var(--transition-bounce);
    z-index: 0;
}

.work-card:hover .work-blob {
    transform: scale(1.05);
}

.work-blob-1 {
    background: linear-gradient(135deg, var(--clay) 0%, var(--clay-light) 100%);
    border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%;
    opacity: 0.85;
}

.work-blob-2 {
    background: linear-gradient(225deg, var(--moss) 0%, var(--moss-light) 100%);
    border-radius: 40% 60% 40% 60% / 50% 40% 60% 50%;
    opacity: 0.85;
    animation-delay: -2s;
}

.work-blob-3 {
    background: linear-gradient(45deg, var(--mist) 0%, var(--mist-light) 100%);
    border-radius: 50% 50% 60% 40% / 60% 50% 40% 50%;
    opacity: 0.85;
    animation-delay: -4s;
}

.work-blob-4 {
    background: linear-gradient(315deg, var(--rose) 0%, var(--rose-light) 100%);
    border-radius: 40% 60% 50% 50% / 50% 60% 50% 40%;
    opacity: 0.85;
    animation-delay: -1s;
}

.work-content {
    position: relative;
    z-index: 2;
}

.work-category {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(44, 40, 37, 0.6);
    margin-bottom: var(--space-xs);
}

.work-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.work-desc {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(44, 40, 37, 0.75);
    max-width: 280px;
}

/* ---- Process Section ---- */
.process {
    padding: var(--space-3xl) var(--space-xl);
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.process-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.process-flow {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.flow-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.flow-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.process-steps {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.process-step {
    text-align: center;
    padding: var(--space-lg);
}

.step-blob {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    animation: blob-breathe 6s ease-in-out infinite;
}

.process-step:nth-child(1) .step-blob {
    background: linear-gradient(135deg, var(--clay), var(--clay-light));
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.process-step:nth-child(2) .step-blob {
    background: linear-gradient(225deg, var(--moss), var(--moss-light));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: -1.5s;
}

.process-step:nth-child(3) .step-blob {
    background: linear-gradient(45deg, var(--mist), var(--mist-light));
    border-radius: 70% 30% 50% 50% / 50% 50% 30% 70%;
    animation-delay: -3s;
}

.process-step:nth-child(4) .step-blob {
    background: linear-gradient(315deg, var(--rose), var(--rose-light));
    border-radius: 40% 60% 60% 40% / 60% 40% 50% 60%;
    animation-delay: -4.5s;
}

.step-num {
    display: block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ---- Contact Section ---- */
.contact {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    overflow: hidden;
    padding: var(--space-3xl) var(--space-xl);
}

.contact-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--clay) 0%, var(--rose) 50%, var(--moss) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    opacity: 0.2;
    animation: blob-breathe 10s ease-in-out infinite, blob-float 15s ease-in-out infinite;
    filter: blur(2px);
}

.contact-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 550px;
}

.contact-title {
    margin-bottom: var(--space-md);
}

.contact-desc {
    font-size: 1.0625rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.contact-cta {
    font-size: 1.0625rem;
    padding: var(--space-sm) var(--space-xl);
}

/* ---- Footer ---- */
.footer {
    position: relative;
    background-color: var(--bg-secondary);
    padding-bottom: var(--space-xl);
}

.footer-wave {
    width: 100%;
    height: 80px;
    overflow: hidden;
    line-height: 0;
}

.footer-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: var(--space-lg) var(--space-xl) 0;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-tagline {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--text-muted);
    font-style: italic;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-sm);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .works-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .philosophy-content {
        margin-left: 0;
        max-width: 100%;
    }

    .philosophy-blobs {
        display: none;
    }

    .hero-blob {
        transform: scale(0.7);
    }

    .blob-1 { width: 350px; height: 350px; }
    .blob-2 { width: 250px; height: 250px; margin-left: 80px; }
    .blob-3 { width: 180px; height: 180px; margin-left: -120px; }
}

@media (max-width: 600px) {
    .nav {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-links {
        display: none;
    }

    .hero-content {
        padding: var(--space-md);
    }

    .philosophy,
    .works,
    .process,
    .contact {
        padding: var(--space-2xl) var(--space-md);
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .work-card {
        min-height: 300px;
        padding: var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .footer-right {
        align-items: flex-start;
    }

    .contact-blob {
        width: 400px;
        height: 400px;
    }
}

/* ---- Animation Initial States ---- */
.title-line,
.hero-subtitle,
.hero-desc,
.scroll-hint,
.section-label,
.section-title,
.philosophy-text p,
.work-card,
.process-step,
.contact-title,
.contact-desc,
.contact-cta {
    will-change: transform, opacity;
}
