/* ============================================
   CRO-OPTIMIZED CSS
   Focus: Speed, Clarity, Conversion
============================================ */

:root {
    --cream: #FDFBF7;
    --ivory: #F8F6F1;
    --charcoal: #1C1C1C;
    --brass: #B8860B;
    --brass-light: #D4A017;
    --muted: #6B6B6B;
    --success: #059669;
    --urgent: #DC2626;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Safe area insets for notched devices */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Typography */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-mono { font-family: 'IBM Plex Mono', monospace; }

/* Hugeicons base styling */
.hgi-stroke {
    font-size: 1.25em;
    line-height: 1;
    vertical-align: middle;
}

/* Container - fluid padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 24px);
}

/* ============================================
   DEV BANNER (Site-in-progress notice)
============================================ */
.dev-banner {
    position: sticky;
    top: 0;
    z-index: 1001;
    background:
        repeating-linear-gradient(
            -45deg,
            #DC2626 0,
            #DC2626 24px,
            #B91C1C 24px,
            #B91C1C 48px
        );
    color: #fff;
    font-family: 'DM Sans', system-ui, sans-serif;
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 14px rgba(220, 38, 38, 0.45);
    overflow: hidden;
}

/* When the banner is shown, push the sticky header below it */
body.has-dev-banner .sticky-header {
    top: var(--dev-banner-height, 52px);
}

.dev-banner[hidden] {
    display: none;
}

.dev-banner-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(16px, 4vw, 24px);
    max-width: 100%;
}

.dev-banner-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.dev-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
    animation: pulse 1.4s infinite;
}

.dev-banner-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.dev-banner-marquee-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: dev-banner-scroll 28s linear infinite;
    will-change: transform;
}

.dev-banner-marquee:hover .dev-banner-marquee-track,
.dev-banner-marquee:focus-within .dev-banner-marquee-track {
    animation-play-state: paused;
}

.dev-banner-item {
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    padding-right: 56px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dev-banner-item::before {
    content: '⚠';
    margin-right: 14px;
    font-weight: 700;
}

@keyframes dev-banner-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .dev-banner-marquee-track {
        animation: none;
    }
}

@media (max-width: 640px) {
    .dev-banner-inner {
        gap: 10px;
        padding: 10px 14px;
    }

    .dev-banner-label {
        font-size: 0.6875rem;
        letter-spacing: 0.1em;
    }

    .dev-banner-item {
        font-size: 0.8125rem;
        padding-right: 40px;
    }

    .dev-banner-item::before {
        margin-right: 10px;
    }
}

/* ============================================
   STICKY HEADER WITH CTA (Always visible)
============================================ */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.sticky-header.visible {
    transform: translateY(0);
}

.sticky-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-header .logo {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--charcoal);
    text-decoration: none;
}

.sticky-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sticky-cta .urgency {
    font-size: 0.75rem;
    color: var(--urgent);
    font-weight: 600;
}

/* ============================================
   PRIMARY CTA BUTTON (High contrast, clear)
============================================ */
/* Buttons - 44px minimum touch target */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 14px 28px;
    background: var(--charcoal);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
    background: #2D2D2D;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.large {
    min-height: 56px;
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-primary .hgi-stroke,
.btn-secondary .hgi-stroke {
    font-size: 1.125em;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 14px 28px;
    background: transparent;
    color: var(--charcoal);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
    background: var(--charcoal);
    color: white;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* ============================================
   HERO SECTION (Above the fold conversion)
============================================ */
.hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    padding: clamp(60px, 10vh, 100px) 0 clamp(40px, 8vh, 60px);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 60px);
    align-items: center;
}

/* Trust badge - immediate credibility */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.trust-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero h1 .highlight {
    color: var(--brass);
    font-style: italic;
}

/* Value proposition - specific and benefit-focused */
.value-prop {
    font-size: 1.125rem;
    color: var(--muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.value-prop strong {
    color: var(--charcoal);
}

/* CTA area with urgency */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 40px;
}

.urgency-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--urgent);
    font-weight: 500;
}

.urgency-text .hgi-stroke {
    font-size: 1rem;
}

/* Social proof - immediate trust */
.hero-proof {
    display: flex;
    gap: 40px;
    padding-top: 32px;
    border-top: 1px solid #EBE6DC;
}

.proof-stat {
    text-align: left;
}

.proof-stat .number {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1;
}

.proof-stat .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 4px;
}

/* Hero image with floating elements */
.hero-visual {
    position: relative;
}

.hero-image {
    border-radius: clamp(12px, 2vw, 16px);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.hero-image img {
    width: 100%;
    height: clamp(280px, 50vh, 500px);
    object-fit: cover;
    display: block;
}

/* Floating testimonial - social proof */
.floating-testimonial {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: white;
    padding: clamp(16px, 3vw, 24px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: min(320px, calc(100% - 40px));
    z-index: 10;
}

.floating-testimonial .quote {
    font-size: 0.9375rem;
    color: var(--charcoal);
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.5;
}

.floating-testimonial .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-testimonial .author-avatar {
    width: 40px;
    height: 40px;
    background: var(--brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.floating-testimonial .author-info .name {
    font-weight: 600;
    font-size: 0.875rem;
}

.floating-testimonial .author-info .role {
    font-size: 0.75rem;
    color: var(--muted);
}

/* ============================================
   LOGO BAR (Trust through association)
============================================ */
.logo-bar {
    padding: 40px 0;
    background: white;
    border-top: 1px solid #EBE6DC;
    border-bottom: 1px solid #EBE6DC;
}

.logo-bar .container {
    text-align: center;
}

.logo-bar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-bottom: 24px;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.logo-item {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    opacity: 0.7;
}

/* ============================================
   PROBLEM/SOLUTION SECTION (Pain points)
============================================ */
.problem-section {
    padding: clamp(60px, 10vw, 100px) 0;
    background: var(--ivory);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--brass);
    margin-bottom: 16px;
}

.section-label::before,
.section-label::after {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--brass);
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-header h2 .highlight {
    color: var(--brass);
    font-style: italic;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--muted);
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.problem-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.problem-card .icon {
    width: 48px;
    height: 48px;
    background: rgba(184, 134, 11, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--brass);
}

.problem-card .icon .hgi-stroke {
    font-size: 1.5rem;
}

.problem-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.problem-card p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ============================================
   SERVICES WITH BENEFITS (Not features)
============================================ */
.services-section {
    padding: clamp(60px, 10vw, 100px) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.service-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.service-card.featured {
    grid-column: span 2;
}

.service-card.featured .service-image {
    height: 100%;
    min-height: 300px;
}

.service-image {
    height: clamp(200px, 30vw, 280px);
}

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

.service-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--brass);
    font-weight: 500;
    margin-bottom: 12px;
}

.service-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-content p {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.service-benefits {
    list-style: none;
}

.service-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.service-benefits li .hgi-stroke {
    color: var(--success);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================
   SOCIAL PROOF SECTION (Testimonials)
============================================ */
.testimonials-section {
    padding: clamp(60px, 10vw, 100px) 0;
    background: var(--charcoal);
    color: white;
}

.testimonials-section .section-label {
    color: var(--brass);
}

.testimonials-section .section-label::before,
.testimonials-section .section-label::after {
    background: var(--brass);
}

.testimonials-section .section-header h2 {
    color: white;
}

.testimonials-section .section-header p {
    color: rgba(255,255,255,0.7);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: rgba(255,255,255,0.05);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.testimonial-card .stars {
    color: var(--brass);
    margin-bottom: 16px;
    font-size: 1.125rem;
}

.testimonial-card .quote {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.9);
}

.testimonial-card .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-card .author-avatar {
    width: 48px;
    height: 48px;
    background: var(--brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.testimonial-card .author-info .name {
    font-weight: 600;
}

.testimonial-card .author-info .role {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
}

/* ============================================
   STATS SECTION (Credibility)
============================================ */
.stats-section {
    padding: clamp(50px, 8vw, 80px) 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 4vw, 40px);
    text-align: center;
}

.stat-item .number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1;
}

.stat-item .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5625rem, 1.5vw, 0.6875rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: 8px;
}

/* ============================================
   ACCREDITATIONS (Trust signals)
============================================ */
.accreditations-section {
    padding: clamp(50px, 8vw, 80px) 0;
    background: var(--ivory);
}

.accreditations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.accreditation-card {
    background: white;
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.accreditation-card .badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border: 2px solid #EBE6DC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
}

.accreditation-card .title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.accreditation-card .desc {
    font-size: 0.8125rem;
    color: var(--muted);
}

/* ============================================
   LEAD CAPTURE FORM (Conversion focus)
============================================ */
.cta-section {
    padding: clamp(60px, 10vw, 100px) 0;
    background: linear-gradient(rgba(28,28,28,0.9), rgba(28,28,28,0.9)),
                url('https://images.unsplash.com/photo-1515165562839-978bbcf18277?w=1920&q=80') center/cover;
    color: white;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
}

.cta-content h2 .highlight {
    color: var(--brass);
    font-style: italic;
}

.cta-content p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
}

.cta-benefits {
    list-style: none;
}

.cta-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}

.cta-benefits li .hgi-stroke {
    color: var(--brass);
    flex-shrink: 0;
    font-size: 1.25rem;
}

/* Form styling */
.lead-form {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.9375rem;
    color: var(--muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px; /* Touch-friendly */
    padding: 14px 16px;
    border: 1px solid #EBE6DC;
    border-radius: 8px;
    font-size: 16px; /* Prevents iOS zoom */
    font-family: inherit;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.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='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-submit {
    width: 100%;
    min-height: 52px;
    padding: 16px;
    background: var(--charcoal);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.form-submit:hover {
    background: #2D2D2D;
    transform: translateY(-2px);
}

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

.form-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.form-trust .hgi-stroke {
    color: var(--success);
    font-size: 1rem;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: var(--charcoal);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
}

.footer-col h4 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brass);
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   EXIT INTENT POPUP
============================================ */
.exit-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.exit-popup.active {
    display: flex;
}

.exit-popup-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: clamp(24px, 5vw, 48px);
    text-align: center;
    position: relative;
    animation: popIn 0.3s ease;
    margin: auto;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

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

.exit-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.exit-popup-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.exit-popup-content p {
    color: var(--muted);
    margin-bottom: 24px;
}

.exit-popup-content .offer {
    background: var(--ivory);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.exit-popup-content .offer strong {
    display: block;
    font-size: 1.125rem;
    color: var(--brass);
    margin-bottom: 4px;
}

/* ============================================
   FLOATING CTA (Mobile)
============================================ */
.floating-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 900;
}

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

/* ============================================
   RESPONSIVE - Mobile-first approach with
   intermediate breakpoints
============================================ */

/* Large tablets and small laptops (1024px) */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        order: -1;
    }

    .floating-testimonial {
        position: relative;
        bottom: 0;
        left: 0;
        margin-top: -60px;
        margin-left: 20px;
        margin-right: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        grid-template-columns: 1fr;
    }

    .service-card.featured {
        grid-column: span 1;
    }

    .cta-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .logo-grid {
        gap: 40px;
    }
}

/* Medium breakpoint - tablets (900px) */
@media (max-width: 900px) {
    .sticky-header .container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .sticky-cta .urgency {
        display: none;
    }

    .logo-grid {
        gap: 24px 40px;
    }

    .logo-item {
        font-size: 1rem;
    }

    .problems-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .problem-card {
        padding: 24px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 24px;
    }

    .accreditations-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .accreditation-card {
        padding: 24px 16px;
    }

    .accreditation-card .badge {
        width: 56px;
        height: 56px;
        font-size: 1rem;
    }

    .lead-form {
        padding: 32px 24px;
    }
}

/* Tablets portrait (768px) */
@media (max-width: 768px) {
    /* Fixed navbar always visible on mobile */
    .sticky-header {
        transform: translateY(0);
    }

    .hero {
        padding-top: clamp(80px, 12vh, 120px);
    }

    .hero-proof {
        gap: 24px;
        flex-wrap: wrap;
    }

    .proof-stat {
        flex: 1 1 auto;
        min-width: 100px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 16px;
    }

    .accreditations-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 24px;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .floating-cta {
        display: block;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .hero-cta .btn-secondary {
        display: none;
    }

    /* Add bottom padding to account for floating CTA */
    .footer {
        padding-bottom: 100px;
    }

    .service-image {
        height: clamp(180px, 40vw, 250px);
    }
}

/* Large phones / small tablets (640px) */
@media (max-width: 640px) {
    .hero h1 {
        font-size: clamp(1.875rem, 7vw, 2.5rem);
    }

    .hero-proof {
        gap: 20px;
    }

    .trust-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .value-prop {
        font-size: 1rem;
    }

    .problems-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-label::before,
    .section-label::after {
        width: 24px;
    }

    .logo-grid {
        flex-direction: column;
        gap: 16px;
    }

    .logo-item {
        font-size: 0.9375rem;
    }

    .cta-benefits li {
        font-size: 0.9375rem;
    }

    .lead-form {
        padding: 24px 20px;
    }

    .form-header h3 {
        font-size: 1.25rem;
    }
}

/* Mobile phones (480px) */
@media (max-width: 480px) {
    .hero-proof {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .proof-stat {
        min-width: unset;
    }

    .stats-grid,
    .accreditations-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .exit-popup-content h3 {
        font-size: 1.5rem;
        padding-right: 32px;
    }

    .exit-popup-content .offer {
        padding: 16px;
    }

    .accreditation-card .badge {
        width: 48px;
        height: 48px;
        font-size: 0.875rem;
    }

    .accreditation-card .title {
        font-size: 0.625rem;
    }

    .accreditation-card .desc {
        font-size: 0.75rem;
    }
}

/* Very small phones (360px) */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .btn-primary.large {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }

    .stats-grid,
    .accreditations-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 16px 0;
        border-bottom: 1px solid #EBE6DC;
    }

    .stat-item:last-child {
        border-bottom: none;
    }
}

/* Landscape mobile handling */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-image img {
        height: clamp(200px, 35vh, 300px);
    }

    .floating-cta {
        display: none;
    }
}

/* High DPI / Retina specific adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}
