*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background: #f6f7fb;
    line-height: 1.6;
    padding-top: 64px;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Nav (dark navy header) --- */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: #0b1220;
    border-bottom: 1px solid #1e293b;
}
nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
nav .logo { font-weight: 800; font-size: 1.3rem; color: #f8fafc; letter-spacing: -.02em; }
nav .logo span { color: #f59e0b; }
nav a { text-decoration: none; color: inherit; }
nav .nav-links { display: flex; gap: 32px; align-items: center; }
nav .nav-links a { font-size: .9rem; font-weight: 500; color: #94a3b8; transition: color .2s; }
nav .nav-links a:hover { color: #f59e0b; }
.nav-toggle { display: none; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 8px; font-weight: 600;
    font-size: .9rem; border: none; cursor: pointer; text-decoration: none;
    transition: all .2s;
}
.btn-primary { background: #f59e0b; color: #0b1220; }
.btn-primary:hover { background: #d97706; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.35); }
.btn-outline { background: transparent; color: #1e40af; border: 2px solid #1e40af; }
.btn-outline:hover { background: #eff6ff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* --- Hero (flat dark panel + prepaid meter visual) --- */
.hero {
    padding: 40px 0 64px;
    background: #0b1220;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(700px 420px at 88% 0%, rgba(245,158,11,.14), transparent 70%);
    pointer-events: none;
}
.hero .container {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px;
    align-items: center; position: relative;
}
.hero .kicker {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    font-size: .8rem; font-weight: 600; letter-spacing: .02em;
    background: rgba(245,158,11,.12); color: #fbbf24;
    border: 1px solid rgba(245,158,11,.35);
    margin-bottom: 22px;
}
.hero-copy { min-width: 0; }
.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #f8fafc;
}
.hero h1 span { color: #f59e0b; }
.hero .lede {
    font-size: 1.08rem; color: #cbd5e1; margin-top: 20px;
    max-width: 540px;
}
.hero .ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: nowrap; }
.hero .ctas .btn { padding: 12px 20px; font-size: .92rem; white-space: nowrap; }
.hero .ctas .btn-outline { color: #f8fafc; border-color: rgba(248,250,252,.5); }
.hero .ctas .btn-outline:hover { background: rgba(248,250,252,.08); border-color: #f8fafc; }
.hero-stats {
    display: flex; flex-wrap: wrap; margin-top: 48px; padding-top: 28px;
    border-top: 1px solid rgba(148,163,184,.22);
}
.hero-stats .stat { flex: 1; min-width: 150px; text-align: left; }
.hero-stats .stat + .stat { border-left: 1px solid rgba(148,163,184,.22); padding-left: 24px; }
.hero-stats .stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: #f59e0b; }
.hero-stats .stat span { font-size: .85rem; color: #94a3b8; }

/* --- Prepaid meter visual --- */
.hero-visual { position: relative; max-width: 400px; margin-left: auto; }
.vpm-meter {
    background: linear-gradient(180deg, #101a2e, #0b1220);
    border: 1px solid rgba(148,163,184,.3);
    border-radius: 24px; padding: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.vpm-meter .meter-brand {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    color: #94a3b8; text-transform: uppercase;
}
.vpm-meter .meter-brand .badge {
    color: #fbbf24; border: 1px solid rgba(245,158,11,.4);
    background: rgba(245,158,11,.1);
    padding: 2px 10px; border-radius: 12px;
}
.vpm-meter .meter-display {
    margin-top: 14px; background: #05090f;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 14px; padding: 18px 20px 14px; text-align: right;
}
.vpm-meter .meter-kwh {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 2.7rem; font-weight: 700; line-height: 1;
    color: #fbbf24; text-shadow: 0 0 14px rgba(251,191,36,.5);
}
.vpm-meter .meter-unit {
    margin-top: 6px; font-size: .7rem; letter-spacing: .14em;
    color: #64748b; text-transform: uppercase;
}
.vpm-meter .meter-status {
    display: flex; align-items: center; gap: 8px;
    margin-top: 14px; font-size: .8rem; color: #94a3b8;
}
.vpm-meter .meter-status .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.8);
}
.vpm-meter .meter-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.vpm-meter .key {
    padding: 11px 0; text-align: center; border-radius: 10px;
    background: rgba(248,250,252,.06); border: 1px solid rgba(148,163,184,.2);
    color: #e2e8f0; font-weight: 600; font-size: .95rem;
}
.vpm-meter .key-enter {
    grid-column: span 3; margin-top: 4px;
    padding: 10px 0; text-align: center; border-radius: 10px;
    background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.4);
    color: #fbbf24; font-size: .72rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
}
.hero-visual img { max-width: 100%; height: auto; display: block; }

/* --- Sections --- */
section { padding: 100px 0; }
section h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700; text-align: center;
    margin-bottom: 16px; color: #0f172a;
}
section .subtitle {
    text-align: center; color: #64748b;
    max-width: 600px; margin: 0 auto 60px; font-size: 1.05rem;
}

/* --- Features --- */
.features { background: #fff; }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}
.feature-card {
    padding: 32px; border-radius: 16px;
    border: 1px solid #e2e8f0; background: #f8fafc; transition: all .25s;
}
.feature-card:hover { border-color: #1d4ed8; box-shadow: 0 8px 24px rgba(30,64,175,.1); transform: translateY(-2px); }
.feature-card .icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: #eff6ff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: #0f172a; }
.feature-card p { font-size: .9rem; color: #64748b; line-height: 1.7; }

/* --- Portfolio (buildings) --- */
section .subtitle.portfolio-note { margin: 2em auto 0; }

/* --- Vending channels section --- */
.vending-img {
    display: block; max-width: 100%; height: auto;
    margin: 1.5rem auto 0;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15,23,42,.12);
}

/* --- How it Works --- */
.how-it-works { background: #eef2f8; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step {
    text-align: center; padding: 32px 20px;
}
.step .number {
    width: 48px; height: 48px; border-radius: 50%;
    background: #1e40af; color: #fff; font-weight: 700; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: .88rem; color: #64748b; }

/* --- Pricing --- */
.pricing { background: #fff; }
.pricing-slider-wrap {
    max-width: 600px; margin: 0 auto 40px;
    text-align: center;
}
.currency-toggle-wrap { text-align: center; margin-bottom: 32px; }
.pricing-slider-inner { position: relative; padding: 24px 0 8px; }
.pricing-slider-wrap input[type=range] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 3px;
    background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 60%, #f59e0b 100%);
    outline: none;
}
.pricing-slider-wrap input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 28px; height: 28px; border-radius: 50%;
    background: #fff; border: 3px solid #1e40af;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: .15s;
}
.pricing-slider-wrap input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.12); }
.pricing-slider-wrap input[type=range]::-moz-range-thumb {
    width: 28px; height: 28px; border-radius: 50%;
    background: #fff; border: 3px solid #1e40af;
    cursor: pointer;
}
.slider-marks {
    display: flex; justify-content: space-between;
    margin-top: 8px; padding: 0 10px;
}
.slider-mark {
    font-size: .8rem; color: #94a3b8; font-weight: 500;
    transition: color .2s;
}
.slider-mark.active { color: #1e40af; font-weight: 700; }
.currency-toggle {
    display: inline-flex; border-radius: 10px; overflow: hidden;
    border: 1px solid #e2e8f0; background: #fff;
}
.currency-btn {
    padding: 10px 20px; border: none; cursor: pointer;
    font-size: .85rem; font-weight: 600; font-family: inherit;
    background: #fff; color: #64748b; transition: all .2s;
}
.currency-btn:not(:last-child) { border-right: 1px solid #e2e8f0; }
.currency-btn:hover { background: #f8fafc; color: #1e40af; }
.currency-btn.active { background: #1e40af; color: #fff; }
.pricing-display {
    text-align: center; padding: 32px;
    background: linear-gradient(135deg, #eff6ff, #eef2f8);
    border-radius: 20px; border: 1px solid #bfdbfe;
    max-width: 400px; margin: 0 auto;
}
.pricing-display .tier-label { font-size: .85rem; color: #64748b; font-weight: 500; }
.pricing-display .price { font-size: 3rem; font-weight: 800; color: #0f172a; margin: 8px 0; }
.pricing-display .price span { font-size: 1.2rem; color: #64748b; font-weight: 500; }
.pricing-display .subscribers { font-size: .9rem; color: #1e40af; font-weight: 600; }
.pricing-display .perks { margin-top: 20px; list-style: none; text-align: left; }
.pricing-display .perks li {
    padding: 6px 0; font-size: .9rem; color: #475569;
    display: flex; align-items: center; gap: 8px;
}
.pricing-display .perks li::before { content: "\2713"; color: #1e40af; font-weight: 700; }
.pricing-tiers { display: flex; gap: 24px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pricing-tier {
    flex: 1; min-width: 240px; max-width: 320px;
    padding: 32px 24px; border-radius: 16px;
    border: 1px solid #e2e8f0; text-align: center;
    transition: all .25s;
    display: flex; flex-direction: column;
}
.pricing-tier:hover { border-color: #1d4ed8; }
.pricing-tier.popular {
    border-color: #1e40af; background: #eff6ff;
    position: relative; box-shadow: 0 8px 24px rgba(30,64,175,.12);
}
.pricing-tier.popular::before {
    content: attr(data-badge); position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    background: #f59e0b; color: #0b1220; padding: 4px 16px;
    border-radius: 20px; font-size: .75rem; font-weight: 700;
}
.pricing-tier .tier-name { font-size: 1rem; font-weight: 600; color: #0f172a; }
.pricing-tier .tier-price { font-size: 2.2rem; font-weight: 800; color: #0f172a; margin: 12px 0 4px; }
.pricing-tier .tier-price span { font-size: 1rem; color: #64748b; font-weight: 500; }
.pricing-tier .tier-range { font-size: .85rem; color: #64748b; margin-bottom: 20px; }
.pricing-tier ul { list-style: none; text-align: left; margin-bottom: 24px; flex: 1 0 auto; }
.pricing-tier ul li { padding: 5px 0; font-size: .85rem; color: #475569; display: flex; align-items: center; gap: 8px; }
.pricing-tier ul li::before { content: "\2713"; color: #1e40af; font-weight: 700; }
.pricing-tier .btn-primary { width: 100%; justify-content: center; }
.vp-vending-img { display: block; max-width: 100%; margin: 32px auto 0; border-radius: 8px; }
.building-card { text-align: center; padding: 24px 16px; }
.building-card h3 { margin: 0; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.cta-section .btn-outline { color: #f8fafc; border-color: rgba(248,250,252,.5); }
.cta-section .btn-outline:hover { background: rgba(248,250,252,.08); border-color: #f8fafc; }

/* --- Contact Info (centered, zebra rows) --- */
.contact-info {
    max-width: 600px; margin: 0 auto 28px;
    background: #fff;
    border: 1px solid #e2e8f0; border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.contact-info-row {
    padding: 14px 24px;
    text-align: left;
    font-size: .95rem;
    color: #1e293b;
}
.contact-info-row:nth-child(even) { background: #f8fafc; }
.contact-info-row a { color: #1d4ed8; font-weight: 500; text-decoration: none; }
.contact-info-row a:hover { text-decoration: underline; }

/* --- Contact Form --- */
.contact-form-wrap { max-width: 600px; margin: 0 auto; padding: 0 24px; }
.contact-form-title {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700; color: #0f172a; margin-bottom: 20px;
    text-align: center;
}
.form-field { margin-bottom: 20px; }
.form-field label {
    display: block; font-size: .88rem; font-weight: 600;
    color: #1e293b; margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
    width: 100%; padding: 12px 14px;
    font-family: inherit; font-size: .95rem;
    border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff; color: #1e293b;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-field input:focus,
.form-field textarea:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.15);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.contact-form .btn-primary { width: 100%; justify-content: center; }
.form-field.has-error input,
.form-field.has-error textarea { border-color: #f87171; }
.form-field.has-error input:focus,
.form-field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(248,113,113,.2); border-color: #ef4444; }
.field-error { display: block; font-size: 0.8rem; color: #dc2626; margin-top: 4px; }
.flash-contact {
    padding: 12px 16px; border-radius: 8px; font-size: 0.9rem;
    margin-bottom: 16px; text-align: center;
}
.flash-contact-success { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.flash-contact-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.pow-progress { text-align: center; padding: 0.5rem 0; }
.pow-progress-bar {
    height: 6px; background: #e2e8f0; border-radius: 3px;
    overflow: hidden; margin-bottom: 8px; position: relative;
}
.pow-progress-bar::after {
    content: ''; display: block; height: 100%; width: 30%;
    background: linear-gradient(90deg, #1d4ed8, #f59e0b);
    border-radius: 3px; position: absolute;
    animation: pow-indeterminate 1.5s ease-in-out infinite;
}
@keyframes pow-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(430%); }
}
.pow-progress-text { font-size: 0.85rem; color: #64748b; }
.contact-success {
    padding: 24px; border-radius: 12px;
    background: #eff6ff; border: 1px solid #bfdbfe;
    color: #1e40af; font-size: .95rem; text-align: center;
}

/* --- Code + Gallery nodes --- */
.code-title { margin-bottom: .5rem; font-size: 1.1rem; color: #0f172a; }
.code-block {
    background: #0b1220; color: #e2e8f0; padding: 1rem;
    border-radius: 8px; overflow-x: auto; font-size: .85rem;
}
.gallery-title { margin-bottom: 1rem; text-align: center; color: #0f172a; }
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-item { border-radius: 8px; overflow: hidden; background: #0b1220; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; }
.gallery-empty {
    padding: 2rem; background: #0b1220; border-radius: 8px; color: #64748b;
    text-align: center;
}

/* --- CTA --- */
.cta-section {
    background: linear-gradient(135deg, #0b1220 0%, #172554 100%);
    color: #fff; text-align: center;
}
.cta-section h2 { color: #fff; }
.cta-section p { color: #94a3b8; max-width: 500px; margin: 0 auto 32px; font-size: 1.05rem; }
.cta-section .btn-primary { background: #f59e0b; color: #0b1220; }
.cta-section .btn-primary:hover { background: #fbbf24; box-shadow: 0 4px 16px rgba(245,158,11,.4); }

/* --- Footer (dark navy) --- */
footer { padding: 48px 0; text-align: center; color: #94a3b8; font-size: .85rem; background: #0b1220; }
.render-time { font-size:0.75rem; color:#64748b; }

@media (max-width: 1024px) {
    /* The copy column gets too narrow for three CTAs on one line. */
    .hero .ctas { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    nav .container { position: relative; }
    .nav-toggle {
        display: flex; flex-direction: column; gap: 5px;
        background: none; border: none; cursor: pointer;
        padding: 4px; z-index: 101;
    }
    .nav-toggle span {
        display: block; width: 24px; height: 2px;
        background: #cbd5e1; border-radius: 2px;
        transition: transform .2s, opacity .2s;
    }
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    nav .nav-links {
        display: none; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: #0b1220; padding: 8px 0;
        border-bottom: 1px solid #1e293b;
        box-shadow: 0 4px 16px rgba(0,0,0,.4);
        gap: 0;
    }
    nav .nav-links a {
        padding: 14px 24px; font-size: 1rem;
        border-left: 3px solid transparent;
        transition: background .15s, border-color .15s, color .15s;
    }
    nav .nav-links a:hover,
    nav .nav-links a:active {
        background: rgba(245,158,11,.1);
        border-left-color: #f59e0b;
        color: #fbbf24;
    }
    nav .nav-links.open { display: flex; }
    .hero .container { grid-template-columns: 1fr; }
    .hero h1 { font-size: clamp(1.4rem, 6vw, 2rem); overflow-wrap: break-word; hyphens: auto; }
    .hero .lede { font-size: 0.95rem; line-height: 1.55; overflow-wrap: break-word; }
    .hero .ctas { flex-wrap: wrap; }
    .hero-stats .stat { min-width: 45%; }
    .hero-stats .stat + .stat { border-left: none; padding-left: 0; }
    .hero-stats .stat strong { font-size: 1.2rem; }
    .hero-visual { max-width: 100%; margin-left: 0; }
    .pricing-tiers { flex-direction: column; align-items: center; }
}

/* --- Content column layouts --- */
.section-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.section-flow.section-layout-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-flow.section-layout-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-flow.section-layout-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-copy + .section-flow { margin-top: 2rem; }
.section-copy > :last-child { margin-bottom: 0; }
.hero .section-copy:only-child,
.hero .section-flow:only-child { grid-column: 1 / -1; }
@media (max-width: 760px) {
    .section-flow.section-layout-columns-2,
    .section-flow.section-layout-columns-3,
    .section-flow.section-layout-columns-4 { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
}

/* Codebox render failures use a theme-owned class, never inline styles. */
.codebox-error { padding: 1rem; background: #fff5f5; border: 1px solid #fcc; color: #c33; border-radius: 6px; }
