/* Theme Variables */
:root, [data-theme="dark"] {
    --bg: #0a0e1a;
    --bg-surface: #0f131f;
    --bg-surface-low: #171b28;
    --bg-surface-high: #262a37;
    --bg-surface-highest: #313442;
    --text-primary: #e4e4e7;
    --text-body: #a1a1aa;
    --text-muted: #71717a;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-container: #38bdf8;
    --accent-on-container: #001e2c;
    --tertiary: #ffc176;
    --tier-cool: #c084fc;
    --border: rgba(255, 255, 255, 0.05);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-bg: rgba(23, 27, 40, 0.6);
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-surface: #f0f2f5;
    --bg-surface-low: #ffffff;
    --bg-surface-high: #e8eaed;
    --bg-surface-highest: #d0d3d8;
    --text-primary: #18181b;
    --text-body: #52525b;
    --text-muted: #a1a1aa;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-container: #0284c7;
    --accent-on-container: #ffffff;
    --tertiary: #b87333;
    --tier-cool: #9333ea;
    --border: rgba(0, 0, 0, 0.06);
    --border-subtle: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(0, 0, 0, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.6);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Typography */
h1, .wordmark {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2, .section-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
}

h3, .section-heading {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
}

p {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* Gradient Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.2;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -15%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

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

/* Sticky Nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 16px 24px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .nav-container {
    background: rgba(250, 250, 250, 0.8);
}

.nav-logo {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-body);
    transition: color 0.2s ease;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent-container);
    color: var(--accent-on-container);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

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

.btn-outline:hover {
    background: var(--card-bg);
    border-color: var(--accent);
}

/* Glass Cards */
.glass-card {
    backdrop-filter: blur(12px);
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 32px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.glass-card:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 96px 0;
}

/* Hero Section */
.hero {
    padding: 160px 0 96px;
    text-align: center;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero .subheading {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero .subheading .accent-text {
    color: var(--accent);
    font-weight: 600;
}

.hero .description {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 48px;
}

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

/* Intent Engineering */
.intent-engineering {
    background: var(--bg-surface);
}

.intent-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.intent-card {
    text-align: center;
}

.intent-card h4 {
    margin-bottom: 16px;
}

.intent-card p {
    color: var(--text-body);
}

/* Statement Sections */
.clarity-statement {
    text-align: center;
    padding: 96px 0;
}

.statement-heading {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 32px;
    color: var(--text-primary);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.statement-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-body);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .clarity-statement {
        padding: 128px 0;
    }

    .statement-heading {
        font-size: 2.5rem;
    }

    .statement-body {
        font-size: 1.25rem;
    }
}

/* Deployment Model Cards */
.deployment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.tier-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.tier-card .card-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.tier-card .card-icon svg {
    width: 40px;
    height: 40px;
}

.tier-card h4 {
    margin-bottom: 16px;
}

.tier-card .description {
    margin-bottom: 20px;
}

.tier-card ul {
    list-style: none;
    margin-bottom: 24px;
}

.tier-card ul li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
    color: var(--text-body);
}

.tier-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.tier-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.tier-card.tier-warm .card-icon {
    color: var(--tertiary);
}

.tier-card.tier-warm ul li::before {
    color: var(--tertiary);
}

.tier-card.tier-cool .card-icon {
    color: var(--tier-cool);
}

.tier-card.tier-cool ul li::before {
    color: var(--tier-cool);
}

/* Tier Badge (Recommended badge for What We Do section) */
.tier-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent);
    color: var(--accent-on-container);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tier-card.tier-recommended {
    border-color: var(--accent);
}

/* Ownership Section */
.ownership {
    background: var(--bg-surface);
}

.ownership-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.ownership-text h3 {
    margin-bottom: 24px;
}

.ownership-text p + p.ownership-note {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.icon-box {
    text-align: center;
    padding: 24px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.icon-box svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 12px;
}

.icon-box p {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* How It Works - Zigzag Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
    position: relative;
}

.step-number-large {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: var(--border-subtle);
    line-height: 1;
    margin-bottom: 16px;
}

.step-content h4 {
    margin-bottom: 12px;
}

/* Case Study */
.case-study-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.case-study-image {
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    border-radius: 12px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-details h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: 32px;
}

.case-study-details h4:first-child {
    margin-top: 0;
}

.case-study-details ul {
    list-style: none;
    margin-top: 16px;
}

.case-study-details ul li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
    color: var(--text-body);
}

.case-study-details ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.case-study-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 24px;
}

.case-study-link:hover {
    color: var(--accent-hover);
}

.case-study-link + .case-study-link {
    margin-left: 28px;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.highlighted {
    border-color: var(--accent);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent);
    color: var(--accent-on-container);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card .subtitle {
    font-size: 1.125rem;
    color: var(--text-body);
    margin-bottom: 16px;
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pricing-card .note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-card ul li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 12px;
    color: var(--text-body);
}

.pricing-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

.pricing-card .infra-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pricing-card .btn {
    width: 100%;
    margin-top: auto;
}

/* Comparison Table */
.comparison {
    display: none;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 32px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.comparison-table td {
    color: var(--text-body);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table td:nth-child(2) {
    color: var(--accent);
    font-weight: 500;
}

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

details {
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 24px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

details[open] {
    background: var(--card-bg);
}

summary {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

details p {
    margin-top: 16px;
}

/* Contact CTA */
.contact-cta {
    background: var(--accent-container);
    text-align: center;
}

.contact-cta h3 {
    color: var(--accent-on-container);
}

.contact-cta p {
    color: var(--accent-on-container);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.9;
}

.contact-cta .btn {
    background: var(--accent-on-container);
    color: var(--accent-container);
}

.contact-cta .btn:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    transition: border-color 0.3s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-right a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: var(--accent);
}

/* Social Links (Inline in Nav) */
.social-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

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

/* Theme Toggle (Inline in Nav) */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-surface-high);
    transform: scale(1.05);
}

.theme-icon {
    display: block;
    line-height: 1;
}

/* Nav Left Group */
.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Home Logo */
.home-logo {
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.home-logo:hover {
    opacity: 1;
}

.home-logo img {
    width: 32px;
    height: 32px;
}

/* Responsive */
@media (min-width: 768px) {
    h1, .wordmark {
        font-size: 4.5rem;
    }

    h3, .section-heading {
        font-size: 3rem;
    }

    .container {
        padding: 0 48px;
    }

    section {
        padding: 128px 0;
    }

    .hero {
        padding: 200px 0 128px;
    }

    .hero .subheading {
        font-size: 2rem;
    }

    .hero .description {
        font-size: 1.25rem;
    }

    .intent-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 32px;
    }

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

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

    .timeline-step {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }

    .timeline-step:nth-child(even) .step-content {
        order: -1;
    }

    .timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--border-subtle);
        transform: translateX(-50%);
    }

    .case-study-content {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

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

    .nav-links {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .comparison {
        display: block;
    }

    .deployment-grid {
        gap: 32px;
    }

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

/* Mobile Menu */
@media (max-width: 767px) {
    .nav-left {
        gap: 12px;
    }

    .nav-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-primary);
        padding: 12px;
        margin: -12px 0 -12px -12px;
        min-width: 44px;
        min-height: 44px;
    }

    .social-links {
        display: none;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        flex-direction: column;
        gap: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(12px);
        border: 1px solid var(--border-subtle);
        border-radius: 8px;
        padding: 8px;
        z-index: 49;
    }

    nav.menu-open .nav-links {
        display: flex;
    }

    .nav-links a {
        padding: 12px 16px;
        border-radius: 6px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: var(--card-bg);
        color: var(--accent);
    }
}

@media (min-width: 768px) {
    .nav-menu-toggle {
        display: none;
    }
}
