/* Tax Optimization — Replit / Lovable-style theme (isolated) */

:root {
    --tx-bg: #fafafa;
    --tx-surface: #ffffff;
    --tx-foreground: #0f0f0f;
    --tx-muted: #6b7280;
    --tx-muted-bg: #f3f4f6;
    --tx-border: #e5e7eb;
    --tx-primary: #e85d04;
    --tx-primary-hover: #c2410c;
    --tx-primary-soft: #fff7ed;
    --tx-success: #15803d;
    --tx-success-soft: #f0fdf4;
    --tx-radius: 12px;
    --tx-radius-lg: 16px;
    --tx-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --tx-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --tx-max: 1120px;
    --tx-font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.tx-page {
    font-family: var(--tx-font);
    background: var(--tx-bg);
    color: var(--tx-foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.tx-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tx-border);
}

.tx-header-inner {
    max-width: var(--tx-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tx-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--tx-foreground);
    font-weight: 600;
    font-size: 0.95rem;
}

.tx-logo img { height: 32px; width: auto; border-radius: 6px; }

.tx-nav { display: flex; align-items: center; gap: 8px; }

.tx-nav a {
    color: var(--tx-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.tx-nav a:hover { color: var(--tx-foreground); background: var(--tx-muted-bg); }

.tx-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tx-primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    transition: background 0.15s;
    white-space: nowrap;
}

.tx-header-cta:hover { background: var(--tx-primary-hover); }

/* Layout */
.tx-container { max-width: var(--tx-max); margin: 0 auto; padding: 0 24px; }
.tx-section { padding: 80px 0; }

.tx-section-alt {
    background: var(--tx-surface);
    border-top: 1px solid var(--tx-border);
    border-bottom: 1px solid var(--tx-border);
}

.tx-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.tx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tx-primary-soft);
    color: var(--tx-primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.tx-section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 12px;
}

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

/* Hero */
.tx-hero { padding: 72px 0 80px; }

.tx-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.tx-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.tx-hero-lead {
    font-size: 1.125rem;
    color: var(--tx-muted);
    margin-bottom: 28px;
    max-width: 480px;
}

.tx-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.tx-stat {
    padding: 14px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}

.tx-stat-value {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--tx-primary);
}

.tx-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--tx-muted);
    margin-top: 2px;
}

.tx-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tx-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tx-primary);
    color: #fff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.tx-btn-primary:hover { background: var(--tx-primary-hover); }

.tx-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tx-surface);
    color: var(--tx-foreground);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--tx-border);
    transition: background 0.15s;
}

.tx-btn-secondary:hover { background: var(--tx-muted-bg); }

/* Savings mock */
.tx-hero-visual {
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    box-shadow: var(--tx-shadow-md);
    overflow: hidden;
}

.tx-mock { padding: 24px; }

.tx-mock-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tx-border);
}

.tx-mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tx-border); }
.tx-mock-dot:first-child { background: #fca5a5; }
.tx-mock-dot:nth-child(2) { background: #fcd34d; }
.tx-mock-dot:nth-child(3) { background: #86efac; }

.tx-mock-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--tx-muted);
    font-weight: 500;
}

.tx-mock-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tx-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 16px 0 8px;
}

.tx-mock-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--tx-muted-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.8125rem;
}

.tx-mock-row.savings span:last-child { font-weight: 700; color: var(--tx-success); }
.tx-mock-row.highlight { background: var(--tx-primary-soft); border: 1px solid #fed7aa; }

/* Tax types grid */
.tx-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tx-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.tx-card {
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    padding: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.tx-card:hover { box-shadow: var(--tx-shadow-md); border-color: #d1d5db; }

.tx-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tx-primary-soft);
    color: var(--tx-primary);
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 14px;
}

.tx-card h3, .tx-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.tx-card p { font-size: 0.875rem; color: var(--tx-muted); line-height: 1.55; }

/* Challenge pills */
.tx-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tx-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tx-pill i { color: var(--tx-success); font-size: 0.75rem; }

/* Intro block */
.tx-intro {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.05rem;
    color: var(--tx-muted);
    line-height: 1.7;
}

/* Guarantee banner */
.tx-guarantee {
    margin-top: 48px;
    padding: 28px 32px;
    background: var(--tx-foreground);
    color: #fff;
    border-radius: var(--tx-radius-lg);
    text-align: center;
}

.tx-guarantee h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.tx-guarantee p {
    margin-top: 8px;
    color: #9ca3af;
    font-size: 0.9375rem;
}

/* Steps */
.tx-steps { max-width: 720px; margin: 0 auto; }

.tx-step {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--tx-border);
}

.tx-step:last-child { border-bottom: none; }

.tx-step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tx-primary-soft);
    color: var(--tx-primary);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
}

.tx-step strong { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9375rem; }
.tx-step span { font-size: 0.9375rem; color: var(--tx-muted); }

/* Framework callout */
.tx-callout {
    margin-top: 48px;
    padding: 32px;
    background: var(--tx-primary-soft);
    border: 1px solid #fed7aa;
    border-radius: var(--tx-radius-lg);
}

.tx-callout h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.tx-callout p {
    font-size: 0.9375rem;
    color: var(--tx-muted);
    line-height: 1.65;
    margin-bottom: 10px;
}

.tx-callout p:last-child { margin-bottom: 0; }

/* Logo wall */
.tx-logo-wall {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
}

.tx-logo-wall img {
    height: 28px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: opacity 0.2s, filter 0.2s;
}

.tx-logo-wall img:hover { opacity: 1; filter: grayscale(0); }

.tx-note {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9375rem;
    color: var(--tx-muted);
    font-style: italic;
}

/* CTA */
.tx-cta {
    text-align: center;
    padding: 64px 32px;
    background: var(--tx-foreground);
    border-radius: var(--tx-radius-lg);
    color: #fff;
}

.tx-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.tx-cta p {
    color: #9ca3af;
    font-size: 1.05rem;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.tx-cta .tx-btn-primary { background: var(--tx-primary); }
.tx-cta .tx-btn-primary:hover { background: var(--tx-primary-hover); }

.tx-footer {
    padding: 32px 0;
    border-top: 1px solid var(--tx-border);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--tx-muted);
}

.tx-footer a { color: var(--tx-primary); text-decoration: none; }

.tx-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    color: var(--tx-foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--tx-shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
}

.tx-back-to-top.active { opacity: 1; visibility: visible; }
.tx-back-to-top:hover { background: var(--tx-muted-bg); }

@media (max-width: 960px) {
    .tx-hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .tx-hero-visual { order: -1; }
    .tx-nav { display: none; }
    .tx-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .tx-hero-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .tx-section { padding: 56px 0; }
    .tx-grid-3, .tx-grid-2 { grid-template-columns: 1fr; }
    .tx-hero-stats { grid-template-columns: 1fr; }
}
