/* ========================================
   Alipaz Partners — Landing Page Styles
   Ice & Deep Slate / Dusk Gradient
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Light Mode (default) ---- */
:root {
    --bg-gradient: linear-gradient(150deg, #eaf2f8 0%, #d0e4f0 50%, #b8d4e8 100%);
    --bg-section: #dce8f2;
    --bg-card: rgba(255, 255, 255, 0.5);
    --bg-card-hover: rgba(255, 255, 255, 0.7);
    --nav-bg: rgba(234, 242, 248, 0.75);
    --text-primary: #18202e;
    --text-secondary: #526070;
    --text-muted: #6b7a8a;
    --accent: #2a3f6e;
    --btn-primary-bg: #18202e;
    --btn-primary-text: #eaf2f8;
    --btn-ghost-border: rgba(24, 32, 46, 0.2);
    --border-subtle: rgba(24, 32, 46, 0.08);
    --icon-bg: #18202e;
    --icon-color: #eaf2f8;
    --badge-bg: rgba(42, 63, 110, 0.1);
    --badge-text: #2a3f6e;
    --carrier-filter: none;
    --transition: 0.3s ease;
    --success: #10B981;
    --success-subtle: rgba(16, 185, 129, 0.1);
    --increase: #DC2626;
    --increase-bg: rgba(220, 38, 38, 0.08);
    --rate-old: #16a34a;
    --rate-old-bg: rgba(22, 163, 74, 0.08);
    --form-bg: rgba(255, 255, 255, 0.65);
    --form-border: rgba(24, 32, 46, 0.12);
    --form-focus: #2a3f6e;
    --input-bg: rgba(255, 255, 255, 0.8);
    --border-hover: rgba(42, 63, 110, 0.2);
    --focus-ring: rgba(42, 63, 110, 0.08);
    --option-hover-bg: rgba(144, 184, 216, 0.12);
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
    --bg-gradient: linear-gradient(150deg, #1e2840 0%, #162038 50%, #0e1628 100%);
    --bg-section: #172030;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(30, 40, 64, 0.8);
    --text-primary: #dce8f4;
    --text-secondary: #7a90a8;
    --text-muted: #5e7288;
    --accent: #90b8d8;
    --btn-primary-bg: #dce8f4;
    --btn-primary-text: #1e2840;
    --btn-ghost-border: rgba(220, 232, 244, 0.2);
    --border-subtle: rgba(220, 232, 244, 0.08);
    --icon-bg: #dce8f4;
    --icon-color: #1e2840;
    --badge-bg: rgba(144, 184, 216, 0.12);
    --badge-text: #90b8d8;
    --carrier-filter: none;
    --success: #34D399;
    --success-subtle: rgba(52, 211, 153, 0.1);
    --increase: #F87171;
    --increase-bg: rgba(248, 113, 113, 0.08);
    --rate-old: #4ade80;
    --rate-old-bg: rgba(74, 222, 128, 0.08);
    --form-bg: rgba(255, 255, 255, 0.04);
    --form-border: rgba(220, 232, 244, 0.12);
    --form-focus: #90b8d8;
    --input-bg: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(144, 184, 216, 0.2);
    --focus-ring: rgba(144, 184, 216, 0.08);
    --option-hover-bg: rgba(144, 184, 216, 0.12);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    text-wrap: pretty;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Spectral', serif;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 2px;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--btn-ghost-border);
}

.btn-ghost:hover {
    background: rgba(24, 32, 46, 0.04);
    border-color: rgba(24, 32, 46, 0.3);
}

[data-theme="dark"] .btn-ghost:hover {
    background: rgba(220, 232, 244, 0.06);
    border-color: rgba(220, 232, 244, 0.3);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

/* ---- Nav ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo-img {
    height: 38px;
    width: auto;
}

.logo-light { display: block; }
.logo-dark { display: none; }

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.nav-divider {
    width: 1px;
    height: 32px;
    background: var(--text-primary);
    opacity: 0.15;
}

.nav-brand-text {
    font-family: 'Spectral', serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 15px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn):not(.nav-sign-in) {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-links a:not(.btn):not(.nav-sign-in):hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 16px;
}

.nav-sign-in {
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-sign-in:hover {
    color: var(--text-primary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---- Theme Toggle ---- */

.theme-toggle {
    background: none;
    border: 1px solid var(--btn-ghost-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: border-color var(--transition), background var(--transition);
}

.theme-toggle:hover {
    border-color: var(--text-secondary);
    background: var(--bg-card);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.theme-toggle:hover svg {
    color: var(--text-primary);
}

.nav-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-mobile {
    display: none;
}

.icon-sun { display: none; }
.icon-moon { display: block; }

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---- Hero ---- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 72px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 24px 0;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero h1 {
    font-family: 'Spectral', serif;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 36px;
}

.hero h1 .accent-text {
    display: inline-block;
    margin-top: 12px;
}

.accent-text {
    color: var(--accent);
}

.hero-h2 {
    font-family: 'Spectral', serif;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 16px;
    line-height: 1.7;
}

.hero-stat {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 700;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.highlight-stat {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: -0.01em;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Trust Bar ---- */

.trust-bar {
    padding: 60px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-section);
}

.trust-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

/* Marquee */
.marquee {
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-set {
    display: flex;
    align-items: center;
    gap: 56px;
    padding-right: 56px;
    flex-shrink: 0;
}

.marquee-set img {
    height: 36px;
    width: auto;
    opacity: 0.7;
    filter: var(--carrier-filter);
    transition: opacity var(--transition);
    flex-shrink: 0;
}

.marquee-set img:hover {
    opacity: 1;
}

.marquee-set img[alt="Cirro logo"] {
    height: 92px;
}

.marquee-set img[alt="USPS logo"] {
    height: 40px;
}

.marquee-set img[alt="OnTrac logo"] {
    height: 44px;
}

.marquee-set img[alt="UPS logo"] {
    height: 44px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Section Common ---- */

.section-eyebrow {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    text-align: center;
    font-family: 'Spectral', serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* ---- Problem Section (Reframe) ---- */

.problem-section {
    padding: 100px 0;
    background: var(--bg-section);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 36px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.problem-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .problem-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.problem-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.problem-icon svg {
    width: 24px;
    height: 24px;
    color: var(--icon-color);
}

.problem-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---- Stats Section (Rational Drowning) ---- */

.stats-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Spectral', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 260px;
    margin: 0 auto;
}

/* ---- Features ---- */

.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 36px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 2px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    color: var(--icon-color);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---- Testimonials ---- */

.testimonials {
    padding: 100px 0;
    background: var(--bg-section);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .testimonial-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-quote {
    flex: 1;
    margin-bottom: 24px;
}

.quote-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

.testimonial-quote p {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--icon-bg);
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.testimonial-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.testimonial-metric {
    background: var(--badge-bg);
    border-radius: 2px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric-value {
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ---- How It Works ---- */

.how-it-works {
    padding: 100px 0;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-top: 56px;
}

.step {
    text-align: center;
    max-width: 320px;
    flex-shrink: 0;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border-subtle);
    margin-top: 28px;
    flex-shrink: 0;
}

/* ---- Free Tools Teaser ---- */

.tools-teaser {
    padding: 100px 0;
    background: var(--bg-section);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.tool-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 36px;
    transition: transform var(--transition), border-color var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

[data-theme="dark"] .tool-card:hover {
    border-color: var(--border-hover);
}

.tool-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 2px;
    background: var(--badge-bg);
    color: var(--badge-text);
    margin-bottom: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.tool-card-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---- FAQ ---- */

.faq {
    padding: 100px 0;
}

.faq-list {
    max-width: 720px;
    margin: 32px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-subtle);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: color var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    padding-bottom: 20px;
}

/* ---- CTA + Form ---- */

.cta-form {
    padding: 100px 0;
    background: var(--bg-section);
}

.cta-form-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.cta-form-text h2 {
    font-family: 'Spectral', serif;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.cta-form-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.cta-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cta-checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.cta-checklist li svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

/* Form Wrapper */
.form-wrapper {
    position: relative;
}

.contact-form {
    background: var(--form-bg);
    border: 1px solid var(--form-border);
    border-radius: 2px;
    padding: 36px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--form-border);
    border-radius: 2px;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--form-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-group input.error {
    border-color: #EF4444;
}

/* Custom Select */
.custom-select {
    position: relative;
}

.custom-select-trigger {
    width: 100%;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--form-border);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.custom-select-trigger:hover {
    border-color: var(--text-muted);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--form-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

[data-theme="dark"] .custom-select-trigger:focus {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--form-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

[data-theme="dark"] .custom-select.open .custom-select-trigger {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.custom-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-value.placeholder {
    color: var(--text-muted);
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--form-border);
    border-radius: 2px;
    list-style: none;
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .custom-select-options {
    background: #1a2438;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-select-options li {
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-select-options li:hover {
    background: rgba(214, 230, 245, 0.7);
}

[data-theme="dark"] .custom-select-options li:hover {
    background: var(--option-hover-bg);
}

.custom-select-options li.selected {
    color: var(--accent);
    font-weight: 600;
}

.contact-form .btn {
    margin-top: 4px;
}

.btn-text,
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Form Success */
.form-success {
    background: var(--form-bg);
    border: 1px solid var(--form-border);
    border-radius: 2px;
    padding: 48px 36px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 28px;
    height: 28px;
    color: var(--success);
}

.form-success h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.form-success p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- Rate Comparison Section ---- */

.rate-comparison {
    padding: 100px 0;
}

.rate-table-wrapper {
    max-width: 720px;
    margin: 48px auto 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: fixed;
}

.rate-table col:nth-child(1) { width: 45%; }
.rate-table col:nth-child(2) { width: 15%; }
.rate-table col:nth-child(3) { width: 15%; }
.rate-table col:nth-child(4) { width: 25%; }

.rate-table thead {
    border-bottom: 2px solid var(--border-subtle);
}

.rate-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.rate-table th:last-child {
    text-align: right;
}

.rate-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.charge-name {
    font-weight: 600;
    color: var(--text-primary);
}

.rate-old {
    color: var(--rate-old);
    font-weight: 500;
}

.rate-new {
    color: var(--text-primary);
    font-weight: 600;
}

.rate-table td:last-child {
    text-align: right;
}

.increase-badge {
    display: inline-block;
    background: var(--increase-bg);
    color: var(--increase);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 2px;
    letter-spacing: 0.02em;
    min-width: 70px;
    text-align: center;
}

.rate-callouts {
    max-width: 720px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rate-callout {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 32px;
}

.rate-callout h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.rate-callout p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.rate-callout p strong {
    color: var(--text-primary);
}

.rate-callout-primary {
    border-color: var(--increase);
    border-width: 1px;
    border-left-width: 4px;
}

.callout-highlight {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.callout-old {
    font-family: 'Spectral', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--rate-old);
}

.callout-new {
    font-family: 'Spectral', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--increase);
}

.callout-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.rate-closing {
    text-align: center;
    font-family: 'Spectral', serif;
    font-size: 1.25rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 48px;
}

.rate-warning {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 16px;
}

.mid-cta {
    text-align: center;
    margin-top: 48px;
}

/* ---- Savings Estimator ---- */

.estimator-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.estimator {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 48px 40px;
}

.estimator-input {
    margin-bottom: 36px;
}

.estimator-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.estimator-slider-row {
    padding: 0 4px;
}

.estimator-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-subtle);
    outline: none;
    cursor: pointer;
}

.estimator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--btn-primary-bg);
    cursor: pointer;
    border: 3px solid var(--btn-primary-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.estimator-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.estimator-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--btn-primary-bg);
    cursor: pointer;
    border: 3px solid var(--btn-primary-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.estimator-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.estimator-spend-display {
    text-align: center;
    margin-top: 20px;
}

.estimator-spend-display span:first-child {
    font-family: 'Spectral', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.estimator-per {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.estimator-result {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 32px;
}

.estimator-result-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.estimator-result-number {
    font-family: 'Spectral', serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.estimator-result-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.estimator-cta {
    text-align: center;
}

.estimator-cta p {
    font-family: 'Spectral', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ---- Footer ---- */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 64px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    font-family: 'Spectral', serif;
    font-size: 1.15rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-primary);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
    max-width: 260px;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding: 24px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.powered-by {
    opacity: 0.5;
}

/* ---- Animations ---- */

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.25s; }
.delay-2 { transition-delay: 0.5s; }
.delay-3 { transition-delay: 0.75s; }

tr.fade-up {
    opacity: 0;
    transform: none;
    transition: opacity 0.8s ease;
}

tr.fade-up.visible {
    opacity: 1;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .features-grid {
        gap: 20px;
    }

    .feature-card {
        padding: 28px;
    }

    .steps {
        gap: 0;
    }

    .step-connector {
        width: 48px;
    }

    .cta-form-inner {
        gap: 40px;
    }

    .testimonials-grid {
        gap: 20px;
    }

    .stats-grid {
        gap: 32px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Nav */
    .nav-toggle {
        display: flex;
        z-index: 10;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        flex-direction: column;
        padding: 24px 20px;
        gap: 8px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a:not(.btn):not(.nav-sign-in) {
        padding: 12px 0;
        font-size: 1rem;
    }

    .nav-actions {
        flex-direction: column;
        margin-left: 0;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-subtle);
        width: 100%;
        gap: 12px;
    }

    .nav-sign-in {
        text-align: center;
        padding: 12px 0;
        font-size: 1rem !important;
    }

    .nav-actions .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .theme-toggle-mobile {
        display: flex;
    }

    .nav-actions .theme-toggle {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 72px;
    }

    .hero-content {
        padding: 56px 20px 64px;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 20px;
    }

    .hero h1 br {
        display: block;
    }

    .hero-sub {
        font-size: 1rem;
        margin-bottom: 32px;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Trust Bar */
    .trust-bar {
        padding: 40px 0;
    }

    .trust-label {
        font-size: 0.75rem;
        margin-bottom: 24px;
    }

    .marquee-set {
        gap: 40px;
        padding-right: 40px;
    }

    .marquee-set img {
        height: 26px;
    }

    .hero-h2 {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .hero-stat {
        font-size: 1rem;
    }

    /* Rate Comparison */
    .rate-table-wrapper {
        margin-top: 32px;
    }

    .rate-table th,
    .rate-table td {
        padding: 12px;
        font-size: 0.875rem;
    }

    .rate-callouts {
        margin-top: 32px;
    }

    .rate-callout {
        padding: 24px;
    }

    .callout-old,
    .callout-new {
        font-size: 1.75rem;
    }

    .rate-closing {
        font-size: 1.1rem;
        margin-top: 36px;
    }

    .rate-warning {
        font-size: 0.95rem;
    }

    .estimator {
        padding: 32px 20px;
    }

    .estimator-spend-display span:first-child {
        font-size: 1.75rem;
    }

    /* Sections */
    .problem-section,
    .features,
    .testimonials,
    .tools-teaser,
    .how-it-works,
    .cta-form,
    .faq,
    .rate-comparison {
        padding: 64px 0;
    }

    .stats-section {
        padding: 48px 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 12px;
    }

    .section-title br {
        display: block;
    }

    .section-sub {
        font-size: 1rem;
        margin-bottom: 36px;
    }

    /* Problem */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }

    .problem-card {
        padding: 28px;
    }

    .problem-card:hover {
        transform: none;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }

    .feature-card {
        padding: 24px;
    }

    .feature-card:hover {
        transform: none;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 32px;
    }

    .testimonial-card {
        padding: 24px;
    }

    .testimonial-card:hover {
        transform: none;
    }

    /* Tools */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-card {
        padding: 24px;
    }

    .tool-card:hover {
        transform: none;
    }

    /* Steps */
    .steps {
        flex-direction: column;
        align-items: center;
        gap: 0;
        margin-top: 36px;
    }

    .step {
        max-width: 100%;
        padding: 0 12px;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .step-connector {
        width: 2px;
        height: 32px;
        margin: 8px auto;
    }

    /* FAQ */
    .faq-list {
        margin-top: 24px;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 16px 0;
    }

    /* CTA Form */
    .cta-form-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cta-form-text {
        text-align: center;
    }

    .cta-checklist {
        align-items: center;
    }

    .cta-form-text h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .contact-form {
        padding: 28px;
    }

    /* Footer */
    .footer {
        padding-top: 40px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
        padding-bottom: 32px;
    }

    .footer-links {
        gap: 48px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* Touch active states */
    .feature-card:active,
    .problem-card:active,
    .testimonial-card:active,
    .tool-card:active {
        border-color: var(--border-hover);
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-inner {
        padding: 0 16px;
    }

    .nav-brand-text {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .nav-logo-img {
        height: 26px;
    }

    .nav-divider {
        height: 22px;
    }

    .hero-content {
        padding: 40px 16px 56px;
    }

    .hero h1 {
        font-size: 1.85rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .hero-eyebrow {
        font-size: 0.65rem;
    }

    .marquee-set {
        gap: 36px;
        padding-right: 36px;
    }

    .marquee-set img {
        height: 24px;
    }

    .marquee-track {
        animation-duration: 20s;
    }

    .problem-section,
    .features,
    .testimonials,
    .tools-teaser,
    .how-it-works,
    .cta-form,
    .faq,
    .rate-comparison {
        padding: 48px 0;
    }

    .stats-section {
        padding: 40px 0;
    }

    .problem-card,
    .feature-card,
    .tool-card,
    .testimonial-card {
        padding: 20px;
    }

    .rate-table th,
    .rate-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .rate-callout {
        padding: 20px;
    }

    .callout-old,
    .callout-new {
        font-size: 1.5rem;
    }

    .rate-closing {
        font-size: 1.05rem;
    }

    .contact-form {
        padding: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .btn-lg {
        padding: 13px 24px;
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .metric-value {
        font-size: 1.25rem;
    }
}

/* Extra small phones */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .nav-brand-text {
        font-size: 10px;
    }

    .section-title {
        font-size: 1.35rem;
    }
}

/* ---- Sticky Mobile CTA ---- */
.sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .sticky-cta {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-subtle);
    }

    .sticky-cta.visible {
        display: block;
    }

    .sticky-cta .btn {
        font-size: 0.95rem;
        padding: 14px 20px;
    }

    /* Add bottom padding to body so footer isn't hidden behind sticky CTA */
    body.has-sticky-cta {
        padding-bottom: 72px;
    }
}

/* Ensure touch targets are at least 44px */
@media (pointer: coarse) {
    .nav-links a:not(.btn) {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-col a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .faq-question {
        min-height: 44px;
    }
}
