/* ============================================================
   Corrente — "Your whole home's energy, in one view"
   Instrument-panel dark theme built from the app's own energy
   language: solar amber -> clean green -> grid blue.
   ============================================================ */

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

:root {
    /* Surfaces */
    --ink: #0E140F;        /* instrument-panel base (green-tinted) */
    --panel: #161F18;      /* raised band / cards */
    --panel-2: #1E2A20;    /* cards on a panel band */
    --edge: #2A3A2D;       /* borders, dividers */

    /* Energy flow system */
    --clean: #48E08B;      /* battery / clean energy — signature accent */
    --solar: #F5B942;      /* solar generation */
    --grid: #5B9BD5;       /* grid import/export */
    --hot: #E5644D;        /* peak / high consumption */

    /* Type */
    --paper: #F4F7F5;      /* primary text */
    --muted: #9AA99F;      /* secondary text (AA on ink/panel) */

    /* Match the app: SF Pro for text, SF Mono for data */
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

    --maxw: 1040px;
    --radius: 14px;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--paper);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

a { color: var(--clean); }

img { display: block; max-width: 100%; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mono eyebrow used across sections */
.kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--clean);
}

/* Alternating band */
.band { background: var(--panel); }

/* Accessible focus */
:focus-visible {
    outline: 2px solid var(--clean);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---- Sticky nav ---- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(14, 20, 15, 0.82);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--edge);
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--paper);
    text-decoration: none;
}

.nav-brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--paper); }
.nav-link.current { color: var(--clean); }

.nav-cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--paper);
    text-decoration: none;
    border: 1px solid var(--edge);
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    transition: border-color 0.2s, color 0.2s;
}

.nav-cta:hover { border-color: var(--clean); color: var(--clean); }

/* ---- Hero ---- */
.hero {
    padding: 5rem 0 4.5rem;
    border-bottom: 1px solid var(--edge);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy .kicker { margin-bottom: 1.25rem; }

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.04;
    margin-bottom: 1.25rem;
}

.hero h1 .accent { color: var(--clean); }

.hero .lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 34ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

/* TestFlight beta badge */
.tf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: var(--clean);
    padding: 0.7rem 1.25rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tf-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(72, 224, 139, 0.25);
}

.price-line {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* ---- Signature: live energy-flow diagram (real app capture) ---- */
.hero-shot {
    justify-self: center;
    width: 100%;
    max-width: 340px;
    padding: 1.25rem;
    background:
        radial-gradient(60% 60% at 50% 45%, rgba(72, 224, 139, 0.10), transparent 70%),
        #000;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-shot img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- Spotlight: true cost ---- */
.spotlight { padding: 4.5rem 0; }

.spotlight .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.spotlight-copy .kicker { margin-bottom: 0.75rem; }

.spotlight-copy h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.spotlight-copy p {
    color: var(--muted);
    font-size: 1.1rem;
}

.spotlight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.spotlight-list li {
    color: var(--muted);
    padding: 1rem 1.15rem;
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-left: 3px solid var(--clean);
    border-radius: var(--radius);
}

.spotlight-list li span {
    color: var(--paper);
    font-weight: 600;
}

.spotlight-cta,
.pill-link {
    margin-top: 1.5rem;
}

.spotlight-cta a,
.pill-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--clean);
    text-decoration: none;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--clean);
    border-radius: 100px;
    transition: background 0.2s, color 0.2s;
}

.spotlight-cta a:hover,
.pill-link a:hover {
    background: var(--clean);
    color: var(--ink);
}

/* ---- In-development callout ---- */
.in-progress {
    padding: 4rem 0;
    text-align: center;
}

.in-progress .kicker { margin-bottom: 0.75rem; }

.in-progress h2 {
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.in-progress p {
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 0.85rem;
}

.in-progress .pill-link { margin-top: 1.75rem; }

/* Headline proof line under the spotlight, spanning both columns */
.spotlight-proof {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--ink);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
}

/* ---- Section headers ---- */
.section-head {
    text-align: center;
    margin-bottom: 2.75rem;
}

.section-head .kicker { margin-bottom: 0.75rem; }

.section-head h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
}

.section-head p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ---- Features ---- */
.features { padding: 4.5rem 0; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.feature {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--edge);
    transition: border-color 0.2s, transform 0.2s;
}

.feature:hover { border-color: var(--clean); transform: translateY(-2px); }

.feature h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--paper);
}

.feature p { color: var(--muted); }

.feature-link {
    margin-top: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.feature-link a {
    color: var(--clean);
    text-decoration: none;
}

.feature-link a:hover { text-decoration: underline; }

/* ---- Showcase: real screenshots ---- */
.showcase { padding: 4.5rem 0; }

.shot-scroller {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shot-nav {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--edge);
    background: var(--panel);
    color: var(--paper);
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.shot-nav:hover { border-color: var(--clean); background: var(--edge); }
.shot-nav:disabled { opacity: 0.35; pointer-events: none; }

@media (max-width: 640px) {
    .shot-nav { display: none; }
}

.shot-grid {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--edge) transparent;
}

.shot {
    flex: 0 0 clamp(210px, 24vw, 255px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.shot-frame {
    background: #000;
    border: 1px solid var(--edge);
    border-radius: 22px;
    padding: 0.4rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.shot-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}

.shot:hover .shot-frame {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.shot figcaption {
    color: var(--muted);
    font-size: 0.98rem;
    padding: 0 0.25rem;
}

.shot figcaption span {
    color: var(--paper);
    font-weight: 600;
}

/* ---- Supported sources ---- */
.sources {
    padding: 4.5rem 0;
    text-align: center;
}

.sources h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.sources > .container > p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 46ch;
    margin: 0 auto 2.5rem;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.source {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-left: 3px solid var(--clean);
}

.source h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--paper);
}

.source h3 a {
    color: inherit;
    text-decoration: none;
}

.source h3 a:hover { color: var(--clean); }

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

/* ---- Privacy highlight ---- */
.privacy-note band { }

.privacy-note {
    padding: 4rem 0;
    text-align: center;
}

.privacy-note h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.privacy-note p {
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 0.75rem;
    font-size: 1.05rem;
}

.privacy-note a { text-decoration: none; }
.privacy-note a:hover { text-decoration: underline; }

/* ---- Roadmap ---- */
.roadmap {
    padding: 4rem 0;
    text-align: center;
}

.roadmap h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.roadmap p {
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 0.75rem;
    font-size: 1.05rem;
}

.roadmap a { text-decoration: none; }
.roadmap a:hover { text-decoration: underline; }

/* ---- Pricing / CTA ---- */
.pricing { padding: 4.5rem 0; text-align: center; }

.pricing h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pricing p {
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto 1.75rem;
    font-size: 1.1rem;
}

.pricing .hero-actions { align-items: center; }

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--edge);
    padding: 2.5rem 0;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

footer a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}

footer a:hover { color: var(--clean); }

/* ---- Shared sub-page (about / contact / privacy) ---- */
.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem;
}

.page h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 1.75rem 0 0.75rem;
}

.page p { color: var(--muted); margin-bottom: 1rem; }

.page a { color: var(--clean); text-decoration: none; }
.page a:hover { text-decoration: underline; }

.page section { margin-bottom: 0.5rem; }

/* Pill so it never reads as part of the heading or kicker that follows it. */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: 999px;
    transition: border-color 0.2s, color 0.2s;
}

.back-link:hover {
    color: var(--clean);
    border-color: var(--clean);
}

.page .back-link { color: var(--muted); }
.page .back-link:hover { color: var(--clean); text-decoration: none; }

.page-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--edge);
    margin-bottom: 1.5rem;
}

/* ---- Showcase footer link ---- */
.showcase-more {
    text-align: center;
    margin-top: 3rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.showcase-more a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--clean);
    border-radius: 100px;
    color: var(--clean);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.showcase-more a:hover {
    background: var(--clean);
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(72, 224, 139, 0.25);
}

/* ---- Feature detail page (long screenshot) ---- */
.feature-hero .container { grid-template-columns: 1fr; }
.feature-hero .hero-copy { max-width: none; }
.feature-hero .hero-copy .lead { max-width: none; }
/* Back link and kicker are both small mono text — keep them clearly apart. */
.feature-hero .back-link { margin-bottom: 2.25rem; }

.feature-hero .hero-copy .kicker {
    display: block;
    margin-bottom: 1rem;
}

.feature-detail { padding: 4rem 0 4.5rem; }

.feature-detail .container {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 340px);
    gap: 3.5rem;
    align-items: start;
}

.detail-block { margin-bottom: 2.25rem; }
.detail-block .kicker { margin-bottom: 0.5rem; }

.detail-block h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-block p { color: var(--muted); }

.detail-source {
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.detail-source a { text-decoration: none; }
.detail-source a:hover { text-decoration: underline; }

.detail-shot {
    position: sticky;
    top: 2rem;
    justify-self: center;
    width: 100%;
    padding: 1rem;
    background:
        radial-gradient(60% 45% at 50% 30%, rgba(72, 224, 139, 0.10), transparent 70%),
        #000;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.detail-shot img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ---- Side-by-side comparison ---- */
.compare { padding: 4.5rem 0; }

.compare-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.compare-card {
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 1rem;
}

.compare-shot {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.compare-shot.light { background: #fff; }

.compare-shot img { width: 100%; height: auto; }

.compare-card figcaption span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--clean);
    margin-bottom: 0.5rem;
}

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

.compare-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
    background: var(--ink);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
}

.sum-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.sum-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sum-value {
    font-family: var(--font-mono);
    font-size: 1.65rem;
    color: var(--paper);
}

.sum-value.grid { color: var(--grid); }
.sum-value.clean { color: var(--clean); }

.sum-op {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--muted);
}

.compare-note {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .compare-grid { grid-template-columns: 1fr; }

    .feature-detail .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .detail-copy { order: 1; }

    .detail-shot {
        order: 2;
        position: static;
        max-width: 320px;
    }

    .hero {
        padding: 3.5rem 0 3rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-copy { order: 2; }
    .hero-shot { order: 1; max-width: 300px; }

    .hero .lead { max-width: none; }

    .spotlight .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .features,
    .pricing,
    .sources,
    .roadmap,
    .privacy-note { padding: 3rem 0; }
}
