/* 
 * Green Energy Solutions - Brand Stylesheet
 * Mobile-First Responsive Design
 * Optimized for 320px+ with mobile-first approach
 */

/* ============================================================================
   CSS VARIABLES & BASE SETUP
   ============================================================================ */

:root {
    --color-primary: #00FF36;
    --color-secondary: #FFEB3B;
    --color-accent: #111111;
    --color-background: #000000;
    --color-text: #FFFFFF;
    --color-success: #00FF36;
    --color-warning: #FFEB3B;
    --color-danger: #FF3B3B;
    
    /* Brand Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    
    /* Responsive Spacing */
    --spacing-xs: clamp(0.5rem, 1.5vw, 0.75rem);
    --spacing-sm: clamp(0.75rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2.5rem);
    --spacing-xl: clamp(2rem, 5vw, 3rem);
    --spacing-xxl: clamp(3rem, 6vw, 5rem);
    
    /* Container Max Widths */
    --container-sm: 100%;
    --container-md: 700px;
    --container-lg: 1200px;
    
    /* Touch Targets */
    --touch-target-min: 44px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 50px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 15px rgba(0, 255, 54, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 255, 54, 0.2);
    
    /* Banner Height - Calculated dynamically */
    --banner-height: calc(clamp(1rem, 2.5vw, 1.25rem) * 2 + 1.6em + env(safe-area-inset-top));
    --banner-height-mobile: calc(clamp(0.875rem, 2.5vw, 1rem) * 2 + 1.5em + env(safe-area-inset-top));
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    min-height: 100svh;
    min-height: 100dvh; /* Fallback for older browsers */
    padding-top: var(--top-ribbon-h, var(--banner-height));
}

/* Mobile: Adjust body padding for smaller banner */
@media screen and (max-width: 480px) {
    body {
        padding-top: var(--top-ribbon-h, var(--banner-height-mobile));
    }
}

/* Prevent horizontal scroll */
body,
html {
    overflow-x: hidden;
    position: relative;
}

/* Body scroll lock when modal is open */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============================================================================
   IMAGE OPTIMIZATION
   ============================================================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    object-fit: contain;
}

/* ============================================================================
   CONTAINER
   ============================================================================ */

.container {
    width: 100%;
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 1.25rem);
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.section-heading {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    line-height: 1.2;
}

.section-subtext {
    text-align: center;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ============================================================================
   PROMOTIONAL BANNER - GREEN RIBBON
   ============================================================================ */

.promo-banner {
    background: #00FF36;
    background: linear-gradient(180deg, #00FF36 0%, #00E633 100%);
    color: #0b0b0b;
    padding: clamp(1rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
    padding-top: calc(clamp(1rem, 2.5vw, 1.25rem) + env(safe-area-inset-top));
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147483000;
    width: 100%;
    display: block;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.promo-banner.banner-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    pointer-events: none;
}

.promo-banner:hover {
    background: linear-gradient(180deg, #00FF50 0%, #00FF36 100%);
    transform: translateY(0);
    cursor: pointer;
}

.promo-banner:active {
    transform: scale(0.98);
    background: linear-gradient(180deg, #00E633 0%, #00CC2A 100%);
}

.promo-banner-content {
    max-width: var(--container-lg);
    margin: 0 auto;
    width: 100%;
}

.promo-banner-text {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
    color: #0b0b0b;
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    text-shadow: none;
}

.promo-banner-text strong {
    font-weight: 700;
    color: #0b0b0b;
    letter-spacing: 0.03em;
    text-shadow: none;
}

/* Mobile-specific adjustments */
@media screen and (max-width: 480px) {
    .promo-banner {
        padding: clamp(0.875rem, 2.5vw, 1rem) clamp(0.875rem, 3vw, 1.25rem);
        padding-top: calc(clamp(0.875rem, 2.5vw, 1rem) + env(safe-area-inset-top));
    }
    
    .promo-banner-text {
        font-size: clamp(0.875rem, 3vw, 1rem);
        line-height: 1.5;
        font-weight: 600;
    }
    
    .promo-banner-text strong {
        font-weight: 700;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .promo-banner {
        background: #00FF36;
        border-bottom: 2px solid #000000;
    }
    
    .promo-banner-text {
        color: #000000;
        text-shadow: none;
    }
    
    .promo-banner-text strong {
        color: #000000;
        text-shadow: none;
    }
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
    position: relative;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-md);
    overflow: hidden;
    width: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.95) 100%),
        linear-gradient(135deg, rgba(0,255,54,0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,255,54,0.03) 2px,
            rgba(0,255,54,0.03) 4px
        ),
        radial-gradient(ellipse at top, rgba(0,255,54,0.1) 0%, transparent 50%),
        #000000;
    background-size: 100% 100%, 100% 100%, 20px 20px, 100% 100%, 100% 100%;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(0,255,54,0.02) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(0,255,54,0.02) 50%, transparent 60%);
    background-size: 200px 200px, 200px 200px;
    background-position: 0 0, 100px 100px;
    animation: solarShift 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes solarShift {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(-10px); }
}

.hero-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: 
        linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,0.02) 0px,
            rgba(255,255,255,0.02) 1px,
            transparent 1px,
            transparent 100px
        );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    padding: 0 var(--spacing-sm);
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: clamp(200px, 60vw, 350px);
    width: 100%;
    height: auto;
    max-height: clamp(120px, 30vw, 200px);
    object-fit: contain;
    display: block;
    filter: 
        drop-shadow(0 0 20px rgba(0, 255, 54, 0.6))
        drop-shadow(0 0 40px rgba(0, 255, 54, 0.4))
        drop-shadow(0 0 60px rgba(0, 255, 54, 0.2))
        drop-shadow(0 4px 12px rgba(0, 255, 54, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
    animation: logoGlow 3s ease-in-out infinite;
}

.logo:hover {
    transform: scale(1.05);
    filter: 
        drop-shadow(0 0 30px rgba(0, 255, 54, 0.8))
        drop-shadow(0 0 50px rgba(0, 255, 54, 0.6))
        drop-shadow(0 0 70px rgba(0, 255, 54, 0.4))
        drop-shadow(0 4px 12px rgba(0, 255, 54, 0.7));
}

@keyframes logoGlow {
    0%, 100% {
        filter: 
            drop-shadow(0 0 20px rgba(0, 255, 54, 0.6))
            drop-shadow(0 0 40px rgba(0, 255, 54, 0.4))
            drop-shadow(0 0 60px rgba(0, 255, 54, 0.2))
            drop-shadow(0 4px 12px rgba(0, 255, 54, 0.5));
    }
    50% {
        filter: 
            drop-shadow(0 0 25px rgba(0, 255, 54, 0.7))
            drop-shadow(0 0 45px rgba(0, 255, 54, 0.5))
            drop-shadow(0 0 65px rgba(0, 255, 54, 0.3))
            drop-shadow(0 4px 12px rgba(0, 255, 54, 0.6));
    }
}

.hero-headline {
    font-size: clamp(1.75rem, 8vw, 4rem);
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    text-shadow: 
        0 0 10px rgba(0, 255, 54, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: clamp(1px, 0.5vw, 2px);
}

.hero-subtext {
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.hero-description {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xxl);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.cta-primary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #FFD700 100%);
    color: var(--color-background);
    border: none;
    padding: clamp(14px, 4vw, 20px) clamp(25px, 8vw, 50px);
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    font-weight: 700;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-sm);
    box-shadow: 
        0 6px 20px rgba(255, 235, 59, 0.25),
        0 0 0 0 rgba(255, 235, 59, 0.4);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-primary:hover::before {
    width: 300px;
    height: 300px;
}

.cta-primary:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, #00CC2A 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 255, 54, 0.35),
        0 0 0 4px rgba(0, 255, 54, 0.1);
}

.cta-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 54, 0.3);
}

.cta-primary span {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   ESTIMATE FORM SECTION - MOBILE MODAL
   ============================================================================ */

.estimate-form-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.estimate-form-section.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Desktop: Centered Modal */
@media (min-width: 769px) {
    .estimate-form-section.active {
        align-items: center;
        padding: var(--spacing-md);
    }
}

/* ============================================================================
   FORM LAYOUT FIX - Responsive Modal Positioning & Clipping Fixes
   ============================================================================ */

/* Mobile: Add top padding to account for promo ribbon and safe area */
@media (max-width: 768px) {
    .estimate-form-section.active {
        padding-top: calc(var(--top-ribbon-h, 0px) + env(safe-area-inset-top) + 8px);
    }
}

/* Fix form container max-height to account for ribbon and safe areas */
.form-container {
    max-height: calc(100dvh - var(--top-ribbon-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    max-height: calc(100svh - var(--top-ribbon-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
}

/* Fallback for browsers without dvh/svh support */
@supports not (height: 100dvh) {
    .form-container {
        max-height: calc(100vh - var(--top-ribbon-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    }
}

/* Desktop: Adjust max-height to account for padding */
@media (min-width: 769px) {
    .form-container {
        max-height: calc(90vh - var(--top-ribbon-h, 0px) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }
}

/* Sheet wrapper - no scrolling here */
.form-container {
    position: relative;
    width: 100%;
    max-width: var(--container-md);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden; /* Clip body scroll, but header overflow visible handles close button */
    display: flex;
    flex-direction: column;
    background-color: var(--color-accent);
    border: 2px solid var(--color-primary);
    border-bottom: none;
    box-shadow: 0 0 40px rgba(0, 255, 54, 0.25);
    margin: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Desktop: Centered with rounded corners */
@media (min-width: 769px) {
    .form-container {
        border-radius: var(--radius-lg);
        border-bottom: 2px solid var(--color-primary);
        max-height: 90vh;
        margin: auto;
        box-shadow: 
            0 0 40px rgba(0, 255, 54, 0.25),
            0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

/* Sticky header inside the sheet */
.form-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--color-accent);
    padding-top: calc(2.75rem + env(safe-area-inset-top));
    padding-left: clamp(1rem, 4vw, 1.25rem);
    padding-right: clamp(1rem, 4vw, 1.25rem);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(0, 255, 54, 0.18);
    min-height: fit-content;
    overflow: visible;
}

/* Mobile: Compact header to maximize form space */
@media (max-width: 768px) {
    .form-header {
        padding-top: calc(2.75rem + env(safe-area-inset-top));
        padding-left: clamp(0.75rem, 3vw, 1rem);
        padding-right: clamp(0.75rem, 3vw, 1rem);
        padding-bottom: var(--spacing-sm);
    }
}

/* Scroll area - only this scrolls */
.form-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-md);
    padding-bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

/* Mobile: Optimize form body padding */
@media (max-width: 768px) {
    .form-body {
        padding: var(--spacing-sm);
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom));
    }
}

.form-body::-webkit-scrollbar {
    width: 8px;
}

.form-body::-webkit-scrollbar-track {
    background: transparent;
}

.form-body::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 4px;
}

/* Bottom Close Button */
.close-form-bottom {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 54, 0.4);
    color: var(--color-text);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 600;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: clamp(12px, 3vw, 14px);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-form-bottom:hover,
.close-form-bottom:focus {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: var(--color-primary);
    color: var(--color-primary);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.close-form-bottom:active {
    transform: scale(0.98);
    background-color: rgba(0, 0, 0, 0.6);
}

/* Close button lives in the sticky header */
.close-form {
    position: absolute;
    top: calc(0.5rem + env(safe-area-inset-top));
    right: clamp(0.75rem, 3vw, 1rem);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 54, 0.5);
    color: var(--color-text);
    font-size: clamp(1.75rem, 4vw, 2rem);
    cursor: pointer;
    transition: color 0.3s, transform 0.2s, background 0.3s, border-color 0.3s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1;
    overflow: visible;
}

/* Mobile: Ensure close button stays within safe bounds */
@media (max-width: 768px) {
    .close-form {
        top: calc(0.5rem + env(safe-area-inset-top));
        right: clamp(0.75rem, 3vw, 1rem);
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

.close-form:hover,
.close-form:focus {
    color: var(--color-primary);
    transform: scale(1.1);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.close-form:active {
    transform: scale(0.95);
}

.form-heading {
    color: var(--color-primary);
    font-size: clamp(1.25rem, 4vw, 2rem);
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: var(--spacing-xs);
    text-align: center;
    padding-right: calc(44px + var(--spacing-sm));
    padding-top: 0;
    overflow: visible;
    text-overflow: unset;
}

/* Mobile: Ensure heading is fully visible */
@media (max-width: 768px) {
    .form-heading {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        line-height: 1.3;
        margin-top: 0;
        margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
        padding-right: calc(44px + var(--spacing-xs));
    }
}

.form-subtext {
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* ============================================================================
   PREMIUM SEGMENTED TAB CONTROL
   ============================================================================ */

.tab-control-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-xs);
    width: 100%;
}

/* Mobile: Compact tab wrapper */
@media (max-width: 768px) {
    .tab-control-wrapper {
        margin-bottom: var(--spacing-sm);
        padding: 0;
    }
}

.tab-control {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 54, 0.4);
    border-radius: var(--radius-xl);
    padding: clamp(4px, 1.5vw, 5px);
    gap: clamp(3px, 1vw, 4px);
    width: 100%;
    max-width: 480px;
    box-shadow: 
        0 0 20px rgba(0, 255, 54, 0.1),
        inset 0 1px 3px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.tab-control__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, 1.5vw, 8px);
    padding: clamp(11px, 3vw, 14px) clamp(12px, 4vw, 20px);
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-xl) - 2px);
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-primary);
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: 
        color 0.3s ease,
        transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    outline: none;
    min-height: var(--touch-target-min);
    white-space: nowrap;
}

/* Mobile: More compact tabs */
@media (max-width: 768px) {
    .tab-control__tab {
        padding: clamp(8px, 2.5vw, 10px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.7rem, 1.8vw, 0.8rem);
        gap: clamp(4px, 1.2vw, 6px);
        min-height: 40px;
    }
}

.tab-control__icon {
    width: clamp(14px, 3.5vw, 18px);
    height: clamp(14px, 3.5vw, 18px);
    flex-shrink: 0;
    transition: 
        filter 0.3s ease,
        transform 0.3s ease;
}

/* Mobile: Smaller tab icons */
@media (max-width: 768px) {
    .tab-control__icon {
        width: clamp(12px, 3vw, 14px);
        height: clamp(12px, 3vw, 14px);
    }
}

.tab-control__label {
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.tab-control__tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.85);
}

.tab-control__tab:not(.active):hover .tab-control__icon {
    filter: drop-shadow(0 0 4px rgba(0, 255, 54, 0.4));
    transform: scale(1.1);
}

.tab-control__tab:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
    border-radius: calc(var(--radius-xl) - 2px);
}

.tab-control__tab.active {
    color: var(--color-background);
}

.tab-control__tab.active .tab-control__icon {
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
}

.tab-control__indicator {
    position: absolute;
    top: clamp(4px, 1.5vw, 5px);
    bottom: clamp(4px, 1.5vw, 5px);
    left: clamp(4px, 1.5vw, 5px);
    width: calc(50% - clamp(5.5px, 2vw, 7px));
    background: linear-gradient(135deg, var(--color-primary) 0%, #00DD30 100%);
    border-radius: calc(var(--radius-xl) - 2px);
    z-index: 1;
    transition: 
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease;
    box-shadow: 
        0 0 15px rgba(0, 255, 54, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tab-control__indicator.roofing {
    transform: translateX(calc(100% + clamp(3px, 1vw, 4px)));
}

@keyframes tabGlow {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(0, 255, 54, 0.5),
            0 2px 8px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(0, 255, 54, 0.7),
            0 2px 8px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.tab-control__indicator {
    animation: tabGlow 3s ease-in-out infinite;
}

.form-subtext-dynamic {
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    line-height: 1.5;
    opacity: 1;
    transition: opacity 0.2s ease;
    min-height: 1.5em;
    padding: 0 var(--spacing-xs);
}

/* Mobile: Compact subtext */
@media (max-width: 768px) {
    .form-subtext-dynamic {
        font-size: clamp(0.8rem, 2.2vw, 0.85rem);
        margin-bottom: var(--spacing-sm);
        line-height: 1.4;
        padding: 0;
    }
}

.form-subtext-dynamic.fade {
    opacity: 0;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.required {
    color: var(--color-danger);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: clamp(12px, 3vw, 14px);
    background-color: var(--color-background);
    border: 2px solid var(--color-primary);
    color: var(--color-text);
    font-size: 16px; /* Prevent Safari zoom on mobile */
    font-family: var(--font-secondary);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    appearance: none;
    min-height: var(--touch-target-min);
    line-height: 1.5;
}

@media (max-width: 767px) {
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select {
        font-size: 16px; /* Critical: prevents iOS Safari zoom on focus */
    }
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.2);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FF36' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.radio-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    flex-direction: column;
}

@media (min-width: 480px) {
    .radio-group {
        flex-direction: row;
    }
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    color: var(--color-text);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    min-height: var(--touch-target-min);
}

.radio-label:hover {
    background: rgba(0, 255, 54, 0.05);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.cta-form {
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    padding: clamp(14px, 3.5vw, 16px);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 700;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-md);
    transition: all 0.3s ease;
    min-height: var(--touch-target-min);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-form:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-form:active {
    transform: translateY(0);
}

.cta-form:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-disclaimer {
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: var(--color-secondary);
    margin-top: var(--spacing-sm);
}

/* ============================================================================
   FORM LAYOUT
   ============================================================================ */

.form-field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .form-field-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.form-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section-divider {
    margin: var(--spacing-lg) 0 var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 255, 54, 0.2);
}

.form-section-divider:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.form-section-title {
    font-family: var(--font-primary);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

/* ============================================================================
   ERROR HANDLING
   ============================================================================ */

.error-summary {
    background-color: rgba(255, 59, 59, 0.15);
    border: 2px solid var(--color-danger);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--color-danger);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

.error-summary strong {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.error-summary ul {
    margin: var(--spacing-xs) 0 0 1.5rem;
    padding: 0;
    list-style-type: disc;
}

.error-summary li {
    margin: 0.25rem 0;
}

.field-error {
    display: block;
    color: var(--color-danger);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    margin-top: var(--spacing-xs);
    min-height: 1.2rem;
}

/* ============================================================================
   SPECIAL OFFER SECTION - 20% Cashback
   ============================================================================ */

.special-offer-section {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, #00FF36 0%, #00E633 50%, #00CC2A 100%);
    border-top: 4px solid rgba(0, 0, 0, 0.2);
    border-bottom: 4px solid rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.special-offer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.03) 10px,
            rgba(0, 0, 0, 0.03) 20px
        );
    pointer-events: none;
}

.special-offer-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.special-offer-icon {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.special-offer-heading {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 5vw, 2.75rem);
    font-weight: 700;
    color: #0b0b0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.special-offer-text {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #0b0b0b;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.special-offer-text strong {
    font-weight: 700;
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: #000000;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.4);
}

.special-offer-subtext {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #0b0b0b;
    font-weight: 500;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.cta-special-offer {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #FFD700 100%);
    color: var(--color-background);
    border: 3px solid #0b0b0b;
    padding: clamp(16px, 4vw, 22px) clamp(30px, 8vw, 60px);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-sm);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 0 rgba(255, 235, 59, 0.4);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
}

.cta-special-offer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-special-offer:hover::before {
    width: 300px;
    height: 300px;
}

.cta-special-offer:hover {
    background: linear-gradient(135deg, #0b0b0b 0%, #1a1a1a 100%);
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 4px rgba(0, 255, 54, 0.2);
}

.cta-special-offer:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-special-offer span {
    position: relative;
    z-index: 1;
}

/* ============================================================================
   STATS SECTION
   ============================================================================ */

.stats-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-accent);
    border-top: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
}

.stat-card {
    background-color: var(--color-background);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.stat-card .stat-number {
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.1;
}

.stat-card .stat-label {
    color: var(--color-secondary);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ============================================================================
   ABOUT SECTION
   ============================================================================ */

.about-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-background);
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.about-section:first-of-type {
    padding-top: var(--spacing-xxl);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-lead {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.about-lead {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   SHOWCASE SECTION
   ============================================================================ */

.showcase-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-accent);
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    align-items: stretch;
}

@media (min-width: 480px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.photo-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-primary);
    position: relative;
    transition: all 0.3s ease;
    background-color: var(--color-background);
    width: 100%;
    display: block;
    min-height: 0;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .photo-item {
        aspect-ratio: 16/9;
    }
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background);
    max-width: none;
    max-height: none;
    min-width: 100%;
    min-height: 100%;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover::after {
    opacity: 1;
}

/* ============================================================================
   BENEFITS SECTION
   ============================================================================ */

.benefits-section {
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-background);
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

@media (min-width: 480px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.benefit-item {
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--color-accent);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 0 10px var(--color-primary));
}

.benefit-title {
    color: var(--color-primary);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: var(--spacing-sm);
}

.benefit-text {
    color: var(--color-text);
    line-height: 1.6;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background-color: var(--color-accent);
    padding: var(--spacing-xxl) 0 0;
    border-top: 3px solid var(--color-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-heading {
    color: var(--color-primary);
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.footer-section p:last-child {
    margin-bottom: 0;
}

.footer-bottom {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid rgba(0, 255, 54, 0.2);
}

.footer-legal {
    text-align: center;
}

.footer-legal p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.footer-legal p:last-child {
    margin-bottom: 0;
}

.footer-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 54, 0.4);
    text-underline-offset: 2px;
    transition: color 0.3s, text-decoration-color 0.3s;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--color-secondary);
    text-decoration-color: var(--color-secondary);
}

.footer-demo-bar {
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 255, 54, 0.2);
    padding: var(--spacing-md) 0;
    padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    text-align: center;
}

.footer-demo-bar p {
    margin-bottom: var(--spacing-xs);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

.footer-demo-bar p:last-child {
    margin-bottom: 0;
}

.demo-notice {
    color: var(--color-secondary);
}

.powered-by {
    color: rgba(255, 255, 255, 0.6);
}

.reversal-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 54, 0.4);
    text-underline-offset: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reversal-link:hover,
.reversal-link:focus {
    color: var(--color-secondary);
    text-decoration-color: var(--color-secondary);
    text-shadow: 0 0 8px rgba(0, 255, 54, 0.5);
}

/* ============================================================================
   SUCCESS SCREEN
   ============================================================================ */

.success-screen {
    width: 100%;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.success-icon-wrapper {
    width: clamp(70px, 15vw, 100px);
    height: clamp(70px, 15vw, 100px);
    margin: 0 auto;
    position: relative;
}

.success-checkmark {
    width: 100%;
    height: 100%;
}

.success-checkmark-circle {
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-miterlimit: 10;
    fill: none;
    animation: strokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke: var(--color-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: strokeCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes strokeCircle {
    0% {
        stroke-dasharray: 0 157;
    }
    100% {
        stroke-dasharray: 157 157;
    }
}

@keyframes strokeCheck {
    0% {
        stroke-dashoffset: 48;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-family: var(--font-primary);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    animation: slideInUp 0.5s ease-out 0.3s both;
}

.success-message {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--color-text);
    margin: 0;
    line-height: 1.6;
    animation: slideInUp 0.5s ease-out 0.4s both;
}

.success-estimate-id {
    background-color: rgba(0, 255, 54, 0.1);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
    animation: slideInUp 0.5s ease-out 0.5s both;
}

.estimate-label {
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.estimate-value {
    font-family: var(--font-primary);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.success-demo-notice {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    color: var(--color-secondary);
    font-style: italic;
    margin: 0;
    animation: slideInUp 0.5s ease-out 0.6s both;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    animation: slideInUp 0.5s ease-out 0.7s both;
    width: 100%;
}

@media (min-width: 480px) {
    .success-actions {
        flex-direction: row;
        width: auto;
    }
}

.success-btn-primary,
.success-btn-secondary {
    padding: clamp(12px, 3vw, 14px) clamp(24px, 5vw, 28px);
    font-family: var(--font-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: var(--touch-target-min);
    flex: 1;
}

@media (min-width: 480px) {
    .success-btn-primary,
    .success-btn-secondary {
        flex: 0 1 auto;
    }
}

.success-btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #00CC2A 100%);
    color: var(--color-background);
    box-shadow: var(--shadow-md);
}

.success-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.success-btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
}

.success-btn-secondary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.success-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 10;
}

.form-message {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.form-message.success {
    background-color: rgba(0, 255, 54, 0.15);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.form-message.error {
    background-color: rgba(255, 59, 59, 0.15);
    color: var(--color-danger);
    border: 2px solid var(--color-danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: var(--color-background);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Legacy support - hide old tab styles if still present */
.form-tabs {
    display: none !important;
}

.form-tab {
    display: none !important;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #00FF36;
        --color-secondary: #FFFF00;
        --color-text: #FFFFFF;
        --color-background: #000000;
    }
}

/* ============================================================================
   MOBILE FORM LAYOUT IMPROVEMENTS
   ============================================================================ */

@media (max-width: 768px) {
    /* Improved form spacing and readability - compact header already handled above */
    
    .form-subtext,
    .form-subtext-dynamic {
        margin-bottom: var(--spacing-sm);
        padding: 0;
    }
    
    /* Tab control improvements - already handled above */
    
    .tab-control {
        max-width: 100%;
        width: 100%;
    }
    
    /* Form section spacing */
    .form-section-divider {
        margin: var(--spacing-xl) 0 var(--spacing-lg);
        padding-top: var(--spacing-lg);
    }
    
    .form-group {
        margin-bottom: var(--spacing-lg);
    }
    
    .form-group label {
        margin-bottom: var(--spacing-sm);
        font-size: clamp(0.95rem, 2.5vw, 1.05rem);
        line-height: 1.5;
    }
    
    /* Input field improvements */
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select {
        padding: clamp(14px, 3.5vw, 16px);
        font-size: 16px;
        line-height: 1.6;
        border-width: 2px;
    }
    
    /* Radio group spacing */
    .radio-group {
        gap: var(--spacing-md);
        margin-top: var(--spacing-xs);
    }
    
    .radio-label {
        padding: var(--spacing-sm);
        min-height: calc(var(--touch-target-min) + 4px);
    }
    
    /* Form field rows - stack on mobile */
    .form-field-row {
        gap: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    /* Submit button improvements */
    .cta-form {
        padding: clamp(16px, 4vw, 18px);
        font-size: clamp(1rem, 2.8vw, 1.15rem);
        margin-top: var(--spacing-lg);
        min-height: calc(var(--touch-target-min) + 8px);
    }
    
    /* Form disclaimer spacing */
    .form-disclaimer {
        margin-top: var(--spacing-md);
    }
    
    /* Error summary spacing */
    .error-summary {
        margin-bottom: var(--spacing-lg);
        padding: var(--spacing-md);
    }
    
    .field-error {
        margin-top: var(--spacing-xs);
        min-height: 1.4rem;
    }
}

