/* ===========================================
   lump.dev — Styles
   Skeuomorphic physicality meets whimsical futurism
   =========================================== */

/* --- CSS Custom Properties --- */
:root {
    --frosted-cream: #f0eee8;
    --deep-navy: #1b2240;
    --deep-navy-deeper: #162038;
    --lump-blue: #6b9ece;
    --ice-vapor: #c5ddf0;
    --abyssal-teal: #2d5f8a;
    --coral-nudge: #e8836b;
    --silk-gleam: #faf8f4;
    --charcoal-mist: #3a3d4e;
    --dust-mote: rgba(180, 170, 155, 0.06);
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-heading: 'Jost', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    color: var(--deep-navy);
    background: var(--frosted-cream);
    overflow-x: hidden;
}

/* --- Grain Overlay (applied to sections) --- */
.section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: url(#grain);
    opacity: 0.04;
    z-index: 1;
    background: transparent;
}

.undersurface::after {
    opacity: 0.07;
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--frosted-cream) 0%, var(--ice-vapor) 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 4vh;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    color: var(--deep-navy);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: var(--charcoal-mist);
    letter-spacing: 0.01em;
}

/* --- Primary Lump Blob --- */
.lump-primary {
    position: relative;
    z-index: 2;
    width: clamp(220px, 35vw, 420px);
    height: clamp(220px, 35vw, 420px);
    background: radial-gradient(ellipse at 35% 30%, var(--ice-vapor) 0%, var(--lump-blue) 40%, var(--abyssal-teal) 100%);
    border-radius: 42% 58% 64% 36% / 47% 33% 67% 53%;
    box-shadow:
        0 20px 60px rgba(27, 34, 64, 0.25),
        0 8px 20px rgba(27, 34, 64, 0.15),
        inset 0 -4px 12px rgba(45, 95, 138, 0.3),
        inset 0 4px 8px rgba(197, 221, 240, 0.4);
    cursor: pointer;
    transition:
        transform 0.4s var(--spring-ease),
        box-shadow 0.4s ease;
    animation: lump-breathe 12s ease-in-out infinite alternate;
}

.lump-primary:hover {
    transform: translateY(-8px);
    box-shadow:
        0 28px 72px rgba(27, 34, 64, 0.3),
        0 12px 28px rgba(27, 34, 64, 0.2),
        inset 0 -4px 12px rgba(45, 95, 138, 0.3),
        inset 0 4px 8px rgba(197, 221, 240, 0.4);
}

.lump-primary:active {
    transform: scale(0.96);
    box-shadow:
        0 10px 30px rgba(27, 34, 64, 0.2),
        0 4px 10px rgba(27, 34, 64, 0.12),
        inset 0 -4px 12px rgba(45, 95, 138, 0.3),
        inset 0 4px 8px rgba(197, 221, 240, 0.4);
}

@keyframes lump-breathe {
    0% {
        border-radius: 42% 58% 64% 36% / 47% 33% 67% 53%;
    }
    33% {
        border-radius: 58% 42% 37% 63% / 55% 62% 38% 45%;
    }
    66% {
        border-radius: 50% 50% 55% 45% / 40% 60% 40% 60%;
    }
    100% {
        border-radius: 63% 37% 42% 58% / 53% 47% 55% 45%;
    }
}

/* --- Hero Descent Gradient --- */
.hero-descent-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent 0%, var(--frosted-cream) 100%);
    z-index: 3;
    pointer-events: none;
}

/* ===========================================
   DECORATIVE BLOBS
   =========================================== */
.deco-blob {
    position: absolute;
    background: var(--ice-vapor);
    opacity: 0.3;
    z-index: 0;
    border-radius: 58% 42% 63% 37% / 45% 55% 38% 62%;
    animation: lump-breathe 12s ease-in-out infinite alternate;
    pointer-events: none;
}

.deco-blob-1 {
    width: 180px; height: 160px;
    top: 15%; left: 5%;
    animation-delay: -3s;
}
.deco-blob-2 {
    width: 120px; height: 130px;
    top: 60%; right: 8%;
    animation-delay: -7s;
}
.deco-blob-3 {
    width: 90px; height: 80px;
    bottom: 20%; left: 15%;
    animation-delay: -5s;
}
.deco-blob-4 {
    width: 140px; height: 120px;
    top: 10%; right: 3%;
    animation-delay: -2s;
}
.deco-blob-5 {
    width: 100px; height: 110px;
    bottom: 15%; left: 2%;
    animation-delay: -8s;
}
.deco-blob-6 {
    width: 160px; height: 140px;
    top: 20%; left: -30px;
    animation-delay: -4s;
}
.deco-blob-7 {
    width: 100px; height: 90px;
    bottom: 10%; right: 5%;
    animation-delay: -6s;
}
.deco-blob-8 {
    width: 120px; height: 100px;
    top: 15%; right: 8%;
    background: var(--abyssal-teal);
    opacity: 0.15;
    animation-delay: -1s;
}
.deco-blob-9 {
    width: 80px; height: 90px;
    bottom: 25%; left: 10%;
    background: var(--lump-blue);
    opacity: 0.1;
    animation-delay: -9s;
}

/* ===========================================
   FLOWING CURVE DIVIDERS
   =========================================== */
.curve-divider {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    z-index: 2;
}

.curve-divider svg {
    width: 100%;
    height: 100%;
}

.flowing-curve {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.flowing-curve.animate-in {
    stroke-dashoffset: 0;
}

/* ===========================================
   WORKSHOP SECTION
   =========================================== */
.workshop {
    position: relative;
    min-height: 100vh;
    padding: 80px 24px;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 40px,
            rgba(180, 170, 155, 0.04) 40px,
            rgba(180, 170, 155, 0.04) 41px
        ),
        var(--silk-gleam);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

/* --- Specimen Tag --- */
.specimen-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--silk-gleam);
    border: 1px solid var(--ice-vapor);
    border-radius: 6px 6px 6px 0;
    padding: 6px 16px 6px 28px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 2px 8px rgba(27, 34, 64, 0.08);
}

.tag-hole {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--charcoal-mist);
    background: transparent;
}

.tag-text {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--charcoal-mist);
}

.specimen-tag-dark {
    background: rgba(27, 34, 64, 0.3);
    border-color: rgba(107, 158, 206, 0.3);
}

.specimen-tag-dark .tag-text {
    color: var(--ice-vapor);
}

.specimen-tag-dark .tag-hole {
    border-color: var(--ice-vapor);
}

/* --- Section Heading --- */
.section-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    letter-spacing: -0.02em;
    color: var(--deep-navy);
    margin-bottom: 48px;
    line-height: 1.1;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.workshop-card {
    background: var(--silk-gleam);
    border-radius: 16px;
    padding: 28px 24px;
    border-top: 1px solid var(--ice-vapor);
    border-bottom: 4px solid var(--charcoal-mist);
    box-shadow: 0 6px 20px rgba(27, 34, 64, 0.12);
    transition:
        transform 0.4s var(--spring-ease),
        box-shadow 0.4s ease,
        opacity 0.6s ease;
    cursor: default;
}

.workshop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(27, 34, 64, 0.18);
}

/* Scroll reveal initial state */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s ease,
        transform 0.6s var(--spring-ease),
        box-shadow 0.4s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--deep-navy);
    margin-bottom: 8px;
}

.card-body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--charcoal-mist);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ===========================================
   SKEUOMORPHIC WIDGETS
   =========================================== */
.widget-row {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.widget-label {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--charcoal-mist);
}

/* --- Toggle Switch --- */
.toggle-track {
    width: 56px;
    height: 28px;
    border-radius: 14px;
    background: var(--charcoal-mist);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-track.active {
    background: var(--lump-blue);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 35%, #fff 0%, #e0e0e0 60%, #bbb 100%);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transition: transform 0.3s var(--spring-ease);
}

.toggle-track.active .toggle-thumb {
    transform: translateX(28px);
}

/* --- Pressure Gauge --- */
.gauge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--silk-gleam) 0%, #e8e6e0 100%);
    box-shadow:
        0 4px 12px rgba(27, 34, 64, 0.15),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    padding: 4px;
}

.gauge-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background:
        conic-gradient(
            from 210deg,
            transparent 0deg,
            transparent 10deg,
            var(--charcoal-mist) 10deg,
            var(--charcoal-mist) 11deg,
            transparent 11deg,
            transparent 30deg,
            var(--charcoal-mist) 30deg,
            transparent 31deg,
            transparent 50deg,
            var(--charcoal-mist) 50deg,
            transparent 51deg,
            transparent 70deg,
            var(--charcoal-mist) 70deg,
            transparent 71deg,
            transparent 90deg,
            var(--charcoal-mist) 90deg,
            transparent 91deg,
            transparent 110deg,
            var(--charcoal-mist) 110deg,
            transparent 111deg,
            transparent 120deg
        ),
        radial-gradient(circle, var(--silk-gleam) 60%, #ddd 100%);
    overflow: hidden;
}

.gauge-needle {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 28px;
    background: var(--coral-nudge);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(-60deg);
    transition: transform 1.2s var(--spring-ease);
    border-radius: 1px;
}

.gauge-needle.animate-in {
    transform: translateX(-50%) rotate(40deg);
}

.gauge-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--charcoal-mist);
}

/* ===========================================
   GALLERY SECTION
   =========================================== */
.gallery {
    position: relative;
    min-height: 100vh;
    padding: 80px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-bg-wash {
    position: absolute;
    inset: 0;
    background: var(--ice-vapor);
    opacity: 0.3;
    z-index: 0;
}

.gallery-content {
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.gallery .section-heading {
    text-align: center;
}

/* --- Blob Grid --- */
.blob-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 24px;
}

.blob-cell-1 { grid-column: 1 / 3; }
.blob-cell-2 { grid-column: 3; }
.blob-cell-3 { grid-column: 1; }
.blob-cell-4 { grid-column: 2 / 4; }
.blob-cell-5 { grid-column: 1 / 2; }
.blob-cell-6 { grid-column: 2 / 4; }

@media (max-width: 600px) {
    .blob-grid {
        grid-template-columns: 1fr;
    }
    .blob-cell-1, .blob-cell-2, .blob-cell-3,
    .blob-cell-4, .blob-cell-5, .blob-cell-6 {
        grid-column: 1;
    }
}

.blob-shape {
    padding: 36px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 180px;
    transition:
        transform 0.4s var(--spring-ease),
        box-shadow 0.4s ease;
    cursor: default;
}

.blob-shape:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(27, 34, 64, 0.22);
}

.blob-shape-1 {
    background: linear-gradient(135deg, var(--lump-blue) 0%, var(--abyssal-teal) 100%);
    border-radius: 58% 42% 63% 37% / 45% 55% 38% 62%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.18);
}

.blob-shape-2 {
    background: linear-gradient(135deg, var(--ice-vapor) 0%, var(--lump-blue) 100%);
    border-radius: 42% 58% 37% 63% / 55% 38% 62% 45%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.15);
}

.blob-shape-3 {
    background: linear-gradient(135deg, var(--coral-nudge) 0%, #d06a55 100%);
    border-radius: 63% 37% 55% 45% / 42% 58% 45% 55%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.18);
}

.blob-shape-4 {
    background: linear-gradient(135deg, var(--abyssal-teal) 0%, var(--deep-navy) 100%);
    border-radius: 37% 63% 45% 55% / 58% 42% 55% 45%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.2);
}

.blob-shape-5 {
    background: linear-gradient(135deg, var(--silk-gleam) 0%, var(--ice-vapor) 100%);
    border-radius: 55% 45% 58% 42% / 37% 63% 42% 58%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.12);
}

.blob-shape-6 {
    background: linear-gradient(135deg, var(--lump-blue) 0%, var(--ice-vapor) 100%);
    border-radius: 45% 55% 42% 58% / 63% 37% 58% 42%;
    box-shadow: 0 8px 24px rgba(27, 34, 64, 0.15);
}

.blob-text {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    line-height: 1.6;
    color: var(--silk-gleam);
}

.blob-shape-5 .blob-text {
    color: var(--deep-navy);
}

.blob-shape-6 .blob-text {
    color: var(--deep-navy);
}

/* ===========================================
   UNDERSURFACE SECTION
   =========================================== */
.undersurface {
    position: relative;
    min-height: 100vh;
    padding: 100px 24px;
    background: linear-gradient(180deg, var(--deep-navy) 0%, var(--deep-navy-deeper) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.undersurface-content {
    max-width: 680px;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.undersurface-orb-container {
    position: relative;
    width: clamp(250px, 40vw, 400px);
    height: clamp(250px, 40vw, 400px);
    margin: 60px 0;
}

.undersurface-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(120px, 20vw, 200px);
    height: clamp(120px, 20vw, 200px);
    background: radial-gradient(circle, var(--lump-blue) 0%, var(--abyssal-teal) 60%, transparent 100%);
    border-radius: 50%;
    filter: blur(2px);
    box-shadow:
        0 0 60px rgba(107, 158, 206, 0.4),
        0 0 120px rgba(107, 158, 206, 0.2);
    animation: orb-glow 8s ease-in-out infinite alternate;
}

@keyframes orb-glow {
    0% {
        box-shadow:
            0 0 60px rgba(107, 158, 206, 0.4),
            0 0 120px rgba(107, 158, 206, 0.2);
    }
    100% {
        box-shadow:
            0 0 80px rgba(107, 158, 206, 0.5),
            0 0 160px rgba(107, 158, 206, 0.3);
    }
}

.orb-roots {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.root-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 2s ease-out;
}

.root-path.animate-in {
    stroke-dashoffset: 0;
}

.undersurface-closing {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--frosted-cream);
    letter-spacing: -0.01em;
    margin-top: 20px;
}

.undersurface .section-heading {
    color: var(--frosted-cream);
}

/* ===========================================
   SCROLL PROGRESS INDICATOR
   =========================================== */
.scroll-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-indicator-lump {
    width: 20px;
    height: 20px;
    background: var(--lump-blue);
    opacity: 0.6;
    border-radius: 50% 50% 50% 50%;
    transition: border-radius 0.4s var(--spring-ease), opacity 0.4s ease;
    box-shadow: 0 2px 8px rgba(27, 34, 64, 0.2);
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .section-heading {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .widget-row {
        justify-content: center;
    }

    .blob-grid {
        gap: 16px;
    }

    .deco-blob {
        display: none;
    }
}
