body{
    margin: 0;
}

html{
    scroll-behavior: smooth;
}


a:link{
    text-decoration: none!important;
    -webkit-tap-highlight-color: transparent;
}

.img{
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.copy-contact{
    cursor: pointer;
}

.hidden {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(100%);
    transition: all 0.80s;
}

.show {
    opacity: 1;
    filter: blur(0px);
    transform: translateX(0%);
}

.logo:nth-child(1) {
    transition-delay: 0ms ;
}

.logo:nth-child(2) {
    transition-delay: 200ms ;
}

.logo:nth-child(3) {
    transition-delay: 300ms ;
}

.logo:nth-child(4) {
    transition-delay: 400ms ;
}

.logo:nth-child(5) {
    transition-delay: 500ms ;
}
.logo:nth-child(6) {
    transition-delay: 5600ms ;
}

.logo:nth-child(7) {
    transition-delay: 700ms ;
}











/*DESKTOP VIEW ONLY*/
.desktop{
    width: 100%;

    .top-blur{
        width: 100%;
        height: 300px;
        background-color: rgb(255, 255, 255);
        position: fixed;
        -webkit-backdrop-filter: blur(15px);
        
        /* Mask controls the visibility of the blur effect layer */
        mask-image: linear-gradient(to bottom, transparent 0%, black 100%);

        -webkit-mask-image: linear-gradient(to top, transparent 0%, black 100%);
    }

    .nav-bar{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 80px;
        display: flex;
        justify-content: center;
        align-items: end;
        z-index: 10;

        .item-container{
            width: 90%;
            height: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;

            .logo{
                position: relative;
                z-index: 2;
                width: auto;
                height: 14px;
                object-fit: contain;
            }

            .nav-group{
                display: flex;
                align-items: center;
                gap: 30px;

                .text-container{
                    display: flex;
                    gap: 30px;
                    text-decoration: none;

                    .nav-item{
                        position: relative;
                    }

                    .nav-title{
                        position: relative;
                        z-index: 2;
                        color: rgb(0, 0, 0);
                        font-family: inter;
                        font-size: 13px;
                        padding-bottom: 4px;
                    }
                }

                .nav-link{
                    position: relative;
                    z-index: 2;
                    color: rgb(0, 0, 0);
                    font-family: inter;
                    font-size: 13px;
                    padding-bottom: 4px;
                }

                &:has(.nav-item:hover) ~ .mega-panel{
                    opacity: 1;
                    visibility: visible;
                    clip-path: inset(0 0 0% 0);
                }
            }

            .schedule-btn{
                position: relative;
                z-index: 2;
                background-color: rgb(0, 0, 0);
                box-sizing: border-box;
                padding-left: 26px;
                padding-right: 26px;
                height: 34px;
                display: flex;
                justify-content: center;
                align-items: center;

                color: rgb(255, 255, 255);
                font-family: inter;
                font-size: 13px;
                border-radius: 4px;
                font-weight: 500;
            }

            .nav-overlay{
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.1);
                -webkit-backdrop-filter: blur(8px);
                backdrop-filter: blur(8px);
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
                transition: opacity 0.3s ease, visibility 0.3s;
                z-index: 0;
            }

            &:has(.nav-item:hover, .mega-panel:hover) .nav-overlay{
                opacity: 1;
                visibility: visible;
            }

            .mega-panel{
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                box-sizing: border-box;
                background-color: rgba(255, 255, 255, 0.97);
                -webkit-backdrop-filter: blur(20px);
                backdrop-filter: blur(20px);
                box-shadow: 0 20px 40px rgba(0, 0, 0, 0.10);
                opacity: 0;
                visibility: hidden;
                clip-path: inset(0 0 100% 0);
                transition: opacity 0.3s cubic-bezier(0.28, 0.11, 0.32, 1), clip-path 0.3s cubic-bezier(0.28, 0.11, 0.32, 1), visibility 0.3s;
                z-index: 1;

                &:hover{
                    opacity: 1;
                    visibility: visible;
                    clip-path: inset(0 0 0% 0);
                }

                .mega-panel-inner{
                    width: 90%;
                    margin: 0 auto;
                    box-sizing: border-box;
                    padding: 120px 0 40px;
                    overflow: hidden;
                    transition: height 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
                }

                .mega-content{
                    display: none;
                    gap: 132px;
                    transition: opacity 0.3s ease;
                }

                .mega-content.active{
                    display: flex;
                    opacity: 1;
                }

                .mega-col{
                    display: grid;
                    gap: 6px;
                    align-content: start;

                    .mega-heading{
                        font-family: inter;
                        font-weight: 400;
                        font-size: 12px;
                        color: #7D8187;
                        margin-bottom: 4px;
                    }

                    .mega-link{
                        display: block;
                        font-family: inter;
                        font-weight: 400;
                        font-size: 12px;
                        color: #1A1A1A;
                        transition: color 0.2s ease, transform 0.2s ease;
                    }

                    .mega-link:hover{
                        color: #757575;
                        text-decoration: underline;
                    }
                }

                .mega-col:first-child{
                    .mega-heading{
                        font-size: 12px;
                        font-weight: 400;
                        letter-spacing: normal;
                        text-transform: none;
                        color: #7D8187;
                        margin-bottom: 0px;
                    }

                    .mega-link{
                        font-size: 26px;
                        font-weight: 500;
                    }
                }
            }
        }
    }



    .bottom-content{
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: start;
        padding-top: 82px;
        padding-left: 100px;
        padding-right: 100px;
        padding-bottom: 32px;

        .flex-box{
            width: fit-content;
            height: auto;
            box-sizing: border-box;
            padding-top: 0;
            display: flex;
            gap: 82px;

            .text-container{
                width: fit-content;
                height: auto;

                .title{
                    font-family: inter;
                    font-weight: 500;
                    font-size: 11px;
                    letter-spacing: -0.03em;
                    color: #000000;
                    margin-bottom: 12px;
                }

                .title-spaced{
                    margin-top: 42px;
                }

                .title2{
                    font-family: inter;
                    font-weight: 500;
                    font-size: 12px;
                    color: #ADADAD;
                }

                .grid-box{
                    display: grid;
                    gap: 12px;

                    .link{
                        display: grid;
                        gap: 12px;

                        .details{
                            font-family: inter;
                            font-weight: 400;
                            font-size: 12px;
                            margin-top: 0px;
                            color: #757575;
                            transition: color 0.2s ease;
                            letter-spacing: -0.03em;
                        }

                        .title3{
                            font-family: inter;
                            font-weight: 500;
                            font-size: 12px;
                            color: #000000;
                            text-decoration: solid underline;
                        }
                    }

                    a:hover .details{
                        color: #757575;
                        text-decoration: underline;
                    }
                }

                .footer-nav{
                    display: grid;
                    gap: 12px;

                    .footer-link{
                        font-family: inter;
                        font-weight: 400;
                        font-size: 12px;
                        color: #757575;
                        transition: color 0.2s ease, transform 0.2s ease;
                    }

                    .footer-link:hover{
                        color: #000000;
                        transform: translateX(4px);
                    }
                }
            }
        }

        .bottom-bar{
            width: 90%;
            margin-top: 200px;

            .bottom-divider{
                width: 100%;
                height: 1px;
                background-color: #E5E5E7;
                margin-bottom: 24px;
            }

            .copyright{
                font-family: inter;
                font-weight: 400;
                font-size: 12px;
                color: #ADADAD;
            }
        }
    }
}

body.menu-open{
    overflow: hidden;
}





[hidden]{
    display: none !important;
}

/* ===== HOW SOLAR PANELS WORK (simulation.js) ===== */

.sim-page{
    --sim-text: #1A1A1A;
    --sim-muted: #6E6E73;
    --sim-subtle: #7D8187;
    --sim-border: #E5E5E7;
    --sim-surface: #F5F5F7;
    --sim-card: #FFFFFF;
    --sim-accent: #1A1A1A;
    --sim-on-accent: #FFFFFF;
    --sim-solar: #FFB547;
    --sim-battery: #4ADE80;
    --sim-import: #8FB3FF;

    width: min(1100px, 90%);
    margin: 0 auto;
    /* Starts below the desktop nav's fixed white fade (.top-blur) so the
       heading isn't washed out, like the Schedule a Visit page. */
    padding: 270px 0 120px;
    box-sizing: border-box;
    font-family: inter;
    color: var(--sim-text);
}

.sim-hero{
    max-width: 720px;

    .sim-eyebrow{
        font-size: 13px;
        font-weight: 500;
        color: #B8720C;
    }

    .sim-title{
        margin: 6px 0 0;
        font-size: 44px;
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    .sim-intro{
        margin: 14px 0 0;
        font-size: 16px;
        line-height: 1.6;
        color: var(--sim-muted);
    }
}

.sim-h2{
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Scene + readouts + controls */
.sim-stage{
    margin-top: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
}

.sim-scene-wrap{
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #0B0D10;
}

.sim-scene{
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    font-family: inter;
}

.sim-panel-side{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sim-readouts{
    margin: 0;
    display: grid;
    gap: 8px;
}

.sim-readout{
    padding: 12px 14px;
    border-radius: 8px;
    background-color: var(--sim-surface);

    dt{
        font-size: 12px;
        color: var(--sim-subtle);
    }

    dd{
        margin: 2px 0 0;
        font-size: 24px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.01em;

        small{
            margin-left: 4px;
            font-size: 12px;
            font-weight: 500;
            color: var(--sim-subtle);
        }
    }

    .sim-readout-note{
        font-size: 12px;
        font-weight: 500;
        color: #1F9D55;
    }
}

.sim-readout-main dd{
    font-size: 32px;
}

/* "The same shade on a string inverter" comparison */
.sim-compare{
    padding: 14px;
    border: 1px solid var(--sim-border);
    border-radius: 8px;

    .sim-compare-label{
        font-size: 12px;
        color: var(--sim-subtle);
    }

    .sim-compare-value{
        margin-top: 2px;
        font-size: 22px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    .sim-compare-note{
        margin: 6px 0 0;
        font-size: 13px;
        line-height: 1.45;
        font-weight: 500;
        color: #1F9D55;
    }
}

.sim-controls{
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px 28px;
    padding: 16px;
    border-radius: 12px;
    background-color: var(--sim-surface);
}

.sim-control{
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.sim-control-label{
    font-size: 12px;
    color: var(--sim-subtle);
}

.sim-segmented{
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    border-radius: 8px;
    background-color: var(--sim-border);

    button{
        height: 34px;
        padding: 0 14px;
        border: none;
        border-radius: 6px;
        background: none;
        color: var(--sim-muted);
        font-family: inter;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;

        &[aria-checked="true"]{
            background-color: var(--sim-card);
            color: var(--sim-text);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        }
    }
}

.sim-presets{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    button{
        height: 34px;
        padding: 0 14px;
        border: 1px solid var(--sim-border);
        border-radius: 17px;
        background-color: var(--sim-card);
        color: var(--sim-text);
        font-family: inter;
        font-size: 13px;
        cursor: pointer;

        &:hover, &:focus-visible{ border-color: var(--sim-subtle); }
        &.is-active{ border-color: var(--sim-accent); background-color: var(--sim-accent); color: var(--sim-on-accent); }
    }
}

.sim-hint{
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: var(--sim-muted);

    .material-symbols-rounded{
        font-size: 18px;
        color: var(--sim-subtle);
    }
}

/* SVG scene */
.sim-sun-disc{ fill: #FFF6DC; }
.sim-horizon{ fill: #FFFFFF; opacity: 0.08; }

.sim-panel-btn{
    cursor: pointer;
    outline: none;

    &:hover .sim-panel-frame{ stroke: #FFFFFF; }
    &:focus-visible .sim-focus-ring{ stroke: #FFFFFF; }
}

.sim-panel-lines{ fill: none; stroke: #8FB0DD; stroke-opacity: 0.35; stroke-width: 1; }
.sim-panel-frame{ fill: none; stroke: #A7B0BC; stroke-width: 2; transition: stroke 0.2s ease; }
.sim-panel-shadow{ fill: #000000; opacity: 0.35; }
.sim-focus-ring{ fill: none; stroke: transparent; stroke-width: 2; stroke-dasharray: 4 4; }
.sim-shade{ fill: #05070B; transition: opacity 0.25s ease; }

.sim-inverter-body{ fill: #22262C; stroke: #4A515B; stroke-width: 1; }
.sim-led{ fill: #3BD27A; }
.sim-inverter-name{
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-anchor: middle;
    fill: #FFFFFF;
}

/* Labels: small caps on translucent pills (sized by simulation.js) */
.sim-tag text{
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-anchor: middle;
    fill: #FFFFFF;
}

.sim-tag-bg{
    fill: #0B0D10;
    fill-opacity: 0.6;
}

.sim-out-tag text{
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* Bypassed / held-back panels (string inverter) */
.sim-tag-warn .sim-tag-bg{
    fill: #B8720C;
    fill-opacity: 0.9;
}

/* Power flows: faint base line with moving glowing dots on top */
.sim-flow-base{
    fill: none;
    stroke: #FFFFFF;
    stroke-opacity: 0.18;
    stroke-width: 1.5;
}

.sim-flow{
    fill: none;
    stroke: transparent;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 0.1 14;
    transition: stroke 0.3s ease;

    &.sim-flow-on{ stroke: var(--sim-solar); }
}

/* ===== PANEL ANGLE AND DIRECTION (orientation.js) ===== */

.sim-page{
    /* Chart colours: validated pair (blue bars, orange "best" ticks). */
    --ori-bar: #2a78d6;
    --ori-best: #eb6834;
    --ori-surface: #FFFFFF;
}

.ori-views{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-width: 0;
}

.ori-view{
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;

    svg{
        display: block;
        width: 100%;
        height: auto;
        border-radius: 14px;
        font-family: inter;
    }
}

.ori-view-title{
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;

    span{
        font-weight: 400;
        color: var(--sim-subtle);
    }
}

/* Compass (top view) */
.ori-compass{
    background-color: #12161C;
    cursor: grab;
    touch-action: none;
    outline: none;

    &:active{ cursor: grabbing; }
    &:focus-visible{ box-shadow: 0 0 0 3px var(--ori-bar); }
}

.ori-dial{ fill: #1A1F26; }
.ori-ring{ fill: none; stroke: #FFFFFF; stroke-opacity: 0.08; }
.ori-tick{ stroke: #FFFFFF; stroke-opacity: 0.25; stroke-width: 1; }
.ori-tick-long{ stroke-opacity: 0.5; stroke-width: 1.5; }
.ori-cardinal{ font-size: 13px; font-weight: 700; fill: #FFFFFF; fill-opacity: 0.7; text-anchor: middle; }
.ori-sunpath{ fill: none; stroke: #FFC857; stroke-width: 1.5; stroke-dasharray: 3 4; stroke-opacity: 0.8; }
.ori-sunpath-sun{ fill: #FFE7A3; }
.ori-sunpath-label{ font-size: 10px; font-weight: 600; fill: #FFE7A3; text-anchor: middle; letter-spacing: 0.04em; }
.ori-panel-rect{ stroke: #A7B0BC; stroke-width: 1.5; }
.ori-panel-lines{ fill: none; stroke: #8FB0DD; stroke-opacity: 0.4; }
.ori-facing-line{ stroke: #FFFFFF; stroke-width: 2; stroke-opacity: 0.85; }
.ori-facing-arrow{ fill: #FFFFFF; }

/* Tilt (side view) */
.ori-ground{ fill: #22272C; }
.ori-sun-disc{ fill: #FFF6DC; }
.ori-ray{ stroke: #FFE9B0; stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.ori-roof{ stroke: #3A3F46; stroke-width: 8; stroke-linecap: round; }
.ori-side-glass{ stroke: #2F5590; stroke-width: 7; stroke-linecap: round; }
.ori-side-frame{ stroke: #A7B0BC; stroke-width: 1.5; stroke-linecap: round; opacity: 0.6; }
.ori-angle-arc{ fill: none; stroke: #FFFFFF; stroke-width: 1.5; stroke-opacity: 0.8; }
.ori-tag-bg{ fill: #0B0D10; fill-opacity: 0.6; }
.ori-tag-text{ font-size: 13px; font-weight: 700; fill: #FFFFFF; text-anchor: middle; }

/* Readouts */
.ori-best{
    font-size: 17px !important;
    line-height: 1.3;
}

.ori-verdict{
    margin: 0;
}

/* Controls */
.ori-controls{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;

    .sim-control-label{
        display: flex;
        justify-content: space-between;

        strong{
            color: var(--sim-text);
            font-weight: 600;
        }
    }

    input[type="range"]{
        width: 100%;
        accent-color: var(--ori-bar);
    }
}

.ori-select{
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--sim-border);
    border-radius: 6px;
    background-color: var(--sim-card);
    color: var(--sim-text);
    font-family: inter;
    font-size: 14px;
}

.ori-best-button{
    height: 36px;
    border: none;
    border-radius: 18px;
    background-color: var(--sim-accent);
    color: var(--sim-on-accent);
    font-family: inter;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Monthly chart */
.ori-chart-section{
    margin-top: 64px;
}

.ori-chart-head{
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.ori-legend{
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--sim-muted);

    span{
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
}

.ori-key-bar{
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background-color: var(--ori-bar);
}

.ori-key-best{
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background-color: var(--ori-best);
}

.ori-chart-wrap{
    position: relative;
    margin-top: 16px;
}

.ori-chart{
    display: block;
    width: 100%;
    height: auto;
    font-family: inter;
    overflow: visible;
}

.ori-grid{ stroke: var(--sim-border); stroke-width: 1; }
.ori-axis{ stroke: var(--sim-subtle); stroke-width: 1; }
.ori-axis-label{ font-size: 11px; fill: var(--sim-subtle); font-variant-numeric: tabular-nums; }
.ori-bar{ fill: var(--ori-bar); }
.ori-best-ring{ stroke: var(--ori-surface); stroke-width: 6; stroke-linecap: round; }
.ori-best-tick{ stroke: var(--ori-best); stroke-width: 3; stroke-linecap: round; }
.ori-hit{ fill: transparent; }
.ori-hit:hover{ fill: var(--sim-text); fill-opacity: 0.04; }

.ori-tooltip{
    position: absolute;
    transform: translate(-50%, calc(-100% - 10px));
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 8px;
    background-color: #1A1A1A;
    color: #FFFFFF;
    font-family: inter;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);

    strong{ font-size: 13px; }
}

.ori-table-toggle{
    margin-top: 12px;
    font-family: inter;
    font-size: 13px;
    color: var(--sim-muted);

    summary{ cursor: pointer; }
}

.ori-table{
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--sim-text);

    th, td{
        padding: 6px 14px 6px 0;
        border-bottom: 1px solid var(--sim-border);
        text-align: left;
    }

    thead th{ color: var(--sim-subtle); font-weight: 500; }
}

/* Three cards here (the shared .sim-steps rule assumes four). */
.sim-steps.ori-steps{
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1000px){
    .sim-steps.ori-steps{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px){
    .ori-controls{
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width:750px){
    .ori-views{
        grid-template-columns: 1fr;
    }

    .sim-page{
        @media (prefers-color-scheme: dark){
            --ori-bar: #3987e5;
            --ori-best: #d95926;
            --ori-surface: #0C0C0C;
        }
    }
}

/* ===== SAVINGS CALCULATOR (savings.js) ===== */

.calc-stage{
    margin-top: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.calc-inputs{
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px;
    border-radius: 14px;
    background-color: var(--sim-surface);
}

.calc-field{
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;

    input[type="range"]{
        width: 100%;
        accent-color: var(--ori-bar);
    }
}

.calc-label{
    font-size: 13px;
    font-weight: 600;
    color: var(--sim-text);
}

.calc-help{
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sim-muted);
}

.calc-money{
    display: flex;
    align-items: center;
    gap: 6px;
    height: 52px;
    padding: 0 14px;
    border: 1px solid var(--sim-border);
    border-radius: 8px;
    background-color: var(--sim-card);
    font-size: 24px;
    font-weight: 600;

    input{
        flex: 1;
        min-width: 0;
        border: none;
        background: none;
        color: var(--sim-text);
        font-family: inter;
        font-size: 24px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        outline: none;
        -moz-appearance: textfield;
        appearance: textfield;

        &::-webkit-inner-spin-button, &::-webkit-outer-spin-button{
            -webkit-appearance: none;
            margin: 0;
        }
    }

    &:focus-within{ border-color: var(--sim-accent); }

    .calc-suffix{
        font-size: 14px;
        font-weight: 500;
        color: var(--sim-subtle);
    }
}

.calc-segmented{
    display: flex;

    button{
        flex: 1;
        white-space: normal;
        line-height: 1.2;
        padding: 0 8px;
    }
}

.calc-kits{
    display: flex;
    align-items: center;
    gap: 12px;
}

.calc-step{
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid var(--sim-border);
    border-radius: 50%;
    background-color: var(--sim-card);
    color: var(--sim-text);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;

    &:disabled{ opacity: 0.35; cursor: default; }
}

.calc-kits-value{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 15px;
    text-align: center;

    strong{ font-size: 22px; }

    span{
        font-size: 12px;
        color: var(--sim-subtle);
    }
}

.calc-link{
    padding: 0;
    border: none;
    background: none;
    color: var(--sim-text);
    font-family: inter;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.calc-advanced{
    font-size: 13px;
    color: var(--sim-muted);

    summary{
        cursor: pointer;
        margin-bottom: 12px;
    }

    .calc-money{
        height: 44px;
        font-size: 18px;

        input{ font-size: 18px; }
    }
}

/* Results */
.calc-results{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-hero{
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: 14px;
    background-color: #0F1720;
    color: #FFFFFF;

    .calc-hero-label{
        font-size: 13px;
        color: rgba(255, 255, 255, 0.7);
    }

    .calc-hero-value{
        font-size: 44px;
        font-weight: 700;
        letter-spacing: -0.02em;
        font-variant-numeric: tabular-nums;

        small{
            font-size: 16px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.7);
        }
    }

    .calc-hero-sub{
        font-size: 14px;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.85);
    }
}

.calc-tiles{
    grid-template-columns: 1fr 1fr;
}

.calc-system{
    padding: 16px;
    border: 1px solid var(--sim-border);
    border-radius: 10px;

    .calc-system-head{
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;

        strong{
            font-size: 20px;
            font-variant-numeric: tabular-nums;
        }
    }
}

.calc-system-list{
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.6;
}

.calc-system-note{
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--sim-muted);
}

/* Payback chart */
.calc-chart-sub{
    margin: 0;
    font-size: 13px;
    color: var(--sim-muted);
}

.calc-chart{
    display: block;
    width: 100%;
    height: auto;
    font-family: inter;
    overflow: visible;
}

.calc-line{ fill: none; stroke: var(--ori-bar); stroke-width: 2.5; stroke-linejoin: round; }
.calc-area{ fill: var(--ori-bar); fill-opacity: 0.08; }
.calc-payback-dot{ fill: var(--ori-bar); stroke: var(--ori-surface); stroke-width: 2; }
.calc-payback-label{ font-size: 12px; font-weight: 600; fill: var(--sim-text); }
.calc-cross{ stroke: var(--sim-subtle); stroke-width: 1; stroke-dasharray: 3 3; }
.calc-hover-dot{ fill: var(--ori-bar); stroke: var(--ori-surface); stroke-width: 2; }

@media (max-width: 1000px){
    .calc-stage{
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width:750px){
    .calc-inputs{
        padding: 18px;
    }

    .calc-hero .calc-hero-value{
        font-size: 36px;
    }

    /* The charts scale down on phones; bigger text keeps them readable. */
    .calc-chart .ori-axis-label{
        font-size: 20px;
    }

    .calc-payback-label{
        font-size: 22px;
    }
}

/* Solar cell close-up */
.sim-cell{
    margin-top: 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;

    p{
        margin: 14px 0 0;
        font-size: 15px;
        line-height: 1.65;
        color: var(--sim-muted);

        strong{ color: var(--sim-text); }
    }
}

.sim-cell-svg{
    width: 100%;
    height: auto;
    border-radius: 12px;
    background-color: var(--sim-surface);
    font-family: inter;
}

.sim-layer-n{ fill: #3E6AA8; }
.sim-layer-p{ fill: #24497E; }
.sim-wire{ fill: none; stroke: #9AA3AF; stroke-width: 4; stroke-linejoin: round; }
.sim-bulb{ fill: #FFFFFF; stroke: #9AA3AF; stroke-width: 3; }
.sim-bulb-glow{ fill: #FFD35C; }
.sim-photon{ fill: #FFB400; }
.sim-electron{ fill: #2F7DF6; }
.sim-small{ font-size: 12px; fill: var(--sim-subtle); }

/* Steps */
.sim-steps-section{
    margin-top: 80px;

    .sim-steps-intro{
        margin: 6px 0 0;
        font-size: 14px;
        color: var(--sim-muted);
    }
}

.sim-steps{
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.sim-step{
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--sim-border);
    border-radius: 12px;
    background-color: var(--sim-card);
    color: var(--sim-text);
    font-family: inter;
    text-align: left;

    .sim-step-num{
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: var(--sim-solar);
        color: #1A1A1A;
        font-size: 13px;
        font-weight: 700;
    }

    .sim-step-title{
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
    }

    .sim-step-text{
        font-size: 13px;
        line-height: 1.5;
        color: var(--sim-muted);
    }
}

/* Call to action */
.sim-cta{
    margin-top: 80px;
    padding: 40px;
    border-radius: 16px;
    background-color: var(--sim-surface);
    text-align: center;

    p{
        margin: 10px auto 0;
        max-width: 560px;
        font-size: 15px;
        line-height: 1.6;
        color: var(--sim-muted);
    }

    .sim-cta-button{
        display: inline-flex;
        margin-top: 20px;
        padding: 12px 22px;
        border-radius: 6px;
        background-color: var(--sim-accent);
        color: var(--sim-on-accent);
        font-size: 15px;
        font-weight: 500;
    }

    .sim-footnote{
        margin-top: 24px;
        font-size: 12px;
        color: var(--sim-subtle);
    }
}

@media (max-width: 1000px){
    .sim-stage{
        grid-template-columns: 1fr;
    }

    .sim-readouts{
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .sim-controls{
        grid-template-columns: 1fr;
    }

    .sim-steps{
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media only screen and (max-width:750px){
    .sim-page{
        width: auto;
        padding: calc(64px + env(safe-area-inset-top) + 32px) 20px 32px;

        @media (prefers-color-scheme: dark){
            --sim-text: #EBEBEB;
            --sim-muted: #A1A1A6;
            --sim-subtle: #9E9E9E;
            --sim-border: #2A2A2A;
            --sim-surface: #1A1A1A;
            --sim-card: #141414;
            --sim-accent: #EBEBEB;
            --sim-on-accent: #0C0C0C;
            color-scheme: dark;
            background-color: #0C0C0C;
        }
    }

    @media (prefers-color-scheme: dark){
        body{
            background-color: #0C0C0C;
        }
    }

    .sim-hero .sim-title{
        font-size: 32px;
    }

    .sim-h2{
        font-size: 22px;
    }

    .sim-scene-wrap{
        margin: 0 -20px;
        border-radius: 0;
    }

    /* The scene is scaled down on phones: bigger labels, and the small DC/AC
       tags hidden to keep it uncluttered. */
    .sim-tag text{
        font-size: 19px;
    }

    .sim-out-tag text{
        font-size: 24px;
    }

    .sim-segmented{
        display: flex;

        button{
            flex: 1;
            padding: 0 8px;
            white-space: normal;
            line-height: 1.2;
        }
    }

    .sim-readout dd{
        font-size: 20px;
    }

    .sim-controls{
        grid-template-columns: 1fr;
    }

    .sim-cell{
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 56px;
    }

    .sim-steps-section, .sim-cta{
        margin-top: 56px;
    }

    .sim-cta{
        padding: 28px 20px;
    }
}

@media (prefers-reduced-motion: reduce){
    .sim-flow, .sim-shade, .sim-panel-frame{
        transition: none;
    }
}

/* ===== MOBILE VIEW ===== */
/*MOBILE VIEW ONLY*/
.mobile{
    display: none;
    background-color: rgb(255, 255, 255);
    width: 100%;
    font-family: inter;
    interpolate-size: allow-keywords;

    /* Shared accordion behavior for the menu and footer <details> groups.
       Browsers that support ::details-content animate open/close; others
       just snap open, which is fine. */
    details{
        summary{
            list-style: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

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

        .chevron{
            font-size: 24px;
            transition: transform 0.3s cubic-bezier(0.28, 0.11, 0.32, 1);
        }

        &[open] .chevron{
            transform: rotate(180deg);
        }

        &::details-content{
            block-size: 0;
            overflow: hidden;
            transition: block-size 0.3s cubic-bezier(0.28, 0.11, 0.32, 1), content-visibility 0.3s allow-discrete;
        }

        &[open]::details-content{
            block-size: auto;
        }
    }

    .mobile-nav{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 0 20px;
        padding-top: env(safe-area-inset-top);
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 20;
        height: calc(64px + env(safe-area-inset-top));
        background-color: rgb(255, 255, 255);
        transition: background-color 0.3s ease;

        .mobile-logo{
            display: block;
            height: 14px;

            .img{
                width: auto;
                height: 100%;
                object-fit: contain;
                filter: brightness(0);
                transition: filter 0.3s ease;
            }
        }

        .menu{
            width: 44px;
            height: 44px;
            margin-right: -10px;
            padding: 0;
            border: none;
            background: none;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 6px;
            -webkit-tap-highlight-color: transparent;

            .menu-line{
                display: block;
                width: 20px;
                height: 1.5px;
                border-radius: 1px;
                background-color: #1A1A1A;
                transition: transform 0.3s cubic-bezier(0.28, 0.11, 0.32, 1), background-color 0.3s ease;
            }

            &.active{
                .menu-line:nth-child(1){
                    transform: translateY(3.75px) rotate(45deg);
                }

                .menu-line:nth-child(2){
                    transform: translateY(-3.75px) rotate(-45deg);
                }
            }
        }
    }

    /* Once the menu panel opens behind the nav, the bar's own background
       drops away so it blends into the panel. */
    body.menu-open & .mobile-nav{
        /* Solid, like the open menu, so the logo and X stay readable
           while the menu scrolls under them. No border. */
        background-color: #FFFFFF;

        .mobile-logo .img{
            filter: brightness(0);
        }

        .menu .menu-line{
            background-color: #1A1A1A;
        }
    }

    /* The panel is the same solid white as the nav bar and starts clipped
       to exactly the bar's height, so opening it reads as the bar itself
       extending down the screen. Its contents then fade in one by one.
       Closing runs in reverse: contents fade out first, then the panel
       retracts back into the bar. */
    .dropdown{
        --nav-height: calc(64px + env(safe-area-inset-top));
        --ease-panel: cubic-bezier(0.32, 0.72, 0, 1);

        position: fixed;
        inset: 0;
        z-index: 15;
        background-color: rgb(255, 255, 255);
        overflow-y: auto;
        overscroll-behavior: contain;
        visibility: hidden;
        clip-path: inset(0 0 calc(100% - var(--nav-height)) 0);
        transition: clip-path 0.45s var(--ease-panel) 0.12s, visibility 0s linear 0.57s;

        &.open{
            visibility: visible;
            clip-path: inset(0 0 0 0);
            transition: clip-path 0.5s var(--ease-panel), visibility 0s linear 0s;
        }

        .dropdown-inner{
            box-sizing: border-box;
            padding: 88px 24px 48px;
            padding-top: calc(88px + env(safe-area-inset-top));
            display: flex;
            flex-direction: column;

            > *{
                opacity: 0;
                transform: translateY(-8px);
                transition: opacity 0.15s ease, transform 0.15s ease;
            }
        }

        &.open .dropdown-inner > *{
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.4s ease, transform 0.4s var(--ease-panel);
        }

        &.open .dropdown-inner > :nth-child(1){ transition-delay: 0.18s; }
        &.open .dropdown-inner > :nth-child(2){ transition-delay: 0.23s; }
        &.open .dropdown-inner > :nth-child(3){ transition-delay: 0.28s; }
        &.open .dropdown-inner > :nth-child(4){ transition-delay: 0.33s; }
        &.open .dropdown-inner > :nth-child(5){ transition-delay: 0.38s; }

        @media (prefers-reduced-motion: reduce){
            &, &.open, .dropdown-inner > *, &.open .dropdown-inner > *{
                transition-duration: 0s !important;
                transition-delay: 0s !important;
            }
        }

        .menu-title{
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 0;
            font-size: 28px;
            font-weight: 500;
            letter-spacing: -0.02em;
            color: #1A1A1A;

            .chevron{
                color: #7D8187;
            }
        }

        .menu-links{
            display: grid;
            gap: 14px;
            padding: 6px 0 24px;
            margin-top: 22px;

            .menu-heading{
                margin-top: 32px;
                font-size: 12px;
                font-weight: 400;
                color: #7D8187;
            }

            /* A heading that opens the section sits flush with the top
               padding instead of adding group spacing above itself. */
            .menu-heading:first-child{
                margin-top: 0;
            }

            .menu-link{
                font-size: 15px;
                font-weight: 400;
                line-height: 1.4;
                color: #1A1A1A;
            }
        }

        .menu-cta{
            margin-top: 82px;
            height: 48px;
            border-radius: 4px;
            background-color: #1A1A1A;
            color: rgb(255, 255, 255);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 15px;
            font-weight: 500;
        }
    }


    .mobile-footer{
        box-sizing: border-box;
        padding: 40px 24px;
        margin-top: 62px;
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
        background-color: rgb(255, 255, 255);

        .mobile-footer-group{
            border-bottom: 1px solid #E5E5E7;

            .mobile-footer-title{
                display: flex;
                justify-content: space-between;
                align-items: center;
                min-height: 48px;
                font-size: 13px;
                font-weight: 500;
                letter-spacing: -0.01em;
                color: #000000;

                .chevron{
                    font-size: 20px;
                    color: #ADADAD;
                }
            }

            .mobile-footer-links{
                display: grid;
                gap: 14px;
                padding: 4px 0 20px;

                .mobile-footer-link{
                    font-size: 13px;
                    font-weight: 400;
                    color: #757575;
                }
            }
        }

        .mobile-copyright{
            margin-top: 32px;
            font-size: 12px;
            font-weight: 400;
            color: #ADADAD;
        }
    }

    /* Dark theme: same #FFFFFF -> #0C0C0C surface mapping as the home
       page's desktop mega-panel and footer. */
    @media (prefers-color-scheme: dark){
        &{
            background-color: #0C0C0C;
        }

        .dropdown{
            background-color: #0C0C0C;

            .menu-title, .menu-links .menu-link{
                color: #EBEBEB;
            }

            .menu-cta{
                background-color: #EBEBEB;
                color: #0C0C0C;
            }
        }

        .mobile-nav{
            background-color: #0C0C0C;

            .mobile-logo .img{
                filter: none;
            }

            .menu .menu-line{
                background-color: #EBEBEB;
            }
        }

        body.menu-open & .mobile-nav{
            background-color: #0C0C0C;

            .mobile-logo .img{
                filter: none;
            }

            .menu .menu-line{
                background-color: #EBEBEB;
            }
        }

        .mobile-footer{
            background-color: #0C0C0C;

            .mobile-footer-group{
                border-bottom-color: #2A2A2A;

                .mobile-footer-title{
                    color: #FFFFFF;
                }

                .mobile-footer-links .mobile-footer-link{
                    color: #9E9E9E;
                }
            }
        }
    }
}

/* Inner-page content: shared type scale used by every page below. */
.mobile{
    --m-text: #000000;
    --m-muted: #757575;
    --m-subtle: #7D8187;
    --m-border: #E5E5E7;
    --m-surface: #F5F5F7;

    .mobile-main{
        box-sizing: border-box;
        padding: calc(64px + env(safe-area-inset-top) + 40px) 24px 0;
        color: var(--m-text);
    }

    .mobile-eyebrow{
        font-size: 12px;
        font-weight: 500;
        letter-spacing: -0.01em;
        color: var(--m-subtle);
    }

    .mobile-page-title{
        margin: 6px 0 0;
        font-size: 30px;
        font-weight: 600;
        line-height: 1.15;
        letter-spacing: -0.02em;
        color: var(--m-text);
    }

    .mobile-page-meta{
        margin-top: 10px;
        font-size: 12px;
        color: var(--m-muted);
    }

    .mobile-section{
        margin-top: 40px;
    }

    .mobile-section-title{
        margin: 0;
        font-size: 17px;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -0.01em;
        color: var(--m-text);
    }

    .mobile-section-sub{
        margin-top: 4px;
        font-size: 12px;
        color: var(--m-muted);
    }

    .mobile-p{
        margin: 12px 0 0;
        font-size: 15px;
        line-height: 1.6;
        color: var(--m-muted);
        overflow-wrap: anywhere;

        a{
            color: inherit;
            text-decoration: underline !important;
        }
    }

    .mobile-divider{
        height: 1px;
        margin-top: 40px;
        background-color: var(--m-border);
    }

    .mobile-btn-row{
        display: flex;
        gap: 12px;
        margin-top: 20px;
    }

    .mobile-btn-solid, .mobile-btn-outline{
        flex: 1;
        height: 38px;
        box-sizing: border-box;
        border-radius: 4px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 12px;
        font-weight: 500;
    }

    .mobile-btn-solid{
        background-color: #1A1A1A;
        color: rgb(255, 255, 255);
    }

    .mobile-btn-outline{
        border: 1px solid var(--m-border);
        color: var(--m-text);
    }

    @media (prefers-color-scheme: dark){
        &{
            --m-text: #EBEBEB;
            --m-muted: #9E9E9E;
            --m-border: #2A2A2A;
            --m-surface: #1A1A1A;
        }

        .mobile-btn-solid{
            background-color: #EBEBEB;
            color: #0C0C0C;
        }
    }
}


@media only screen and (max-width:750px) {
    .desktop{
        display: none;
    }

    /*MOBILE VIEW ONLY*/
    .mobile{
        display: block;
    }
}

/* ===== OUR ADVOCACY ===== */

.adv-page{
    --adv-live: #1F9D55;
    /* Green strike through "greed": clean energy. */
    --adv-clean: #1F9D55;
    --adv-error: #C2410C;

    /* Black and white, like the rest of the site: no yellow accents. */
    .sim-hero .sim-eyebrow{
        color: var(--sim-subtle);
    }

    .sim-step .sim-step-num{
        background-color: var(--sim-accent);
        color: var(--sim-on-accent);
    }
}

.adv-section{
    margin-top: 72px;
}

.adv-lead{
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--sim-muted);
}

/* Why it matters */
.adv-cards{
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.adv-card{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border-radius: 14px;
    background-color: var(--sim-surface);
}

.adv-card-icon{
    font-size: 28px;
    color: var(--sim-text);
}

.adv-card-title{
    margin-top: 4px;
    font-size: 16px;
    font-weight: 600;
}

.adv-card-text{
    font-size: 14px;
    line-height: 1.6;
    color: var(--sim-muted);
}

.sim-steps.adv-pillars{
    margin-top: 24px;
}

/* How we act on it */
.adv-list{
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 40px;

    li{
        display: flex;
        gap: 14px;
        min-width: 0;
    }

    .material-symbols-rounded{
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--sim-surface);
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 22px;
    }

    strong{
        font-size: 16px;
        font-weight: 600;
    }

    p{
        margin: 4px 0 0;
        font-size: 14px;
        line-height: 1.6;
        color: var(--sim-muted);
    }

    a{
        color: var(--sim-text);
        font-weight: 500;
        text-decoration: underline !important;
    }
}

/* Impact: same counter box as the Admin page */
.adv-portfolio{
    margin-top: 24px;
    padding: 20px;
    border-radius: 14px;
    background-color: var(--sim-surface);
}

.adv-portfolio-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 16px;

    .adv-portfolio-title{
        font-size: 13px;
        font-weight: 600;
    }

    .adv-portfolio-status{
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--sim-subtle);
    }

    /* Green while live; grey when paused (tab hidden); red on errors. */
    .adv-portfolio-dot{
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: var(--adv-live);

        &.paused{ background-color: var(--sim-subtle); }
        &.error{ background-color: var(--adv-error); }
    }
}

.adv-portfolio-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.adv-portfolio-item{
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 4px 20px;

    &:first-child{ padding-left: 0; }

    & + .adv-portfolio-item{
        border-left: 1px solid var(--sim-border);
    }
}

.adv-portfolio-label{
    font-size: 12px;
    color: var(--sim-subtle);
}

.adv-portfolio-value{
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.2s ease;

    &.loading{ opacity: 0.35; }

    .portfolio-unit{
        margin-left: 4px;
        font-size: 0.5em;
        font-weight: 600;
        color: var(--sim-subtle);
    }
}

.adv-portfolio-error{
    display: none;
    margin-top: 12px;
    font-size: 12px;
    color: var(--adv-error);

    &.show{ display: block; }
}

.adv-more{
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--sim-text);

    .material-symbols-rounded{ font-size: 18px; }
}

/* Driving force quote */
.adv-quote{
    margin: 80px auto 0;
    max-width: 760px;
    text-align: center;

    p{
        margin: 0;
        font-size: 24px;
        font-weight: 500;
        line-height: 1.45;
        letter-spacing: -0.01em;
    }

    cite{
        display: block;
        margin-top: 14px;
        font-size: 13px;
        font-style: normal;
        color: var(--sim-subtle);
    }
}

@media (max-width: 1000px){
    .adv-cards{
        grid-template-columns: 1fr;
    }

    .adv-list{
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width:750px){
    .adv-page{
        @media (prefers-color-scheme: dark){
            --adv-live: #3BD27A;
            --adv-clean: #3BD27A;
            --adv-error: #F97316;
        }
    }

    .adv-section{
        margin-top: 56px;
    }

    /* 2 x 2 counters: a line between the columns and between the rows. */
    .adv-portfolio-grid{
        grid-template-columns: 1fr 1fr;
    }

    .adv-portfolio-item{
        padding: 12px 0 12px 16px;

        &:nth-child(odd){
            padding-left: 0;
            padding-right: 16px;
        }

        & + .adv-portfolio-item{ border-left: none; }
        &:nth-child(even){ border-left: 1px solid var(--sim-border); }
        &:nth-child(n+3){ border-top: 1px solid var(--sim-border); }
    }

    .adv-portfolio-value{
        font-size: 26px;
    }

    .adv-quote{
        margin-top: 56px;

        p{ font-size: 19px; }
    }
}

/* Opening: fills the first screen below the 80px nav, with a huge two-line
   headline. It pulls up over the page's 270px top padding so the text is
   centred in the visible screen, not pushed low by that padding. */
.adv-hero{
    position: relative;
    margin-top: -190px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 0;
    box-sizing: border-box;
}

.adv-hero-content{
    text-align: center;
}

.adv-hero-content > *{
    animation: adv-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.adv-hero-content > :nth-child(2){ animation-delay: 0.15s; }
.adv-hero-content > :nth-child(3){ animation-delay: 0.3s; }

.adv-hero-title{
    margin: 0;
    font-size: clamp(56px, 8.5vw, 112px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.045em;
}

.adv-hero-line{
    display: block;
}

/* A black bar drawn through "greed" just after the headline appears. */
.adv-strike{
    position: relative;
    white-space: nowrap;

    &::after{
        content: "";
        position: absolute;
        left: -0.04em;
        right: -0.04em;
        top: 54%;
        height: 0.09em;
        border-radius: 0.05em;
        background-color: var(--adv-clean);
        transform: scaleX(0);
        transform-origin: left center;
        animation: adv-strike 0.6s cubic-bezier(0.6, 0, 0.2, 1) 0.9s forwards;
    }
}

.adv-hero-sub{
    margin: 28px auto 0;
    max-width: 620px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--sim-muted);
}

/* Two equal-width columns, each as wide as the longer label, centred. */
.adv-hero-actions{
    margin-top: 162px;
    margin-inline: auto;
    width: fit-content;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.adv-btn{
    height: 44px;
    padding: 0 28px;
    box-sizing: border-box;
    border-radius: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inter;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.adv-btn-solid{
    background-color: var(--sim-accent);
    color: var(--sim-on-accent);

    &:hover{ opacity: 0.85; }
}

.adv-btn-outline{
    border: 1px solid var(--sim-border);
    color: var(--sim-text);

    &:hover{ border-color: var(--sim-text); }
}

.adv-scroll-cue{
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    color: var(--sim-subtle);
    animation: adv-bob 2s ease-in-out infinite;

    .material-symbols-rounded{ font-size: 32px; }
}

#adv-why-title{
    scroll-margin-top: 140px;
}

.adv-hero + .adv-section{
    margin-top: 40px;
}

@keyframes adv-rise{
    from{ opacity: 0; transform: translateY(18px); }
    to{ opacity: 1; transform: none; }
}

@keyframes adv-strike{
    to{ transform: scaleX(1); }
}

@keyframes adv-bob{
    0%, 100%{ transform: translate(-50%, 0); }
    50%{ transform: translate(-50%, 6px); }
}

@media (prefers-reduced-motion: reduce){
    .adv-hero-content > *, .adv-scroll-cue{
        animation: none;
    }

    .adv-strike::after{
        animation: none;
        transform: scaleX(1);
    }
}

@media only screen and (max-width:750px){
    .adv-hero{
        margin-top: 0;
        min-height: calc(100svh - 64px - env(safe-area-inset-top) - 32px);
        padding: 0 0 64px;
    }

    .adv-hero-title{
        font-size: clamp(44px, 13vw, 64px);
    }

    .adv-hero-sub{
        margin-top: 20px;
        font-size: 14px;
    }

    .adv-hero-actions{
        margin-top: 28px;
        width: 90%;

        /* Phones keep the smaller size. */
        .adv-btn{
            flex: 1;
            justify-content: center;
            height: 38px;
            padding: 0 16px;
            font-size: 12px;
        }
    }

    #adv-why-title{
        scroll-margin-top: 90px;
    }
}

/* ===== OUR PROCESS ===== */
/* Built on the Our Advocacy styles above (hero, buttons, cards, lists).
   Uses only the --sim-* tokens, so the dark theme below covers it. */

#proc-steps-title{
    scroll-margin-top: 140px;
}

#proc-design-title{
    scroll-margin-top: 140px;
}

/* Step-by-step: numbered circles joined by a vertical line. */
.proc-timeline{
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    max-width: 760px;
}

.proc-step{
    position: relative;
    display: flex;
    gap: 20px;
    padding-bottom: 36px;

    &:last-child{ padding-bottom: 0; }

    /* The line from this circle down to the next one. */
    &:not(:last-child)::before{
        content: "";
        position: absolute;
        left: 17px;
        top: 40px;
        bottom: 4px;
        width: 2px;
        border-radius: 1px;
        background-color: var(--sim-border);
    }
}

.proc-step-num{
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--sim-accent);
    color: var(--sim-on-accent);
    font-size: 14px;
    font-weight: 600;
}

.proc-step-body{
    min-width: 0;
    padding-top: 6px;

    p{
        margin: 6px 0 0;
        font-size: 15px;
        line-height: 1.6;
        color: var(--sim-muted);
    }

    a{
        color: var(--sim-text);
        font-weight: 500;
        text-decoration: underline !important;
    }
}

.proc-step-title{
    display: inline;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

/* Small pill after the title: "Free", "Within a week", "1-2 days". */
.proc-step-tag{
    float: right;
    margin-left: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background-color: var(--sim-surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--sim-muted);
    white-space: nowrap;
}

/* The two phases side by side: "Before you commit" (steps 1-4) and "After
   you say yes" (steps 5-8), each its own timeline. Stacked below 900px. */
.proc-phases{
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 56px;

    .proc-timeline{
        margin-top: 20px;
        max-width: none;
    }
}

.proc-phase-title{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    /* Same height with or without the pill, so both dividers line up. */
    min-height: 24px;
    margin: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--sim-border);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--sim-subtle);
}

/* "Free, no obligation" pill beside the first phase's title. */
.proc-phase-note{
    padding: 3px 10px;
    border-radius: 12px;
    background-color: var(--sim-surface);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--sim-muted);
}

@media (max-width: 900px){
    .proc-phases{
        grid-template-columns: minmax(0, 1fr);
    }
}

/* How we design: the OpenSolar video full width, then three points in a
   row beneath it. */
.proc-design{
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
}

.proc-video{
    position: relative;
    margin: 0;
    /* Same shape as the 1920 x 1080 recording. */
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background-color: var(--sim-surface);

    video{
        display: block;
        width: 100%;
        height: 100%;
        /* Click to pause / play (no player controls). */
        cursor: pointer;
        /* Fills the box edge to edge, no black bars (crops a little if the
           box and video ever differ in shape). */
        object-fit: cover;
        visibility: hidden;
    }

    &.ready video{ visibility: visible; }
    &.ready .proc-video-placeholder{ display: none; }
}

.proc-video-placeholder{
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--sim-subtle);

    .material-symbols-rounded{ font-size: 36px; }
}

.adv-list.proc-design-list{
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 32px;
}

.proc-note{
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--sim-muted);

    a{
        color: var(--sim-text);
        font-weight: 500;
        text-decoration: underline !important;
    }
}

@media (max-width: 1000px){
    .proc-design{
        gap: 28px;
    }

    /* Points stack under the video on narrow screens. */
    .adv-list.proc-design-list{
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width:750px){
    #proc-steps-title, #proc-design-title{
        scroll-margin-top: 90px;
    }

    .proc-timeline{
        margin-top: 24px;
    }

    .proc-step{
        gap: 14px;
        padding-bottom: 28px;

        &:not(:last-child)::before{
            left: 15px;
            top: 36px;
        }
    }

    .proc-step-num{
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .proc-step-body{
        padding-top: 4px;

        p{ font-size: 14px; }
    }

    .proc-step-title{
        font-size: 16px;
    }

    /* No room to float beside the title on a phone: sit above it instead. */
    .proc-step-tag{
        float: none;
        display: table;
        margin: 0 0 6px;
    }
}

/* ===== DESKTOP DARK THEME ===== */
/* Follows the system setting, like the mobile view. Same #FFFFFF -> #0C0C0C
   surface mapping as the Home page. The base nav and footer colours are set
   several levels deep, so these use !important (as Home's do). */
@media (prefers-color-scheme: dark){
    body{
        background-color: #0C0C0C;
    }

    .desktop{
        background-color: #0C0C0C !important;

        .top-blur{
            background-color: #0C0C0C !important;
        }

        .nav-bar{
            .logo .img{
                filter: invert(1) !important;
            }

            .nav-title, .nav-link{
                color: #EBEBEB !important;
            }

            .schedule-btn{
                background-color: #EBEBEB !important;
                color: #0C0C0C !important;
            }

            .mega-panel{
                background-color: rgba(12, 12, 12, 0.97) !important;
                box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;

                .mega-heading{
                    color: #9E9E9E !important;
                }

                .mega-link{
                    color: #EBEBEB !important;
                }

                .mega-link:hover{
                    color: #ADADAD !important;
                }
            }
        }

        .bottom-content{
            background-color: #0C0C0C !important;

            .title, .title3{
                color: #FFFFFF !important;
            }

            .footer-link, .details{
                color: #9E9E9E !important;
            }

            .footer-link:hover{
                color: #FFFFFF !important;
            }

            .bottom-divider{
                background-color: #2A2A2A !important;
            }
        }
    }
}

/* Page content: the same dark tokens the phone layout uses. */
@media (prefers-color-scheme: dark){
    .sim-page{
        --ori-bar: #3987e5;
        --ori-best: #d95926;
        --ori-surface: #0C0C0C;
    }

    .sim-page{
        --sim-text: #EBEBEB;
        --sim-muted: #A1A1A6;
        --sim-subtle: #9E9E9E;
        --sim-border: #2A2A2A;
        --sim-surface: #1A1A1A;
        --sim-card: #141414;
        --sim-accent: #EBEBEB;
        --sim-on-accent: #0C0C0C;
        color-scheme: dark;
        background-color: #0C0C0C;
    }

    body{
        background-color: #0C0C0C;
    }


    .adv-page{
        --adv-live: #3BD27A;
        --adv-clean: #3BD27A;
        --adv-error: #F97316;
    }
}

/* ===== Product tags (mega panel and phone menu) =====
   "For <head unit>" pills after the extension batteries. */
/* A tagged link stays on one line, so its tag sits beside the name and the
   column keeps room for both instead of dropping the tag underneath. */
.mega-link:has(.product-tag), .menu-link:has(.product-tag){
    white-space: nowrap;
}

/* So the mega panel's columns still fit on narrower screens: their 132px gaps
   shrink (to 32px at the narrowest) instead of pushing the last column out of
   view. !important because the base rule is nested deep, as in the dark blocks. */
.mega-content{
    gap: clamp(32px, calc((100vw - 1100px) / 2), 132px) !important;
}

.product-tag{
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background-color: #F0F0F0;
    color: #6E6E6E;
    font-family: inter;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
}

@media (prefers-color-scheme: dark){
    .product-tag{
        background-color: #2A2A2A;
        color: #9E9E9E;
    }
}

/* "Coming soon" pills, in red, after Power Pack, MAU10000 and MAU16000. */
.product-tag-soon{
    background-color: #FDECEC;
    color: #D70015;
}

@media (prefers-color-scheme: dark){
    .product-tag-soon{
        background-color: #3A1416;
        color: #FF6961;
    }
}
