html {
    scroll-behavior: smooth;
}

:root {
    /* Organic Dark Earth Palette */
    --bg-color: #161e1a;
    /* Deep Forest Night */
    --card-bg: #232f29;
    /* Soft Dark Moss */
    --card-border: #32423a;
    /* Subtle divider */

    --text-primary: #fcfaf6;
    /* Warm Off-white */
    --text-secondary: #c2cbbd;
    /* Soft Sand / Light Sage */

    /* Enhanced Natural Accents (Bright enough for dark mode, but not neon) */
    --accent-terracotta: #ec7a54;
    --accent-sage: #9eb897;
    --accent-ochre: #f4c35b;

    --font-heading: 'Quicksand', sans-serif;
    --font-body: 'Work Sans', sans-serif;

    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- ORGANIC DARK MODE SHAPES & SQUIGGLES --- */
.organic-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.blob-bg {
    position: absolute;
    background-color: var(--accent-ochre);
    opacity: 0.08;
    /* Lower opacity for dark mode so it's subtle, not glowing */
    /* Morphing amoeba shape */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    /* NO FILTER BLUR to prevent AI look */
}

/* Standard Blobs */
.blob-bg-1 {
    width: 800px;
    height: 800px;
    top: -200px;
    left: -300px;
    background-color: var(--accent-terracotta);
    animation: organicFloat1 25s ease-in-out infinite alternate;
}

.blob-bg-2 {
    width: 700px;
    height: 700px;
    bottom: -100px;
    right: -200px;
    background-color: var(--accent-sage);
    animation: organicFloat2 30s ease-in-out infinite alternate-reverse;
}

.blob-bg-3 {
    width: 500px;
    height: 500px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--accent-ochre);
    animation: organicFloat3 35s ease-in-out infinite alternate;
    opacity: 0.05;
}

/* Long "Peanut" Shapes */
.peanut-1 {
    width: 900px;
    height: 300px;
    top: 10%;
    right: -400px;
    background-color: var(--accent-terracotta);
    border-radius: 600px;
    /* simple pill stretch */
    transform: rotate(-25deg);
    animation: slowRotate 40s linear infinite;
    opacity: 0.06;
}

.peanut-2 {
    width: 1000px;
    height: 400px;
    bottom: 10%;
    left: -500px;
    background-color: var(--accent-sage);
    border-radius: 60% 40% 50% 50% / 20% 80% 20% 80%;
    /* asymmetrical stretch */
    transform: rotate(15deg);
    animation: organicFloat1 45s ease-in-out infinite alternate-reverse;
    opacity: 0.05;
}

/* SQUIGGLY LINES */
/* Using inline SVG repeated patterns to create continuous hand-drawn-style squiggles */
.squiggle {
    position: absolute;
    opacity: 0.15;
    background-repeat: repeat-x;
    background-size: auto 100%;
}

/* Wavy line 1: Sage */
.squiggle-1 {
    width: 200%;
    height: 60px;
    top: 25%;
    left: -50%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="60" viewBox="0 0 200 60"><path d="M0,30 C50,0 50,60 100,30 C150,0 150,60 200,30" fill="none" stroke="%239eb897" stroke-width="8" stroke-linecap="round"/></svg>');
    transform: rotate(-10deg);
    animation: slideSquiggle 30s linear infinite;
}

/* Wavy line 2: Terracotta */
.squiggle-2 {
    width: 200%;
    height: 100px;
    bottom: 20%;
    left: -20%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="100" viewBox="0 0 300 100"><path d="M0,50 Q75,100 150,50 T300,50" fill="none" stroke="%23ec7a54" stroke-width="12" stroke-linecap="round"/></svg>');
    transform: rotate(5deg);
    animation: slideSquiggleReverse 40s linear infinite;
}

/* Wavy line 3: Ochre (Vertical) */
.squiggle-3 {
    width: 60px;
    height: 200%;
    top: -50%;
    right: 15%;
    background-repeat: repeat-y;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="200" viewBox="0 0 60 200"><path d="M30,0 C0,50 60,50 30,100 C0,150 60,150 30,200" fill="none" stroke="%23f4c35b" stroke-width="6" stroke-linecap="round"/></svg>');
    transform: rotate(15deg);
    animation: slideSquiggleVert 45s linear infinite;
    opacity: 0.1;
}

@keyframes organicFloat1 {
    0% {
        transform: translate(0, 0) scale(1);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    100% {
        transform: translate(60px, 40px) scale(1.1);
        border-radius: 60% 40% 50% 50% / 50% 60% 40% 60%;
    }
}

@keyframes organicFloat2 {
    0% {
        transform: translate(0, 0) scale(1);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        transform: translate(-80px, -60px) scale(1.05);
        border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
    }
}

@keyframes organicFloat3 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        border-radius: 50%;
    }

    100% {
        transform: translate(calc(-50% + 50px), calc(-50% - 30px)) scale(1.2);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes slowRotate {
    0% {
        transform: rotate(-25deg);
    }

    100% {
        transform: rotate(335deg);
    }
}

@keyframes slideSquiggle {
    0% {
        transform: rotate(-10deg) translateX(0);
    }

    100% {
        transform: rotate(-10deg) translateX(-200px);
    }
}

@keyframes slideSquiggleReverse {
    0% {
        transform: rotate(5deg) translateX(-300px);
    }

    100% {
        transform: rotate(5deg) translateX(0);
    }
}

@keyframes slideSquiggleVert {
    0% {
        transform: rotate(15deg) translateY(0);
    }

    100% {
        transform: rotate(15deg) translateY(-200px);
    }
}

/* Very Curvy, Soft Dark Cards - Liquid Glass */
.curvy-card {
    background: rgba(35, 47, 41, 0.45);
    /* translucent moss */
    backdrop-filter: blur(16px);
    /* Liquid Glass effect */
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border-radius: 32px;
    transition: var(--transition);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
    position: relative;
    z-index: 1;
    /* stay above blobs */
}

/* Typography elements */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

p,
a,
span {
    font-family: var(--font-body);
}

h1 {
    font-size: 3.5rem;
    text-wrap: balance;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.4rem;
}

.gradient-text {
    color: var(--accent-terracotta);
    /* No gradient, just soft solid color */
}

/* Navigation Menu */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(22, 30, 26, 0.95);
    /* matching background */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo i {
    font-size: 1.6rem;
    color: var(--accent-terracotta);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-ochre);
    /* Warm yellow highlight */
}

/* Cute dot indicator for active links */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--accent-ochre);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scale(1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 40px 60px;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-visual {
    display: none;
}

.curvy-badge {
    display: inline-block;
    background: rgba(158, 184, 151, 0.15);
    /* Soft sage bg */
    color: var(--accent-sage);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 50px;
    /* Pill */
    margin-bottom: 24px;
    border: 1px solid rgba(158, 184, 151, 0.3);
}

.hero h1 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 550px;
    font-size: 1.15rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Perfectly rounded pill buttons */
.curvy-btn {
    padding: 14px 30px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50px;
    /* Pill shape */
    border: none;
}

.curvy-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.curvy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(236, 122, 84, 0.2);
}

.curvy-btn:hover i {
    transform: translateX(4px);
}

.curvy-btn-primary {
    background: var(--accent-terracotta);
    color: #161e1a;
    /* Dark text for contrast against bright button */
}

.curvy-btn-secondary {
    background: rgba(35, 47, 41, 0.45);
    /* translucent moss */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.curvy-btn-secondary:hover {
    border-color: var(--accent-ochre);
    color: var(--accent-ochre);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Features Grid */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 50px 40px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Thin subtle border */
}

.feature-card.active {
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 1px var(--accent-terracotta), 0 20px 40px rgba(0, 0, 0, 0.6);
}

.feature-card.active:hover {
    border-color: var(--accent-terracotta);
    box-shadow: 0 0 0 1px var(--accent-terracotta), 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-8px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(244, 195, 91, 0.3);
    /* Soft warm hover border */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Organic blob wrapper for icons */
.card-icon-wrapper {
    margin-bottom: 25px;
    font-size: 2.2rem;
    color: var(--accent-ochre);
    /* Warm yellow/orange icon */
    background: #364136;
    /* Dark olive background blob from screenshot */
    width: 75px;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Static amoeba shape */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transition: var(--transition);
}

.feature-card:hover .card-icon-wrapper {
    background: var(--accent-ochre);
    color: #161e1a;
    /* Morph slightly on hover */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.feature-card h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.feature-card p {
    margin-bottom: 30px;
    flex-grow: 1;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-ochre);
    /* Bright yellow/orange text */
    transition: var(--transition);
}

.feature-card:hover .card-action {
    color: var(--accent-terracotta);
    /* Shift color slightly */
}

.feature-card:hover .card-action i {
    transform: translateX(6px);
}

/* Footer - Liquid Glass Blob */
.curvy-footer {
    background: rgba(35, 47, 41, 0.45);
    /* translucent moss */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 60px 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
    position: relative;
    border-radius: 120px;
    /* Fully rounded giant pill/circle shape */
    margin: 60px auto 40px auto;
    /* centered, floating above the very bottom */
    max-width: 90%;
    /* prevent reaching screen edges so the curve is visible */
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-logo i {
    font-size: 1.6rem;
    color: var(--accent-sage);
}

.curvy-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        padding-top: 150px;
        flex-direction: column;
        text-align: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }
}

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

    .mobile-menu-btn {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

/* --- MODELS AND EXTENSIONS PAGES Adjustments --- */
.models-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.horizontal-scroll-grid {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 30px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    padding-bottom: 20px;
    padding-top: 20px;
}

.horizontal-scroll-grid::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-grid .model-card {
    flex: 0 0 320px;
}

.model-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.model-image-wrapper {
    width: 100%;
    height: 240px;
    background-color: rgba(0, 0, 0, 0.2);
    /* Deepen image background in dark mode */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
}

.model-image-blur {
    display: none !important;
}

/* KEEP BLUR OFF */

.model-image-front {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.model-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.model-image:hover {
    transform: scale(1.02);
}

.model-card:hover .model-image,
.model-card:hover .model-image-front {
    transform: scale(1.05);
    /* organic zoom */
}

/* Horizontal layouts for extensions */
.ext-horizontal-card {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    text-align: left;
}

.ext-image-wrapper {
    flex: 0 0 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--card-border);
    padding: 30px;
}

.ext-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.model-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.model-info h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.model-info p {
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.model-curvy-btn {
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 24px;
    font-size: 0.85rem;
}

/* Pixel Art Modal Base */
.pixel-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 30, 26, 0.95);
    /* Opaque dark forest */
    justify-content: center;
    align-items: center;
}

.pixel-modal.show {
    display: flex;
}

.pixel-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(35, 47, 41, 0.45);
    /* translucent moss */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    border-radius: 32px;
    /* Super curvy */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
}

.pixel-modal-img {
    width: 600px;
    height: 600px;
    min-width: 50vw;
    min-height: 50vh;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.pixel-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: var(--text-secondary);
    font-size: 3rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.pixel-modal-close:hover {
    color: var(--accent-terracotta);
    transform: scale(1.1) rotate(90deg);
    /* Playful hover */
}

.slider-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Slider Buttons - Liquid Glass */
.slider-nav-curvy-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    background: rgba(35, 47, 41, 0.45);
    /* translucent moss */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--accent-sage);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slightly brightened border for glass edge */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.slider-nav-curvy-btn:hover {
    background: rgba(158, 184, 151, 0.8);
    /* sage tint on hover */
    color: #161e1a;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.slider-prev {
    left: -25px;
}

.slider-next {
    right: -25px;
}

.slider-wrapper .horizontal-scroll-grid {
    padding: 0 40px;
}