/* Main Stylesheet */
@import 'variables.css';
@import 'components.css';

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark-900);
    background-image:
        radial-gradient(at 0% 0%, rgba(120, 100, 255, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(50, 50, 100, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
}

/* LAYOUT */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    display: inline;
}

.logo-highlight {
    color: var(--color-primary);
    position: relative;
    left: -0.02em;
}

.beta-tag {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(238, 90, 36, 0.3);
}

.promo-banner {
    background: linear-gradient(90deg, rgba(120, 100, 255, 0.1), rgba(120, 100, 255, 0.05));
    border: 1px solid rgba(120, 100, 255, 0.2);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px 16px;
    text-align: center;
    border-radius: var(--radius-full);
    margin: 0 auto 10px auto;
    max-width: fit-content;
    animation: fadeIn 1s ease-out;
}

.promo-banner span {
    margin-right: 5px;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-fast);
}

.desktop-nav a:hover {
    color: var(--text-main);
}

.desktop-nav a.btn {
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile Nav Overlay */
.mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 20px;
    right: 20px;
    width: auto;
    background: var(--bg-dark-800);
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    border-radius: var(--radius-md);
    animation: fadeInMenu 0.2s ease-out;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav a {
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-fast);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav a:hover {
    color: var(--text-main);
}

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

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

/* HERO SECTION */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 0 120px 0;
    min-height: auto;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #adaeff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

/* SCROLL REVEAL SECTIONS */
.scroll-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    padding: 80px 0;
    margin-top: 120px;
    border-top: 1px solid var(--border-color);
}

.scroll-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-main);
}

/* FEATURES / PRICING GRID */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* TRUST BAR */
.trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
    animation: fadeIn 1.5s ease-out;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.8;
    transition: var(--transition-fast);
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.trust-badge:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.trust-badge i {
    font-size: 1.1rem;
}

.trust-badge.grade-a i { color: #10b981; } /* Green */
.trust-badge.ssl i { color: #3b82f6; } /* Blue */
.trust-badge.aws i { color: #f59e0b; } /* Orange */

/* DEVELOPER API SECTION - Side by Side */
.developer-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
}

.api-text {
    flex: 1;
    min-width: 280px;
}

.api-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.api-text strong {
    color: var(--text-main);
}

.api-code {
    flex: 1.5;
    min-width: 400px;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .developer-container {
        flex-direction: column;
    }

    .api-code {
        min-width: 0;
        width: 100%;
    }
}

.code-block {
    background: var(--bg-dark-800);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #a5b3ce;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.code-tabs-row {
    display: flex;
    gap: 15px;
    padding: 12px 15px 12px 20px;
    border-bottom: 1px solid #333;
    background: var(--bg-dark-800);
    position: sticky;
    top: 0;
    z-index: 5;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    align-items: center;
}

.code-content {
    padding: 15px 20px 20px 20px;
    max-height: 300px;
    overflow: auto;
}

.code-content pre {
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .code-block {
        font-size: 0.75rem;
    }
    
    .code-content pre {
        font-size: 0.7rem;
    }
    
    .code-tabs-row {
        padding: 10px 45px 10px 15px;
        gap: 10px;
    }
    
    .code-tab {
        font-size: 0.85rem;
    }
}

.copy-code-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    flex-shrink: 0;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.code-tab {
    cursor: pointer;
    color: #5c6370;
    transition: var(--transition-fast);
}

.code-tab.active {
    color: #61afef;
    font-weight: bold;
}

.code-keyword {
    color: #c678dd;
}

.code-string {
    color: #98c379;
}

.code-function {
    color: #61afef;
}

.code-comment {
    color: #5c6370;
}

/* REDIRECT SCREEN */
#redirect-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark-900);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* FOOTER */
footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* MOBILE */
@media (max-width: 768px) {
    .hero-section {
        padding: 20px 0 80px 0;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .promo-banner {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-bottom: 8px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 12px 15px;
    }
    
    .trust-bar {
        gap: 15px;
        margin-top: 30px;
    }
    
    .trust-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}