/* Modern Reset */
:root {
    --bg-dark: #0a0e17; /* Deep slate black */
    --bg-card: #141b2d;
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --accent-primary: #00f3ff; /* Neon Cyan */
    --accent-secondary: #7b2cbf; /* Deep Purple */
    --accent-glow: rgba(0, 243, 255, 0.5);
    --border-color: #2d3748;
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 1200px;
    --header-height: 80px;
}

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

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

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #00a8ff);
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 243, 255, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.full-width {
    width: 100%;
    text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
}

/* Header */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

.nav-links a:hover {
    color: var(--accent-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    left: 0;
    transition: 0.3s;
}

.mobile-menu-btn span:first-child { top: 0; }
.mobile-menu-btn span:last-child { bottom: 0; }

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 100px;
    background: radial-gradient(circle at top right, rgba(0, 243, 255, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(123, 44, 191, 0.08), transparent 40%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 480px;
}

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

.hero-visual {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.hero-visual img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Sections General */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

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

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

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

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: rgba(0, 243, 255, 0.1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

/* Use Cases */
.use-cases {
    background: linear-gradient(180deg, var(--bg-dark), #0f1422);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.use-case-item {
    background: var(--bg-card);
    height: 200px;
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Background image styles */
.use-case-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.5s ease;
    opacity: 0.6; /* Slight transparency to blend with background if needed, or remove if images are pre-darkened */
}

.use-case-item:hover .use-case-bg {
    transform: scale(1.05);
    opacity: 0.8;
}

.use-case-content {
    padding: 24px;
    width: 100%;
    background: linear-gradient(to top, rgba(10, 14, 23, 0.95), rgba(10, 14, 23, 0.4));
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.use-case-content h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.use-case-content p {
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* API Section */
.api-section {
    padding: 100px 0;
}

.api-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.api-info h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.api-steps {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
}

.step-num {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.2rem;
    background: rgba(0, 243, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
}

.api-code-window {
    background: #1e1e1e; /* Classic dark code theme bg */
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: var(--font-mono);
    border: 1px solid #333;
}

.window-header {
    background: #252526;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.filename {
    margin-left: 10px;
    color: #999;
    font-size: 0.8rem;
}

.code-content, .response-content {
    padding: 20px;
    color: #d4d4d4;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
}

.response-content {
    border-top: 1px solid #333;
    background: #181818;
}

.response-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

pre { margin: 0; }
code { font-family: inherit; }

/* Pricing */
.pricing-card {
    background: var(--bg-card);
    max-width: 450px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.pricing-header {
    margin-bottom: 30px;
}

.pricing-header h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.pricing-header .price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pricing-header .period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-features {
    text-align: left;
    margin-bottom: 40px;
}

.pricing-features li {
    margin-bottom: 16px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-features li span {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Contact */
.contact-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    margin-top: 60px;
}

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

.footer-logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.copyright {
    color: #64748b;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

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

    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    .api-layout {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Add mobile menu JS toggle later */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Rotating Text Effect */
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.rotating-words {
    display: inline-grid;
    grid-template-columns: 1fr;
    height: 1.2em; /* Approximate height of one line */
    overflow: hidden;
    position: relative;
    vertical-align: bottom;
    color: var(--accent-primary);
    margin-left: 0;
}

.rotating-words span {
    grid-area: 1 / 1;
    animation: rotate-word 6s linear infinite;
    opacity: 0;
    transform: translateY(100%);
    display: block;
    white-space: nowrap;
}

/* 
   Animation Timing Logic:
   3 words total. Total duration = 6s.
   Each word gets 2s cycle.
   
   Word 1: 0s - 2s (visible 0-1.7s)
   Word 2: 2s - 4s (visible 2-3.7s)
   Word 3: 4s - 6s (visible 4-5.7s)
*/

.rotating-words span:nth-child(1) {
    animation-delay: 0s;
}

.rotating-words span:nth-child(2) {
    animation-delay: 2s;
}

.rotating-words span:nth-child(3) {
    animation-delay: 4s;
}

@keyframes rotate-word {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    5% {
        opacity: 1;
        transform: translateY(0);
    }
    28% { /* Stay visible */
        opacity: 1;
        transform: translateY(0);
    }
    33% { /* Start exit */
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Adjustments for mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        justify-content: center;
    }
}
