/* === CORE RESET & VARIABLES === */
:root {
    --bg-color: #0b1c2c;
    /* Deep ocean/atmospheric blue */
    --text-color: #e0f2fe;
    /* Light atmospheric blue/white */
    --accent-color: #00a09e;
    /* Teal matching the DCarbon logo */
    --accent-glow: rgba(0, 160, 158, 0.5);
    --glass-bg: rgba(11, 28, 44, 0.65);
    /* Tinted ocean glass */
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* === 3D BACKGROUND === */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through to UI */
}

/* === UI LAYER OVERLAY === */
.ui-layer {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === NAVIGATION === */
nav {
    padding: 40px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

/* === MAIN LAYOUT === */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align everything to make room for the globe on the right */
    padding: 60px 5% 120px 10%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* === GLASSMORPHISM PANELS === */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
}

/* Make the hero completely layout-driven by the 3D space, no glass box */
.hero {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0 60px 0;
    text-align: left;
    max-width: 600px;
    /* Keep text contained to left half */
}

/* === TYPOGRAPHY === */
h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
}

h1 span {
    color: var(--accent-color);
    text-shadow: 0 0 20px var(--accent-glow);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #a0a0b0;
    margin-bottom: 40px;
    max-width: 600px;
}

/* === EARNINGS CONTEXT === */
.earnings-context {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    margin-top: 30px;
}

.earnings-figure {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.earnings-subtext {
    font-size: 0.95rem;
    color: #a0a0b0;
    margin-bottom: 15px;
}

/* === AI UPSIDE SECTION === */
.ai-upside {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.ai-content {
    flex: 1;
    min-width: 300px;
}

.ai-content p {
    margin-left: 0;
    max-width: 100%;
}

.ai-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}

.img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.85;
    transition: transform 0.3s ease;
}

.img-wrapper:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 28, 44, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    z-index: 2;
}

.power-plant img {
    filter: grayscale(100%) sepia(20%) hue-rotate(180deg) brightness(0.8);
}

/* === THE WHY SECTION === */
.why-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.why-content {
    flex: 1;
    min-width: 300px;
}

.why-content p {
    margin-left: 0;
    max-width: 100%;
}

.why-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.why-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.why-image img:hover {
    transform: translateY(-5px);
}

.why-checklist {
    list-style: none;
    margin-top: 25px;
}

.why-checklist li {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.why-checklist li::first-letter {
    color: var(--accent-color);
    font-weight: 800;
}

/* === BUTTONS & CTAS === */

.faq-cta {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    text-align: center;
    padding: 0 20px;
}

.faq-cta p {
    margin: 0 auto 20px auto;
    text-align: center;
    max-width: 800px;
}

.primary-btn {
    background: var(--accent-color);
    color: #000;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 20px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
    background: #11d092;
}

.subtext {
    font-size: 0.9rem;
    color: #808090;
}

/* === STATS / SOCIAL PROOF === */
.social-proof {
    text-align: left;
    margin-bottom: 80px;
    width: 100%;
    max-width: 800px;
}

.social-proof p {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.stats-row {
    display: flex;
    justify-content: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    font-size: 1rem;
    color: #a0a0b0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.stat .highlight {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

/* === STEPS CARDS === */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.step-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 20px auto;
}

.step-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.step-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* === HELPERS === */
.pulse-yellow {
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(246, 195, 66, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(246, 195, 66, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(246, 195, 66, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    .glass-panel {
        padding: 40px 20px;
    }

    .stats-row {
        gap: 20px;
    }
}

/* === YIELD ENGINE COMPONENT === */
.yield-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Scaled up from 500px */
    height: 480px;
    /* Scaled up from 400px proportionately */
    margin: 0 auto;
}

/* The Faded App Screenshot Backdrop */
.yield-backdrop {
    position: absolute;
    top: 60px;
    /* Adjusted for panel to overlap */
    left: 50%;
    transform: translateX(-50%);
    width: 250%;
    /* Wider to bring it out heavily behind the houses */
    height: auto;
    z-index: 1;
    /* Lowest index, behind everything */
    opacity: 0.8;
    /* Crisper and less transparent */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 70%);
}

/* Floating Certification Badge */
.yield-badge {
    position: absolute;
    top: auto;
    bottom: 30px;
    left: 20px;
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 50px;
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 50;
    /* Above everything */
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: floatBadge 4s ease-in-out infinite;
}

.yield-badge .badge-icon {
    background: #10b981;
    color: #0b1c2c;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* The spotless pristine background graphic */
.yield-base-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* --- SVG PIPELINES LAYER --- */
#yield-svg-layer {
    position: absolute;
    top: 105px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

.energy-path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    /* Frosted white packets */
    stroke-width: 2.5;
    /* Shorter packets with wider gaps */
    stroke-dasharray: 4 24;
    stroke-linecap: round;
    /* Heavy emerald green glowing aura */
    filter: drop-shadow(0 0 6px #10b981) drop-shadow(0 0 12px #10b981);
    opacity: 0.95;
    animation: flowEnergy 30s linear infinite;
}

@keyframes flowEnergy {
    to {
        stroke-dashoffset: -1000;
    }
}

/* --- WEB NODES --- */
.web-node {
    fill: var(--accent-color);
    filter: drop-shadow(0 0 8px var(--accent-color));
    animation: pulseNode 3s infinite alternate;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes pulseNode {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 1;
    }
}

/* --- CSS COINS LAYER --- */
.particle-layer {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    /* Over the SVG pipes and houses */
    pointer-events: none;
    overflow: visible;
}

.coin-particle {
    position: absolute;
    width: 20px;
    /* Scaled down slightly for layout */
    height: 20px;
    background-image: url('assets/coin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    will-change: transform, opacity;
    filter: drop-shadow(0 5px 15px rgba(246, 195, 66, 0.4));
}

@keyframes floatUpCoins {
    0% {
        transform: translateY(0) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-150px) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

/* === FORMS & INPUTS === */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 160, 158, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0f2fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

/* Dropdown option styles (to fix unreadable native dark mode options on some OS) */
.form-group select option,
.form-group select optgroup {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #808090;
    margin-bottom: 0;
}

/* Custom Radio Buttons */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400 !important;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.radio-label input[type="radio"]:checked+.radio-custom {
    border-color: var(--accent-color);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
}

/* === FOOTER === */
.site-footer {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    text-align: center;
    padding: 40px 0 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    color: #808090;
    font-size: 0.75rem;
    line-height: 1.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-footer p {
    margin: 0;
    text-align: center;
}

.site-footer a {
    color: #808090;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.apply-footer {
    border-top: none;
    margin-top: 40px;
    position: static;
    margin-left: 0;
    margin-right: 0;
    left: auto;
    right: auto;
    width: 100%;
}

/* === IMAGE ANIMATIONS === */
.img-wrapper.data-center,
.img-wrapper.power-plant {
    position: relative;
    overflow: hidden;
}

.data-center img,
.power-plant img {
    position: relative;
    z-index: 1;
}

.data-center img {
    animation: serverGlow 4s infinite alternate;
}

@keyframes serverGlow {
    0% {
        filter: brightness(1) contrast(1);
    }

    100% {
        filter: brightness(1.2) contrast(1.1) hue-rotate(-15deg);
    }
}

.data-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 200, 255, 0) 0%, rgba(0, 200, 255, 0.4) 50%, rgba(0, 200, 255, 0) 100%);
    background-size: 100% 200%;
    /* Double height ensures gradient fits cleanly during pan */
    background-position: 0% -200%;
    animation: scanPulse 4s linear infinite;
    z-index: 10;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@keyframes scanPulse {
    0% {
        background-position: 0% -200%;
    }

    100% {
        background-position: 0% 200%;
        /* Ensures the invisible tail passes entirely before snapping back */
    }
}

.smoke-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50%;
    z-index: 10;
    pointer-events: none;
}

.smoke {
    position: absolute;
    bottom: 0px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(230, 230, 230, 0.9) 0%, transparent 60%);
    border-radius: 50%;
    animation: smokeRise 5s infinite ease-in;
    opacity: 0;
    filter: blur(8px);
}

/* Stacks are roughly at 35%, 50%, and 65% horizontally on the image */
.smoke-1 {
    left: 28%;
    animation-delay: 0s;
    animation-duration: 6s;
    width: 50px;
    height: 50px;
}

.smoke-2 {
    left: 45%;
    animation-delay: 1.5s;
    width: 60px;
    height: 60px;
}

.smoke-3 {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 5.5s;
    width: 45px;
    height: 45px;
}

@keyframes smokeRise {
    0% {
        transform: translateY(0) scale(1) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-200px) scale(4) translateX(-30px);
        opacity: 0;
    }
}