/* ═══════════════════════════════════════════════════
   Traffic Builders — Components
   ═══════════════════════════════════════════════════ */

/* ─── Pillars ─── */
.tb-pillars { background: var(--tb-bg); }
.tb-pillar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tb-s-4);
}
.tb-pillar {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    padding: var(--tb-s-6);
    position: relative;
    overflow: hidden;
    transition: all var(--tb-t);
}
.tb-pillar:hover {
    transform: translateY(-3px);
    box-shadow: var(--tb-shadow-lg);
    border-color: transparent;
}
.tb-pillar::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--tb-primary);
    transition: opacity var(--tb-t);
    opacity: 0;
}
.tb-pillar:hover::before { opacity: 1; }
.tb-pillar--purple::before { background: var(--tb-purple); }
.tb-pillar--green::before { background: var(--tb-green); }
.tb-pillar--amber::before { background: var(--tb-amber); }

.tb-pillar-icon {
    font-size: 24px;
    color: var(--tb-primary);
    margin-bottom: var(--tb-s-3);
}
.tb-pillar--purple .tb-pillar-icon { color: var(--tb-purple); }
.tb-pillar--green .tb-pillar-icon { color: var(--tb-green); }
.tb-pillar--amber .tb-pillar-icon { color: var(--tb-amber); }

.tb-pillar-num {
    position: absolute;
    top: var(--tb-s-4); right: var(--tb-s-4);
    font-size: var(--tb-text-xs);
    color: var(--tb-text-dim);
    font-family: var(--tb-font-mono);
}

.tb-pillar h3 {
    margin-bottom: var(--tb-s-2);
    font-size: var(--tb-text-lg);
}
.tb-pillar p {
    color: var(--tb-text-muted);
    font-size: var(--tb-text-sm);
    margin: 0;
}

/* ─── Features Grid (3-col or alternating) ─── */
.tb-features-alt {
    padding: var(--tb-s-24) 0;
    background: var(--tb-surface);
}
.tb-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tb-s-16);
    align-items: center;
    margin-bottom: var(--tb-s-20);
}
.tb-feature-row:last-child { margin-bottom: 0; }
.tb-feature-row--reverse .tb-feature-visual { order: -1; }

.tb-feature-text h2 {
    margin-bottom: var(--tb-s-4);
}
.tb-feature-text p.tb-lead {
    font-size: var(--tb-text-lg);
    color: var(--tb-text-muted);
    margin-bottom: var(--tb-s-6);
    line-height: 1.6;
}
.tb-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tb-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--tb-s-3);
    padding: var(--tb-s-2) 0;
    color: var(--tb-text);
    font-size: var(--tb-text-base);
}
.tb-feature-list li::before {
    content: '';
    display: block;
    width: 20px; height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--tb-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center no-repeat;
    margin-top: 3px;
}

.tb-feature-visual {
    background: var(--tb-bg);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    padding: var(--tb-s-6);
    box-shadow: var(--tb-shadow);
    min-height: 380px;
    position: relative;
    overflow: hidden;
}

/* Feature visual variants */
.tb-visual-issues { display: flex; flex-direction: column; gap: var(--tb-s-3); }
.tb-visual-issue-item {
    display: flex;
    align-items: center;
    gap: var(--tb-s-3);
    padding: var(--tb-s-3);
    background: var(--tb-surface);
    border: 1px solid var(--tb-border-subtle);
    border-radius: var(--tb-r);
}
.tb-visual-issue-sev {
    width: 6px; height: 32px;
    border-radius: 3px;
    flex-shrink: 0;
}
.tb-visual-issue-sev.high { background: var(--tb-red); }
.tb-visual-issue-sev.med { background: var(--tb-amber); }
.tb-visual-issue-sev.low { background: var(--tb-text-dim); }
.tb-visual-issue-text { flex: 1; font-size: var(--tb-text-sm); color: var(--tb-text); }
.tb-visual-issue-meta { font-size: var(--tb-text-xs); color: var(--tb-text-dim); }

.tb-visual-citations { display: flex; flex-direction: column; gap: var(--tb-s-3); }
.tb-visual-cite-row {
    display: flex; justify-content: space-between; gap: var(--tb-s-3);
    padding: var(--tb-s-3);
    background: var(--tb-surface);
    border: 1px solid var(--tb-border-subtle);
    border-radius: var(--tb-r);
    font-size: var(--tb-text-sm);
    align-items: center;
}
.tb-visual-cite-engine {
    font-size: var(--tb-text-xs);
    padding: 2px 8px;
    background: var(--tb-accent-soft);
    color: var(--tb-accent);
    border-radius: var(--tb-r-full);
    font-weight: 600;
}
.tb-visual-cite-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--tb-green);
}
.tb-visual-cite-dot.miss { background: var(--tb-red); }

.tb-visual-topics { display: flex; flex-direction: column; gap: var(--tb-s-3); }
.tb-visual-topic {
    padding: var(--tb-s-3);
    background: var(--tb-surface);
    border: 1px solid var(--tb-border-subtle);
    border-radius: var(--tb-r);
}
.tb-visual-topic-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: var(--tb-text-sm);
    font-weight: 600;
}
.tb-visual-topic-bar {
    height: 6px;
    background: var(--tb-border-subtle);
    border-radius: 3px;
    overflow: hidden;
}
.tb-visual-topic-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tb-primary), var(--tb-accent));
    border-radius: 3px;
}

/* ─── Section Header Dark (for AI section) ─── */
.tb-section-dark {
    background: var(--tb-dark);
    color: var(--tb-dark-text);
    padding: var(--tb-s-24) 0;
}
.tb-section-dark h2, .tb-section-dark h3 { color: #fff; }
.tb-section-dark p { color: var(--tb-dark-text-muted); }
.tb-section-dark .tb-eyebrow {
    background: rgba(99, 102, 241, 0.15);
    color: var(--tb-accent);
}

/* ─── Testimonials ─── */
.tb-testimonials {
    padding: var(--tb-s-24) 0;
    background: var(--tb-bg);
}
.tb-testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tb-s-4);
}
.tb-testimonial {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    padding: var(--tb-s-6);
    display: flex;
    flex-direction: column;
}
.tb-testimonial-quote {
    font-size: var(--tb-text-base);
    color: var(--tb-text);
    line-height: 1.6;
    margin-bottom: var(--tb-s-5);
    flex: 1;
}
.tb-testimonial-quote::before {
    content: '"';
    font-size: 48px;
    color: var(--tb-primary);
    line-height: 0;
    vertical-align: -12px;
    margin-right: 4px;
    font-family: Georgia, serif;
}
.tb-testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--tb-s-3);
    border-top: 1px solid var(--tb-border-subtle);
    padding-top: var(--tb-s-4);
}
.tb-testimonial-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tb-primary), var(--tb-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: var(--tb-text-sm);
}
.tb-testimonial-name { font-weight: 600; font-size: var(--tb-text-sm); }
.tb-testimonial-role { font-size: var(--tb-text-xs); color: var(--tb-text-dim); }

/* ─── Comparison Table ─── */
.tb-comparison {
    padding: var(--tb-s-24) 0;
    background: var(--tb-bg-alt);
}
.tb-compare-table {
    width: 100%;
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    overflow: hidden;
    border-collapse: collapse;
}
.tb-compare-table th,
.tb-compare-table td {
    padding: var(--tb-s-4) var(--tb-s-5);
    text-align: center;
    border-bottom: 1px solid var(--tb-border-subtle);
    font-size: var(--tb-text-sm);
}
.tb-compare-table th {
    background: var(--tb-bg);
    font-weight: 600;
    color: var(--tb-text);
}
.tb-compare-table th:first-child,
.tb-compare-table td:first-child {
    text-align: left;
    font-weight: 500;
}
.tb-compare-table .tb-compare-us {
    background: var(--tb-primary-soft);
    color: var(--tb-primary);
    font-weight: 700;
}
.tb-check { color: var(--tb-green); font-size: 18px; }
.tb-cross { color: var(--tb-text-dim); font-size: 18px; }
.tb-partial { color: var(--tb-amber); font-size: 18px; }

/* ─── Pricing ─── */
.tb-pricing {
    padding: var(--tb-s-24) 0;
    background: var(--tb-bg);
}
.tb-pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tb-s-4);
    max-width: var(--tb-container-wide);
    margin: 0 auto;
}
.tb-plan {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    padding: var(--tb-s-6);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--tb-t);
}
.tb-plan:hover { box-shadow: var(--tb-shadow-lg); transform: translateY(-3px); }
.tb-plan--featured {
    border: 2px solid var(--tb-primary);
    background: linear-gradient(180deg, var(--tb-primary-soft) 0%, var(--tb-surface) 30%);
}
.tb-plan-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--tb-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--tb-r-full);
    font-size: var(--tb-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tb-plan-name {
    font-size: var(--tb-text-sm);
    font-weight: 600;
    color: var(--tb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--tb-s-2);
}
.tb-plan-price {
    font-size: var(--tb-text-4xl);
    font-weight: 700;
    color: var(--tb-text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: var(--tb-s-1);
}
.tb-plan-price-suffix {
    font-size: var(--tb-text-base);
    color: var(--tb-text-dim);
    font-weight: 400;
}
.tb-plan-desc {
    font-size: var(--tb-text-sm);
    color: var(--tb-text-muted);
    margin-bottom: var(--tb-s-5);
    line-height: 1.5;
}
.tb-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--tb-s-6);
    flex: 1;
}
.tb-plan-features li {
    padding: var(--tb-s-2) 0;
    font-size: var(--tb-text-sm);
    color: var(--tb-text);
    display: flex;
    align-items: flex-start;
    gap: var(--tb-s-2);
    border-bottom: 1px solid var(--tb-border-subtle);
}
.tb-plan-features li::before {
    content: '✓';
    color: var(--tb-green);
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── FAQ ─── */
.tb-faq {
    padding: var(--tb-s-24) 0;
    background: var(--tb-surface);
}
.tb-faq-wrap {
    max-width: 760px;
    margin: 0 auto;
}
.tb-faq-item {
    background: var(--tb-bg);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r);
    margin-bottom: var(--tb-s-3);
    overflow: hidden;
}
.tb-faq-q {
    padding: var(--tb-s-5) var(--tb-s-6);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    padding-right: 48px;
    font-size: var(--tb-text-base);
    color: var(--tb-text);
}
.tb-faq-q::after {
    content: '+';
    position: absolute;
    right: var(--tb-s-5);
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--tb-primary);
    font-weight: 300;
    transition: transform var(--tb-t);
}
.tb-faq-item[open] .tb-faq-q::after { transform: translateY(-50%) rotate(45deg); }
.tb-faq-a {
    padding: 0 var(--tb-s-6) var(--tb-s-5);
    color: var(--tb-text-muted);
    line-height: 1.7;
}

/* ─── CTA Band ─── */
.tb-cta-band {
    position: relative;
    padding: var(--tb-s-24) 0;
    background: var(--tb-dark);
    color: var(--tb-dark-text);
    overflow: hidden;
}
.tb-cta-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
    pointer-events: none;
}
.tb-cta-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}
.tb-cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #fff;
    margin-bottom: var(--tb-s-4);
    letter-spacing: -0.03em;
}
.tb-cta-subtitle {
    font-size: var(--tb-text-lg);
    color: var(--tb-dark-text-muted);
    max-width: 600px;
    margin: 0 auto var(--tb-s-8);
}
.tb-cta-buttons {
    display: flex;
    gap: var(--tb-s-3);
    justify-content: center;
    flex-wrap: wrap;
}
.tb-cta-band .tb-btn-primary {
    background: #fff;
    color: var(--tb-dark);
}
.tb-cta-band .tb-btn-primary:hover {
    background: var(--tb-primary);
    color: #fff;
}

/* ─── Trust Row ─── */
.tb-trust-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tb-s-4);
    max-width: 960px;
    margin: var(--tb-s-12) auto 0;
}
.tb-trust-item {
    display: flex;
    align-items: center;
    gap: var(--tb-s-3);
    padding: var(--tb-s-4);
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r);
    font-size: var(--tb-text-sm);
    color: var(--tb-text);
}
.tb-trust-icon { font-size: 20px; }

/* ─── Problem Section ─── */
.tb-problem {
    padding: var(--tb-s-24) 0;
    background: var(--tb-bg-alt);
}
.tb-problem-wrap {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.tb-problem h2 {
    margin-bottom: var(--tb-s-5);
}
.tb-problem-lead {
    font-size: var(--tb-text-lg);
    color: var(--tb-text-muted);
    line-height: 1.6;
}

/* ─── Forms ─── */
.tb-form {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-lg);
    padding: var(--tb-s-8);
    box-shadow: var(--tb-shadow);
}
.tb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tb-s-4);
    margin-bottom: var(--tb-s-4);
}
.tb-form-field { margin-bottom: var(--tb-s-4); }
.tb-form-field label {
    display: block;
    font-size: var(--tb-text-xs);
    color: var(--tb-text-muted);
    font-weight: 600;
    margin-bottom: var(--tb-s-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tb-form-field input,
.tb-form-field textarea,
.tb-form-field select {
    width: 100%;
    padding: 12px 14px;
    background: var(--tb-bg);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r);
    font-family: var(--tb-font-sans);
    font-size: var(--tb-text-base);
    color: var(--tb-text);
    transition: border var(--tb-t);
}
.tb-form-field input:focus,
.tb-form-field textarea:focus,
.tb-form-field select:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px var(--tb-primary-soft);
}
.tb-form-field textarea {
    min-height: 120px;
    resize: vertical;
}
.tb-form-honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}
.tb-form-message {
    padding: var(--tb-s-3) var(--tb-s-4);
    border-radius: var(--tb-r);
    margin-top: var(--tb-s-4);
    font-size: var(--tb-text-sm);
    display: none;
}
.tb-form-message.success {
    display: block;
    background: var(--tb-green-soft);
    color: var(--tb-green);
}
.tb-form-message.error {
    display: block;
    background: var(--tb-red-soft);
    color: var(--tb-red);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .tb-pillar-grid { grid-template-columns: repeat(2, 1fr); }
    .tb-pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .tb-testimonial-grid { grid-template-columns: 1fr; }
    .tb-trust-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .tb-feature-row { grid-template-columns: 1fr; gap: var(--tb-s-8); }
    .tb-feature-row--reverse .tb-feature-visual { order: 0; }
    .tb-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .tb-pricing-grid { grid-template-columns: 1fr; }
    .tb-pillar-grid { grid-template-columns: 1fr; }
    .tb-trust-row { grid-template-columns: 1fr; }
}
