/* ╔══════════════════════════════════════════════════════════════════════════════╗
   ║                                                                              ║
   ║   HERO-SYSTEM.CSS — Diverse, Conversion-Focused Hero Architecture            ║
   ║   Version: 1.0                                                               ║
   ║   Purpose: Transform generic heroes into unique, Andy-style conversions      ║
   ║                                                                              ║
   ╚══════════════════════════════════════════════════════════════════════════════╝ */

/* ═══════════════════════════════════════════════════════════════════════════════
   1. BASE HERO STYLES (Shared by All Variants)
   ═══════════════════════════════════════════════════════════════════════════════ */

.section-hero {
    position: relative;
    color: white;
    overflow: hidden;
}

.section-hero .container {
    position: relative;
    z-index: 2;
}

.section-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: white;
    margin: 0 0 var(--space-4);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.section-hero .hero-lead {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
    margin-bottom: var(--space-5);
}

.section-hero .hero-proof {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: var(--space-5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   2. LAYOUT VARIANTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   Layout A: Grid + Form (Two-column, content left, sticky form right)
   ───────────────────────────────────────────────────────────────────────────── */
.hero--grid-form {
    padding: clamp(40px, 6vw, 80px) 0;
}

.hero--grid-form .hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(24px, 3vw, 48px);
    align-items: start;
}

.hero--grid-form .hero-content {
    max-width: 65ch;
}

.hero--grid-form .hero-form-container {
    position: sticky;
    top: 20px;
}

@media (max-width: 980px) {
    .hero--grid-form .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .hero--grid-form .hero-form-container {
        position: static;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout B: Grid Reversed (Two-column, visual left, content right)
   ───────────────────────────────────────────────────────────────────────────── */
.hero--grid-reverse {
    padding: clamp(40px, 6vw, 80px) 0;
}

.hero--grid-reverse .hero-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(24px, 3vw, 48px);
    align-items: center;
}

.hero--grid-reverse .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero--grid-reverse .hero-content {
    max-width: 65ch;
}

@media (max-width: 980px) {
    .hero--grid-reverse .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .hero--grid-reverse .hero-visual {
        order: 2;
    }

    .hero--grid-reverse .hero-content {
        order: 1;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout C: Centered (Single column, enhanced)
   ───────────────────────────────────────────────────────────────────────────── */
.hero--centered {
    padding: clamp(50px, 7vw, 100px) 0;
    text-align: center;
}

.hero--centered .container {
    max-width: 900px;
}

.hero--centered h1 {
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}

.hero--centered .hero-lead {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.hero--centered .hero-trust {
    justify-content: center;
}

.hero--centered .hero-cta {
    justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout D: Split (Angled diagonal background)
   ───────────────────────────────────────────────────────────────────────────── */
.hero--split {
    padding: clamp(50px, 7vw, 100px) 0;
    position: relative;
}

.hero--split .hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero--split-left .hero-content {
    margin-right: auto;
}

.hero--split-right .hero-content {
    margin-left: auto;
    text-align: right;
}

.hero--split-right .hero-trust {
    justify-content: flex-end;
}

.hero--split-right .hero-cta {
    justify-content: flex-end;
}

/* Split background accent */
.hero--split::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: rgba(255, 255, 255, 0.03);
    z-index: 1;
}

.hero--split-left::after {
    right: 0;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.hero--split-right::after {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

@media (max-width: 768px) {
    .hero--split-right .hero-content {
        text-align: left;
        margin-left: 0;
    }

    .hero--split-right .hero-trust,
    .hero--split-right .hero-cta {
        justify-content: flex-start;
    }

    .hero--split::after {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout E: Compact Form (Single column with inline mini-form)
   ───────────────────────────────────────────────────────────────────────────── */
.hero--compact-form {
    padding: clamp(40px, 6vw, 80px) 0;
    text-align: center;
}

.hero--compact-form .container {
    max-width: 900px;
}

.hero--compact-form h1 {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}

.hero--compact-form .hero-lead {
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.hero--compact-form .hero-trust {
    justify-content: center;
    margin-bottom: var(--space-6);
}

/* Fix spacing for proof callout after mini-form */
.hero--compact-form .hero-mini-form + .hero-proof,
.hero--compact-form .hero-mini-form + .operational-proof {
    margin-top: var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   3. BACKGROUND VARIANTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Gradient A: Navy diagonal (160deg) - Default */
.hero--bg-gradient-a {
    background: linear-gradient(160deg, #1a2a4e 0%, var(--color-brand-blue, #183075) 100%);
}

/* Gradient B: Navy reversed angle (200deg) - Alternate */
.hero--bg-gradient-b {
    background: linear-gradient(200deg, #1a2a4e 0%, var(--color-brand-blue, #183075) 100%);
}

/* Gradient C: Radial center glow - Hub pages */
.hero--bg-gradient-c {
    background: radial-gradient(ellipse at 50% 30%, #2a4a7e 0%, #1a2a4e 50%, var(--color-brand-blue, #183075) 100%);
}

/* Coastal: Teal-blue ocean feel - Beach communities */
.hero--bg-coastal {
    background: linear-gradient(160deg, #0d4a5a 0%, #1a4a6e 40%, var(--color-brand-blue, #183075) 100%);
}

/* Urban: Dark city gradient - Downtown/metro */
.hero--bg-urban {
    background: linear-gradient(180deg, #0a1525 0%, #152035 40%, #1a2a4e 100%);
}

/* Image: Photo with overlay - Special locations */
.hero--bg-image {
    background-color: var(--color-brand-blue, #183075);
    background-size: cover;
    background-position: center;
}

.hero--bg-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(26, 42, 78, 0.92) 0%, rgba(24, 48, 117, 0.88) 100%);
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   4. PATTERN OVERLAYS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base pattern setup */
.hero--pattern-grid::before,
.hero--pattern-dots::before,
.hero--pattern-wave::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Grid: Technical precision feel */
.hero--pattern-grid::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Dots: Subtle premium feel */
.hero--pattern-dots::before {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Wave: Coastal communities */
.hero--pattern-wave::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.02' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 100% 150px;
    opacity: 0.5;
}

/* No pattern */
.hero--pattern-none::before {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   5. TRUST SIGNAL VARIANTS
   ═══════════════════════════════════════════════════════════════════════════════ */

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.trust-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.trust-item--primary {
    color: white;
    font-weight: 700;
}

/* Reviews emphasis */
.hero-trust--reviews .trust-item--primary svg {
    fill: #FFC107;
    color: #FFC107;
}

/* Speed emphasis */
.hero-trust--speed .trust-item--primary svg {
    fill: #4ade80;
    color: #4ade80;
}

/* Certified emphasis */
.hero-trust--certified .trust-item--primary svg {
    fill: #60a5fa;
    color: #60a5fa;
}

/* Local emphasis */
.hero-trust--local .trust-item--primary svg {
    fill: #f87171;
    color: #f87171;
}

/* Separator dots between trust items */
.hero-trust .trust-item:not(:last-child)::after {
    content: "•";
    margin-left: var(--space-4);
    opacity: 0.4;
}

@media (max-width: 600px) {
    .hero-trust {
        flex-direction: column;
        gap: var(--space-2);
    }

    .hero-trust .trust-item::after {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   6. FORM VARIANTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   Form Card (Full & Standard forms)
   ───────────────────────────────────────────────────────────────────────────── */
.hero-form-container .form-card {
    background: white;
    border-radius: var(--radius-lg, 12px);
    padding: clamp(20px, 3vw, 32px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border-top: 4px solid var(--color-brand-red, #EC1C24);
}

.hero-form-container .form-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-brand-blue-dark, #0f1e4a);
    margin-bottom: var(--space-2);
    text-align: center;
}

.hero-form-container .form-subhead {
    font-size: 0.9rem;
    color: var(--color-neutral-600, #4b5563);
    margin-bottom: var(--space-5);
    text-align: center;
}

.hero-form-container .form-subhead strong {
    color: var(--color-brand-red, #EC1C24);
}

/* Form inputs */
.hero-form-container .form-group {
    margin-bottom: var(--space-4);
}

.hero-form-container label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-neutral-700, #374151);
    margin-bottom: var(--space-1);
}

.hero-form-container input,
.hero-form-container select {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: #1f2937;
    border: 1px solid var(--color-neutral-300, #d1d5db);
    border-radius: var(--radius-md, 8px);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-form-container input:focus,
.hero-form-container select:focus {
    outline: none;
    border-color: var(--color-brand-blue, #183075);
    box-shadow: 0 0 0 3px rgba(24, 48, 117, 0.15);
}

.hero-form-container input::placeholder {
    color: var(--color-neutral-400, #9ca3af);
}

/* Form row (two columns) */
.hero-form-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

@media (max-width: 480px) {
    .hero-form-container .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form submit button */
.hero-form-container .btn-submit,
.hero-form-container button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    background: var(--color-brand-red, #EC1C24);
    color: white;
    border: none;
    border-radius: var(--radius-full, 999px);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-form-container .btn-submit:hover,
.hero-form-container button[type="submit"]:hover {
    background: var(--color-brand-red-dark, #b9151b);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 28, 36, 0.35);
}

.hero-form-container .form-disclaimer {
    font-size: 0.8rem;
    color: var(--color-neutral-500, #6b7280);
    text-align: center;
    margin-top: var(--space-3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Mini Form (Inline 3-field form)
   ───────────────────────────────────────────────────────────────────────────── */
.hero-mini-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    align-items: stretch;
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-mini-form input {
    flex: 1;
    min-width: 180px;
    padding: 14px 18px;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md, 8px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-neutral-800, #1f2937);
    transition: all 0.2s;
}

.hero-mini-form input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.hero-mini-form input::placeholder {
    color: var(--color-neutral-500, #6b7280);
}

.hero-mini-form select {
    flex: 1;
    min-width: 180px;
    padding: 14px 18px;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md, 8px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-neutral-800, #1f2937);
    transition: all 0.2s;
    cursor: pointer;
}

.hero-mini-form select:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.hero-mini-form button[type="submit"] {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    background: var(--color-brand-red, #EC1C24);
    color: white;
    border: none;
    border-radius: var(--radius-full, 999px);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hero-mini-form button[type="submit"]:hover {
    background: var(--color-brand-red-dark, #b9151b);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 28, 36, 0.4);
}

@media (max-width: 600px) {
    .hero-mini-form {
        flex-direction: column;
    }

    .hero-mini-form input {
        min-width: 100%;
    }

    .hero-mini-form button[type="submit"] {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   7. CTA BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.hero-cta .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full, 999px);
    text-decoration: none;
    transition: all 0.2s;
}

.hero-cta .btn-primary {
    background: var(--color-brand-red, #EC1C24);
    color: white;
    border: none;
    box-shadow: 0 6px 18px rgba(236, 28, 36, 0.35);
}

.hero-cta .btn-primary:hover {
    background: var(--color-brand-red-dark, #b9151b);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(236, 28, 36, 0.45);
}

.hero-cta .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-cta .btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   8. OBJECTION INTERCEPT (Expandable FAQ)
   ═══════════════════════════════════════════════════════════════════════════════ */

.hero-objection {
    margin-top: var(--space-8);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 700px;
}

.hero--centered .hero-objection,
.hero--compact-form .hero-objection {
    margin-left: auto;
    margin-right: auto;
}

.hero-objection summary {
    padding: var(--space-4) var(--space-5);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.hero-objection summary::-webkit-details-marker {
    display: none;
}

.hero-objection summary::before {
    content: "+";
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-brand-red, #EC1C24);
}

.hero-objection[open] summary::before {
    content: "−";
}

.hero-objection .intercept-content {
    padding: 0 var(--space-5) var(--space-5);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.hero-objection .intercept-content ol {
    margin: var(--space-3) 0 0;
    padding-left: var(--space-5);
}

.hero-objection .intercept-content li {
    margin-bottom: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   9. LOCATION-SPECIFIC MODIFIERS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Metro: Stronger urban presence */
.hero--location-metro {
    /* Inherits from hero--bg-urban */
}

/* Beach: Relaxed coastal vibe */
.hero--location-beach {
    /* Inherits from hero--bg-coastal */
}

/* Premium: Refined, exclusive feel */
.hero--location-premium .hero-mini-form {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Suburban: Friendly, approachable */
.hero--location-suburban {
    /* Standard treatment, no modifications needed */
}

/* Growing: Progress-oriented */
.hero--location-growing .trust-item--primary {
    color: #4ade80;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   10. RESPONSIVE REFINEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .section-hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-hero .hero-lead {
        font-size: 0.95rem;
    }

    .hero--grid-form,
    .hero--grid-reverse,
    .hero--split,
    .hero--compact-form,
    .hero--centered {
        padding: clamp(32px, 5vw, 60px) 0;
    }
}

@media (max-width: 480px) {
    .section-hero h1 {
        font-size: 1.4rem;
    }

    .trust-item {
        font-size: 0.8rem;
    }
}

/* Mobile CTAs - Show on mobile when form is below fold */
@media (max-width: 980px) {
    .hero--grid-form .hero-cta-mobile {
        display: flex !important;
        flex-direction: column;
        gap: var(--space-3);
        margin-top: var(--space-5);
    }
}
