/* PowderFAB Lattice Studio Landing Page CSS */

:root {
    --bg-color: #0b0d13;
    --card-bg: rgba(18, 22, 33, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-color: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --primary-glow: rgba(6, 182, 212, 0.35);
    
    --secondary: #3b82f6;
    --secondary-hover: #2563eb;
    --secondary-glow: rgba(59, 130, 246, 0.35);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Outfit', var(--font-sans);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Glow Backdrop Effects */
.glow-backdrop {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.65;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.glow-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    top: 30%;
    left: -200px;
}

.glow-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

/* Typography & Layout Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 9999px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.9rem 2.25rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--card-border);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

.btn-google {
    background: #fff;
    color: #1f2937;
    border-color: #e5e7eb;
    font-weight: 600;
    width: 100%;
}

.btn-google:hover {
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.google-logo {
    width: 18px;
    height: 18px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-text:hover {
    color: #fff;
}

/* Header & Nav */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(11, 13, 19, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.logo-text span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
    padding: 10rem 1.5rem 6rem 1.5rem;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.hero-specs {
    display: flex;
    gap: 2rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

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

.hero-preview {
    display: flex;
    justify-content: center;
}

.preview-card {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.window-bar {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.window-bar .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.window-title {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.banner-image {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Sections Global */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 2.25rem;
    color: #fff;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
}

/* Capabilities Showcase */
.features-section {
    padding: 6rem 1.5rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
}

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

.tab-btn {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    gap: 1.25rem;
}

.tab-btn i {
    font-size: 1.4rem;
    transition: var(--transition);
    color: var(--text-muted);
}

.tab-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
    transition: var(--transition);
}

.tab-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.3);
}

.tab-btn.active {
    background: rgba(6, 182, 212, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.tab-btn.active i {
    color: var(--primary);
    transform: scale(1.1);
}

.tab-btn.active h3 {
    color: #fff;
}

.features-content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.canvas-header {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.canvas-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

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

.canvas-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-weight: 700;
    text-transform: uppercase;
}

.canvas-container {
    position: relative;
    flex-grow: 1;
    min-height: 400px;
    background: #06070a;
}

#simulationCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(6, 7, 10, 0.95) 0%, rgba(6, 7, 10, 0.8) 70%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    pointer-events: none;
}

.canvas-overlay p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 580px;
}

/* Download Wall */
.download-section {
    padding: 6rem 1.5rem;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.03) 0%, transparent 60%);
}

.download-container {
    max-width: 600px;
    margin: 0 auto;
}

.auth-card {
    padding: 3rem 2.5rem;
    text-align: center;
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.auth-header h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--card-border);
    z-index: 1;
}

.auth-divider span {
    background: #0f131a;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Spinner */
.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 250px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-loading p {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 500;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Unlocked Download Area */
.download-card {
    padding: 2rem 2.5rem;
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.9rem;
}

.download-body h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.download-info {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.packages-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.package-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
}

.package-item:hover {
    border-color: rgba(6, 182, 212, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.pkg-icon {
    font-size: 2.2rem;
    color: var(--primary);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(6, 182, 212, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pkg-details {
    flex-grow: 1;
}

.pkg-details h4 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.15rem;
}

.pkg-details span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
}

.pkg-details small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.download-success-toast {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
}

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

.download-success-toast i {
    font-size: 1.5rem;
    color: #22c55e;
}

.download-success-toast div strong {
    color: #fff;
    font-size: 0.85rem;
    display: block;
}

.download-success-toast div p {
    font-size: 0.78rem;
    color: #22c55e;
}

/* FAQ Section */
.faq-section {
    padding: 6rem 1.5rem;
}

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

.faq-item {
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.05rem;
    color: #fff;
    font-weight: 600;
}

.faq-arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    padding: 1.25rem 2rem 1.75rem 2rem;
    max-height: 200px;
    opacity: 1;
    border-top-color: var(--card-border);
}

.faq-answer p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--card-border);
    padding: 4rem 1.5rem;
    background: #07090d;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    width: 28px;
    height: 28px;
}

.footer-brand h2 {
    font-size: 1.05rem;
    color: #fff;
    line-height: 1;
}

.footer-brand span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.footer-copyright {
    font-size: 0.8rem;
    text-align: right;
}

/* Responsive Rules */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-specs {
        justify-content: center;
    }
    
    .features-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tab-btn {
        flex: 1 1 200px;
        max-width: 260px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .main-nav {
        display: none; /* Hide nav links on mobile for simplicity */
    }
    
    .auth-card, .download-card {
        padding: 2rem 1.5rem;
    }
    
    .package-item {
        flex-direction: column;
        text-align: center;
    }
    
    .package-item .btn {
        width: 100%;
    }
}
