/* Custom Styling System for Onto IQ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #121824;
    --bg-code: #05070b;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.07);
    --glass-bg: rgba(18, 24, 36, 0.75);
    --glass-blur: blur(16px);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
}

body {
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

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

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

.btn-block {
    width: 100%;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 24px;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

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

.nav-menu a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 110px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.07) 0%, transparent 60%);
}

.hero-bg-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Common Section Header */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 56px;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

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

/* e-Book Section */
.ebook-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.ebook-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.ebook-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    text-align: left;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.ebook-content-box {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 40px;
    min-height: 480px;
    box-shadow: var(--shadow-glow);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab-pane h4 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #ffffff;
}

.tab-pane p {
    font-size: 1.02rem;
    margin-bottom: 18px;
    line-height: 1.75;
}

.tab-pane .lead-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: #ffffff;
}

.tab-pane ul {
    list-style: none;
    margin-bottom: 24px;
}

.tab-pane li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.tab-pane li::before {
    content: "➔";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-size: 0.85rem;
}

/* Info Alert Callout */
.info-alert {
    display: flex;
    gap: 16px;
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--accent-blue);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin: 32px 0;
}

.info-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.info-alert div {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-alert div strong {
    color: #ffffff;
}

/* Code Container and Formatting */
.code-container {
    background-color: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin: 24px 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.copy-code-btn {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
}

.copy-code-btn:hover {
    color: #ffffff;
}

pre {
    padding: 20px;
    overflow-x: auto;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #38bdf8; /* light blue */
}

/* 3-Day Challenge Section */
.challenge-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.challenge-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: var(--transition-smooth);
}

.challenge-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}

.day-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.12);
    padding: 4px 10px;
    border-radius: 99px;
}

.challenge-card h3 {
    font-size: 1.35rem;
    margin-top: 16px;
    margin-bottom: 16px;
}

.challenge-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Hardware / Affiliates Section */
.hardware-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-purple);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #c084fc;
    margin-bottom: 6px;
}

.product-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.product-card p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.product-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--accent-purple);
    transition: var(--transition-smooth);
}

.product-link:hover {
    color: #ffffff;
}

/* Lead Capture Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 12, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-header h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 0.92rem;
}

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

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.form-group input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

/* Success Message inside modal */
.success-message {
    display: none;
    text-align: center;
}

.success-message.active {
    display: block;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    font-size: 1.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.success-message h4 {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Web Layout */
@media (max-width: 1024px) {
    .ebook-container {
        grid-template-columns: 1fr;
    }
    .ebook-tabs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .tab-btn {
        white-space: nowrap;
    }
    .hardware-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* simple burger implementation left out for size, typical responsive */
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .challenge-grid {
        grid-template-columns: 1fr;
    }
    .hardware-grid {
        grid-template-columns: 1fr;
    }
}
