/* =========================================
   VARIABLES & THEME
   ========================================= */
:root {
    /* Cupertino Data-Flow Palette */
    --primary: #007AFF;
    --primary-rgb: 0, 122, 255;
    --secondary: #5856D6;
    --secondary-rgb: 88, 86, 214;
    --accent: #34C759;
    --accent-rgb: 52, 199, 89;
    
    /* Backgrounds & Surface */
    --background: #F5F5F7;      /* Light gray Apple background */
    --background-alt: #FFFFFF;  /* White alternate sections */
    --surface: #FFFFFF;         /* White cards */
    --surface-glass: rgba(255, 255, 255, 0.7);
    
    /* Typography Colors */
    --text: #1D1D1F;            /* Apple dark gray */
    --text-secondary: #86868B;
    --text-muted: #D2D2D7;
    
    /* Spacing & Borders */
    --border-radius: 20px;      /* Squircle-like */
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1rem;
    word-break: break-word;
}

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

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

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}

/* =========================================
   SECTION STYLING - MANDATORY
   ========================================= */
section, .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);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

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

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

.section-header p {
    font-size: 1.1rem;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.85); /* Light glass */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.logo i {
    color: var(--primary);
}

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

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

nav a:not(.btn):hover {
    color: var(--primary);
}

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

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px; /* Pill shape for Apple/Cupertino feel */
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
    color: #fff;
}

.btn-secondary {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-pulse {
    animation: pulseShadow 2s infinite;
}

@keyframes pulseShadow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 8rem 2rem 4rem; /* Extra top padding for header */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.05; /* Very subtle bg */
}

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

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

/* Soft Particles Animation (Prompt Requirement) */
.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 10s ease-in-out infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    30% { opacity: 0.4; }
    100% { transform: translateY(-20vh) scale(1.5); opacity: 0; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--background) 100%);
    z-index: 2;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.mono-text {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.2em; /* Fix text clip */
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-trust {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 1.5rem;
    opacity: 0.4;
}

/* =========================================
   PLAYGROUND (LOCKED)
   ========================================= */
.playground-locked-container {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Glass effect overlay for locked look */
.playground-locked-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    pointer-events: none;
}

.lock-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
}

.playground-locked-container h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.progress-container {
    height: 8px;
    width: 100%;
    max-width: 300px;
    background: #E5E5EA;
    border-radius: 4px;
    margin: 2rem auto 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 85%;
    background: var(--primary);
    border-radius: 4px;
    animation: shimmerBar 2s infinite linear;
    background-image: linear-gradient(90deg, 
        var(--primary) 0%, 
        var(--secondary) 50%, 
        var(--primary) 100%);
    background-size: 200% 100%;
}

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

.progress-text {
    font-family: 'SF Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2rem;
}

.notification-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: rgba(52, 199, 89, 0.1);
    color: var(--accent);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: default;
}

/* =========================================
   CARDS & FEATURES
   ========================================= */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Bento Grid */
.bento-grid, .grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* =========================================
   HOW IT WORKS (STEPS)
   ========================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    position: relative;
    overflow: hidden;
}

.step-number {
    font-family: 'SF Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.step-card h3 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* =========================================
   GALLERY
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 1/1;
    background: #eee;
    box-shadow: var(--shadow-sm);
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

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

.gallery-overlay span {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.testimonial-card {
    text-align: left;
    position: relative;
}

.quote-icon {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 1rem;
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.reviewer-info h4 {
    margin: 0;
    font-size: 1rem;
}

.reviewer-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================
   FAQ
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

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

.faq-question:hover {
    background: rgba(0, 0, 0, 0.02);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-question.active i {
    transform: rotate(180deg);
}

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

.faq-answer p {
    padding: 1rem 0 1.5rem 0;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--background-alt);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
}

.footer-links a, .footer-links button {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 0;
}

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

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

/* =========================================
   MODALS
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    z-index: 10;
}

.modal-body {
    padding: 3rem 2rem;
    overflow-y: auto;
}

.modal-body h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.modal-body h4 {
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* =========================================
   RESPONSIVE DESIGN (MANDATORY)
   ========================================= */

/* Mobile (max 767px) */
@media (max-width: 767px) {
    html { font-size: 14px; }
    
    .hero {
        padding: 6rem 1rem 3rem;
        min-height: 85vh;
        align-items: center;
    }
    
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border-color);
    }
    
    header nav.active { display: flex; }
    
    .menu-toggle { display: block; }
    
    .bento-grid, .grid-4,
    .steps-grid, 
    .gallery-grid, 
    .testimonials-grid, 
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .card, .step-card, .testimonial-card, .feature-card {
        padding: 1.5rem;
    }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    html { font-size: 15px; }
    
    .bento-grid, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    html { font-size: 16px; }
    
    .bento-grid, .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}