:root {
    --bg-color: #ffffff;
    --card-bg: #f8fafc;
    --card-border: #e2e8f0;
    --accent-green: #2e7d32;
    --accent-green-hover: #1b5e20;
    --accent-cyan: #0e7490;
    --text-main: #0f172a;
    --text-muted: #334155;
    --text-on-dark: #e2e8f0;
    --header-dark: #0b0f17;
    --rail: 1280px;
    --page-gutter: clamp(20px, 4vw, 48px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent-green);
}

/* Header */

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 10;
}

body.legal header {
    position: relative;
    background-color: var(--header-dark);
}

.header-inner {
    max-width: var(--rail);
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem var(--page-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.brand-text {
    font-family: 'Inter', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    padding-bottom: 0.1rem;
}

.brand-text .highlight {
    color: var(--accent-green);
}

.logo img {
    height: 64px;
    width: auto;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.site-nav a:not(.btn) {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
    color: #86efac;
}

/* Buttons */

.btn,
.btn-sm {
    display: inline-block;
    min-width: 140px;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn::before,
.btn-sm::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 50%);
    border-radius: 9999px;
    pointer-events: none;
}

.btn:hover,
.btn-sm:hover {
    box-shadow: 0 0 30px rgba(46, 125, 50, 0.8);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Hero */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(82vh, 820px);
    padding: 8.5rem 0 6.5rem;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--rail);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg picture,
.hero-bg img {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-bg img {
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(11, 15, 23, 0.6), rgba(11, 15, 23, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1rem;
}

.hero-left .btn {
    align-self: flex-start;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--accent-green);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-on-dark);
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Capabilities */

.gradient-section {
    padding: 4.5rem 0;
    background: linear-gradient(90deg, #ffffff 0%, var(--accent-green) 100%);
}

.section-inner {
    max-width: var(--rail);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.section-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.capabilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.card.glass-morphic {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.card:hover,
.card.glass-morphic:hover {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(46, 125, 50, 0.35);
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.25);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.tech-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-top: 1rem;
    display: block;
}

/* How It Works */

.process {
    padding: 4.5rem 0;
    text-align: center;
    background-color: #000000;
}

.process .section-inner {
    text-align: center;
}

.process h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-green);
}

.process > .section-inner > p,
.process-lede {
    font-size: 1.1rem;
    color: var(--text-on-dark);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.process-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    margin-top: 4rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
}

.step-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.step-row-reverse {
    grid-template-columns: 2fr 1fr;
}

.step-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, border 0.3s ease, transform 0.3s ease;
}

.step-text:hover {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.25);
    transform: translateY(-2px);
}

.step-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-image picture,
.step-image img {
    width: 100%;
    height: auto;
    display: block;
}

.step-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.12);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--accent-green);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.step-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #86efac;
}

.step-text p {
    font-size: 0.95rem;
    color: var(--text-on-dark);
}

/* Demo invite at end of How It Works */

.demo-invite {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
    text-align: left;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
}

.demo-invite picture,
.demo-invite img {
    width: 100%;
    display: block;
}

.demo-invite img {
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.demo-invite h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    color: #86efac;
    margin-bottom: 0.75rem;
}

.demo-invite p {
    color: var(--text-on-dark);
    margin-bottom: 1.25rem;
}

/* Tech badges */

.tech-badges {
    padding: 3.5rem 0;
    text-align: center;
    background: linear-gradient(90deg, #ffffff 0%, var(--accent-green) 100%);
}

.tech-badges h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.badges-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 9999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */

footer {
    padding: 2.5rem 5%;
    text-align: center;
    border-top: 1px solid var(--card-border);
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: var(--card-bg);
    margin-top: auto;
}

footer a {
    color: var(--accent-green);
    text-decoration: none;
}

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

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
}

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

/* Legal pages */

.legal-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 20px 4rem;
}

.legal-main h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.legal-main .updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.legal-main p {
    margin-bottom: 1rem;
}

/* Solar demo page */

.demo-hero {
    position: relative;
    padding: 9rem 0 4.5rem;
    background-color: var(--header-dark);
}

.demo-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--accent-green);
    margin-bottom: 1.25rem;
}

.demo-hero p {
    font-size: 1.15rem;
    color: var(--text-on-dark);
    max-width: 720px;
}

.demo-section {
    padding: 4.5rem 0;
}

.demo-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.demo-section p,
.demo-section li {
    color: var(--text-muted);
}

.demo-section.dark {
    background: #000000;
}

.demo-section.dark h2 {
    color: var(--accent-green);
}

.demo-section.dark p,
.demo-section.dark li,
.demo-section.dark figcaption {
    color: var(--text-on-dark);
}

.demo-section.gradient {
    background: linear-gradient(90deg, #ffffff 0%, var(--accent-green) 100%);
}

.demo-section.gradient > .section-inner > p {
    color: var(--text-main);
    max-width: 720px;
}

.service-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.service-points article {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
}

.service-points h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.class-grid figure {
    margin: 0;
}

.class-grid img {
    width: 100%;
    border-radius: 8px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #111827;
}

.class-grid figcaption {
    margin-top: 0.75rem;
    text-align: left;
}

.class-grid figcaption strong {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #86efac;
    margin-bottom: 0.25rem;
}

.labeled-output {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 1.5rem;
}

.labeled-output img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.pipeline-recap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

.pipeline-recap article {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 1.25rem;
}

.pipeline-recap h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: var(--text-main);
}

.demo-cta {
    text-align: center;
}

.demo-cta p {
    margin-bottom: 1.25rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        row-gap: 0.65rem;
    }

    .logo img {
        height: 44px;
    }

    .brand-text {
        font-size: 1.35rem;
    }

    .hero {
        min-height: 0;
        padding: 7.5rem 0 3.5rem;
    }

    .demo-hero {
        padding: 7.5rem 0 3.5rem;
    }

    .hero-content,
    .step-row,
    .step-row-reverse,
    .demo-invite,
    .labeled-output {
        grid-template-columns: 1fr;
    }

    .class-grid,
    .pipeline-recap {
        grid-template-columns: 1fr;
    }

    .process-steps,
    .steps-grid {
        gap: 2.5rem;
        margin-top: 2rem;
    }

    .demo-invite {
        margin-top: 2.5rem;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1.15rem;
    }

    .logo img {
        height: 36px;
    }

    .site-nav {
        gap: 0.75rem;
    }

    .site-nav a:not(.btn) {
        font-size: 0.85rem;
    }

    .btn,
    .btn-sm {
        min-width: 0;
        padding: 0.45rem 0.9rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
