/* =========================================
   CSS VARIABLES & THEME CONFIG
   ========================================= */
:root {
    /* Generated Theme 482 Palette - OpenClaw.ai */
    --primary: #ff4d4d;
    /* Coral Bright */
    --primary-rgb: 255, 77, 77;
    --primary-hover: #e63946;
    /* Coral Mid */
    --secondary: #00e5cc;
    /* Cyan Bright */
    --secondary-rgb: 0, 229, 204;
    --accent: #00e5cc;
    --accent-rgb: 0, 229, 204;

    /* Backgrounds */
    --background: #050810;
    /* bg-deep */
    --background-alt: #0a0f1a;
    /* bg-surface */
    --surface: #111827;
    /* bg-elevated */

    /* Typography Colors */
    --text: #f0f4ff;
    /* text-primary */
    --text-secondary: #8892b0;
    /* text-secondary */
    --text-muted: #5a6480;
    /* text-muted */
    --border: rgba(136, 146, 176, 0.15);
    /* border-subtle */

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout */
    --radius: 4px;
    --container: 1200px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    color-scheme: dark;
}

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

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

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-wrap: pretty;
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

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

/* =========================================
   SECTION STYLING - MANDATORY
   ========================================= */
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: var(--container);
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

.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;
}

/* =========================================
   COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* =========================================
   HEADER
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

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

header nav a:not(.btn) {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    position: relative;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--background);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(0, 229, 204, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(255, 77, 77, 0.12) 0%, transparent 60%);
    opacity: 1;
}

.hero-bg-image img {
    display: none;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--background) 0%, rgba(5, 8, 16, 0.8) 50%, rgba(5, 8, 16, 0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3rem;
    padding-top: 5rem;
}

.hero-text {
    max-width: 900px;
    margin: 0 auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 99px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

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

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* =========================================
   WAITLIST MODAL
   ========================================= */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-backdrop:not(.hidden) .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.full-width {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Success Message */
#modal-success-message {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =========================================
   FEATURES GRID
   ========================================= */
.features-grid {
    display: grid;
    gap: 2rem;
}

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

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(82, 200, 88, 0.1);
    color: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.feature-list li {
    margin-bottom: 0.5rem;
}

/* =========================================
   HOW IT WORKS
   ========================================= */
.steps-grid {
    display: grid;
    gap: 2rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.5);
}

/* =========================================
   GALLERY / SYSTEM MONITOR
   ========================================= */
.gallery-grid {
    display: grid;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
    background: #000;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.gallery-overlay span {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonials-grid {
    display: grid;
    gap: 2rem;
}

.testimonial-card {
    position: relative;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.testimonial-header h4 {
    margin: 0;
    font-size: 1rem;
}

.testimonial-header .role {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 0;
}

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

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

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

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

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

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

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

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

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

.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

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

.footer-column h4 {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

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

.footer-bottom {
    max-width: var(--container);
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

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

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

/* Circuit Animation specific styles */
.circuit-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   RESPONSIVE
   ========================================= */
/* Mobile (max 767px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        margin: 0 auto;
    }

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

    .menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
    }

    header nav.active {
        display: flex;
    }

    .features-grid,
    .steps-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 1rem auto;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) {
    html {
        font-size: 15px;
    }

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

    .features-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid,
    .gallery-grid,
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    /* Center the last 2 steps if we have 5 items in a 3-col grid */
    .steps-grid .step-card:nth-last-child(-n+2) {
        grid-column: auto;
        /* Allow natural flow, or use JS/CSS trickery if needed strictly */
    }

    /* Better fix for 5 items: 3 top, 2 bottom centered */
    .steps-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .step-card {
        flex: 0 1 calc(33.333% - 1.5rem);
        min-width: 300px;
    }

    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}