/* =========================================
   VARIABLES & THEME CONFIGURATION
   ========================================= */
:root {
    /* UI Design Palette */
    --primary: #84dde1;
    --primary-rgb: 132, 221, 225;
    --primary-hover: #6cd0d4;
    --secondary: #183d61;
    --secondary-rgb: 24, 61, 97;
    --accent: #204ab0;
    --accent-rgb: 32, 74, 176;
    
    /* Backgrounds */
    --background: #FFFFFF;
    --background-alt: #F4F9FB;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    
    /* Typography */
    --text-primary: #000000;
    --text-secondary: #4A5568;
    --text-muted: #A0AEC0;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing */
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    /* Radii */
    --radius-card: 24px;
    --radius-btn: 9999px;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--background);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   SECTION STYLING
   ========================================= */
section {
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

section:nth-child(odd) {
    background-color: var(--background);
}

section:nth-child(even) {
    background-color: var(--background-alt);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* =========================================
   COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.3);
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: white;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background-color: var(--background-alt);
    transform: translateY(-2px);
}

/* Cards */
.card, .step-card, .feature-card, .testimonial-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover, .step-card:hover, .feature-card:hover, .testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* =========================================
   HEADER
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--secondary);
}

header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

header nav a {
    font-weight: 500;
    color: var(--text-secondary);
}

header nav a:hover {
    color: var(--accent);
}

#header-cta {
    background: var(--primary);
    color: var(--secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
}

#header-cta:hover {
    background: var(--primary-hover);
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
}

/* =========================================
   HERO SECTION (Morphing Blobs)
   ========================================= */
.hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8rem; /* Header clearance */
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-bg-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

/* Morphing Blob Animation CSS */
.morph-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphBlob 20s ease-in-out infinite;
    filter: blur(80px);
    opacity: 0.4;
}

.morph-blob:nth-child(2) {
    animation-delay: -10s;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    width: 400px;
    height: 400px;
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) rotate(0deg); }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(50px, -30px) rotate(90deg); }
    50% { border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%; transform: translate(-20px, 40px) rotate(180deg); }
    75% { border-radius: 60% 40% 60% 30% / 70% 50% 40% 60%; transform: translate(-40px, -20px) rotate(270deg); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.9));
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* =========================================
   LOCKED PLAYGROUND
   ========================================= */
#playground {
    background-color: var(--background);
}

.locked-playground {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: var(--background-alt);
    border: 2px dashed var(--border);
    border-radius: var(--radius-card);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lock-icon {
    font-size: 4rem;
    color: var(--text-muted);
    background: white;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.locked-playground h3 {
    color: var(--secondary);
    margin-bottom: 0;
}

/* =========================================
   HOW IT WORKS (Timeline)
   ========================================= */
#how-to-use {
    background-color: var(--background-alt);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

/* Dashed connector line */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 3rem;
    left: 15%;
    right: 15%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--primary) 0, var(--primary) 10px, transparent 10px, transparent 20px);
    z-index: 0;
    opacity: 0.5;
}

.step-card {
    position: relative;
    z-index: 1;
    text-align: center;
    background: var(--surface);
    height: 100%;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 0 0 8px var(--surface); /* Mask the line */
}

/* =========================================
   FEATURES GRID
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    background: var(--background-alt);
    padding: 1rem;
    border-radius: 12px;
}

/* =========================================
   GALLERY (Masonry/Grid)
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    margin: 0;
    color: var(--secondary);
    font-weight: 600;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--surface);
    position: relative;
    border-bottom: 4px solid var(--primary);
}

.testimonial-quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info .name {
    font-weight: 700;
    color: var(--secondary);
}

.author-info .role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =========================================
   FAQ (Accordion)
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.faq-icon {
    color: var(--primary);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin: 0;
    line-height: 1.7;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Arbitrary large height */
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 2rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
/* Mobile (max 767px) */
@media (max-width: 767px) {
    html { font-size: 14px; }
    
    .hero { padding-top: 6rem; }
    
    .header-container { padding: 0 1rem; }
    
    /* Mobile Nav */
    .menu-toggle { display: block; }
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        align-items: stretch;
    }
    header nav.active { display: flex; }
    header nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--background-alt); text-align: center; }
    #header-cta { margin-top: 1rem; text-align: center; }
    
    /* Hero */
    .hero-content h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    
    /* Grids */
    .steps-grid, .features-grid, .gallery-grid, .testimonials-grid, .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Remove timeline connector on mobile */
    .steps-grid::before { display: none; }
    
    .footer-content { gap: 2rem; text-align: center; }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .steps-grid { grid-template-columns: 1fr; }
    .steps-grid::before { display: none; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}