/* ═══════════════════════════════════════════════════════════════════════
   inheritance.css — Inheritance Lead Gen Funnel
   Reuses design tokens from theme.css. Scoped to inh-* prefix.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-primary);
    font-family: var(--font-sans);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

button, input, select, textarea {
    font-family: inherit;
}

/* ---- Animations ---- */
@keyframes inhFadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes inhFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes inhShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

@keyframes inhPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

@keyframes inhSpinnerRotate {
    to { transform: rotate(360deg); }
}

@keyframes inhDrawLine {
    from { stroke-dashoffset: var(--line-length, 1000); }
    to   { stroke-dashoffset: 0; }
}

.inh-fade-in {
    animation: inhFadeInUp 0.5s ease-out forwards;
}

/* ---- Nav ---- */
.inh-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
}

.inh-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.inh-nav-logo-text {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-serif);
}

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

/* Nav button styles (matching welcome.html) */
.inh-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-sans);
}

.inh-nav .btn-primary {
    background: var(--accent-gold);
    color: var(--text-inverse);
}

.inh-nav .btn-primary:hover {
    background: var(--accent-gold-hover);
}

.inh-nav .btn-outlined {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.inh-nav .btn-outlined:hover {
    background: var(--bg-hover);
}

.inh-nav .btn-minimal {
    background: transparent;
    color: var(--text-secondary);
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.inh-nav .btn-minimal:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

/* ---- Hero ---- */
.inh-hero {
    text-align: center;
    padding: 32px 24px 24px;
    max-width: 680px;
    margin: 0 auto;
}

.inh-hero-kicker {
    font-size: 13px;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin: 0 0 12px;
}

.inh-hero h1 {
    font-family: var(--font-serif);
    font-size: 38px;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0 0 12px;
    font-weight: 600;
}

.inh-hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 20px;
}

.inh-hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Badges ---- */
.inh-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.inh-badge-sapphire { background: var(--accent-sapphire-muted); color: var(--accent-sapphire); }
.inh-badge-purple   { background: var(--accent-purple-muted); color: var(--accent-purple); }
.inh-badge-neutral  { background: var(--bg-hover); color: var(--text-secondary); }
.inh-badge-emerald  { background: var(--accent-emerald-muted); color: var(--accent-emerald); }
.inh-badge-gold     { background: var(--accent-gold-muted); color: var(--accent-gold); }
.inh-badge-ruby     { background: var(--accent-ruby-muted); color: var(--accent-ruby); }

/* ---- Mistake Cards ---- */
.inh-mistakes {
    max-width: 760px;
    margin: 0 auto 40px;
    padding: 0 24px;
    display: flex;
    gap: 16px;
}

.inh-mistake-card {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 20px;
}

.inh-mistake-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-ruby);
    margin: 0 0 4px;
}

.inh-mistake-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ---- Input Sections ---- */
.inh-input-section {
    padding: 48px 24px;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 80px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.inh-input-section.inh-visible {
    opacity: 1;
    transform: translateY(0);
}

.inh-input-content {
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.inh-input-question {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.2;
}

.inh-input-helper {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 32px;
    line-height: 1.5;
}

.inh-input-field-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.inh-input-prefix {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 28px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    pointer-events: none;
}

.inh-input-lg {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 28px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-align: center;
    width: 360px;
    max-width: 100%;
    transition: border-color 0.2s;
}

.inh-input-currency .inh-input-lg {
    padding-left: 44px;
}

.inh-input-number {
    width: 200px;
}

.inh-input-lg:focus {
    border-color: var(--accent-gold);
    outline: none;
}

.inh-input-lg.inh-input-error {
    border-color: var(--accent-ruby);
    animation: inhShake 0.3s ease;
}

.inh-input-unit {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 0 32px;
}

.inh-input-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
    margin: 12px 0 0;
}

/* ---- Buttons ---- */
.inh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    border: 1px solid var(--border-primary);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: background 0.15s, border-color 0.15s;
}

.inh-btn-primary {
    background: var(--accent-gold);
    color: var(--text-inverse);
    border-color: var(--accent-gold);
    font-weight: 600;
}

.inh-btn-primary:hover {
    background: var(--accent-gold-hover);
    border-color: var(--accent-gold-hover);
}

.inh-btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.inh-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

.inh-btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 8px;
}

.inh-btn-sm {
    padding: 3px 10px;
    font-size: 11px;
}

.inh-btn-full {
    width: 100%;
    justify-content: center;
}

.inh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Loading ---- */
.inh-loading {
    text-align: center;
    padding: 60px 24px;
}

.inh-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.inh-loading-content > p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 8px 0 0;
}

.inh-loading-sub {
    font-size: 13px !important;
    color: var(--text-tertiary) !important;
    font-weight: 400 !important;
    margin: 4px 0 0 !important;
}

.inh-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--spinner-track, var(--bg-hover));
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: inhSpinnerRotate 0.7s linear infinite;
}

/* ---- Error ---- */
.inh-error {
    max-width: 560px;
    margin: 24px auto;
    padding: 16px 20px;
    background: var(--accent-ruby-muted);
    border: 1px solid var(--accent-ruby);
    border-radius: 8px;
    color: var(--accent-ruby);
    font-size: 13px;
}

/* ---- Results Section ---- */
.inh-results {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 24px;
    scroll-margin-top: 80px;
}

/* ---- Cards ---- */
.inh-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 24px;
    margin: 16px 0;
}

.inh-card-elevated {
    background: var(--bg-elevated);
    border-color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
    box-shadow: var(--shadow-md);
}

/* ---- Chart ---- */
.inh-chart-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.inh-chart-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0 0 20px;
}

.inh-chart-area {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 24px 20px 16px;
    position: relative;
    min-height: 280px;
}

.inh-chart-area canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.inh-chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.inh-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.inh-chart-legend-line {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ---- Metric Cards ---- */
.inh-metric-row {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.inh-metric-card {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.inh-metric-card.inh-metric-highlight {
    border-color: var(--accent-gold);
    background: var(--accent-gold-muted);
}

.inh-metric-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
}

.inh-metric-card.inh-metric-highlight .inh-metric-label {
    color: var(--accent-gold);
}

.inh-metric-value {
    font-size: 22px;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.inh-metric-delta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin: 4px 0 0;
}

/* ---- Compliance ---- */
.inh-compliance {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 14px;
    margin: 16px 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.inh-compliance p {
    margin: 0 0 6px;
}

.inh-compliance p:last-child {
    margin-bottom: 0;
}

.inh-compliance strong {
    color: var(--text-primary);
}

/* ---- Education ---- */
.inh-education {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.inh-education-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.inh-education p {
    margin: 0 0 8px;
}

.inh-education strong {
    color: var(--text-primary);
}

/* ---- CTA Banner (qualified — Variant A standalone) ---- */
.inh-cta-banner {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 28px 32px;
    margin-top: 24px;
}

.inh-cta-banner-text {
    flex: 1;
}

.inh-cta-banner-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--text-primary);
    margin: 0 0 4px;
    font-weight: 600;
}

.inh-cta-banner-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ---- CTA Banner (below threshold — amber) ---- */
.inh-cta-banner.inh-cta-below {
    background: var(--accent-amber-muted);
    border-color: rgba(212,160,62,0.18);
}

.inh-cta-banner.inh-cta-below .inh-cta-banner-title {
    color: var(--text-primary);
}

.inh-cta-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ---- Assumptions ---- */
.inh-assumptions {
    margin: 24px 0 0;
    font-size: 12px;
    color: var(--text-tertiary);
}

.inh-assumptions summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.inh-assumptions table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 12px 0;
}

.inh-assumptions td {
    padding: 4px 12px 4px 0;
    vertical-align: top;
}

.inh-assumptions td:first-child {
    color: var(--text-tertiary);
    white-space: nowrap;
}

.inh-assumptions td:last-child {
    color: var(--text-primary);
}

.inh-assumptions-footer {
    margin-top: 10px;
    font-style: italic;
    color: var(--text-tertiary);
}

/* ---- Booking Section ---- */
#inh-booking-section {
    scroll-margin-top: 80px;
}

/* ---- Skeleton Loading ---- */
@keyframes inhSkeletonPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.7; }
}

.inh-skeleton {
    background: var(--bg-hover);
    border-radius: 6px;
    animation: inhSkeletonPulse 1.5s ease-in-out infinite;
}

/* ---- Scroll Chevron ---- */
.inh-chevron {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 40;
    pointer-events: none;
    transition: opacity 0.3s ease;
    animation: inhPulse 2s ease-in-out infinite;
}

.inh-chevron p {
    font-size: 10px;
    color: var(--text-tertiary);
    margin: 4px 0 0;
}

/* ---- Progress Indicator ---- */
.inh-progress {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 100px;
    padding: 4px 14px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    z-index: 40;
}

/* ---- Footer ---- */
.inh-footer {
    text-align: center;
    padding: 40px 24px;
    font-size: 12px;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-primary);
    margin-top: 48px;
}

.inh-footer p {
    margin: 0;
    max-width: 560px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .inh-hero h1 {
        font-size: 28px;
    }

    .inh-mistakes {
        flex-direction: column;
    }

    .inh-input-question {
        font-size: 24px;
    }

    .inh-input-lg {
        width: 100%;
        font-size: 22px;
    }

    .inh-input-number {
        width: 160px;
    }

    .inh-input-section {
        padding: 40px 16px;
        min-height: 300px;
    }

    .inh-metric-row {
        flex-direction: column;
    }

    .inh-form-row {
        flex-direction: column;
    }

    .inh-nav {
        padding: 10px 16px;
    }

    .inh-nav .btn-minimal {
        display: none;
    }

    .inh-nav .btn {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 14px;
    }

    .inh-cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px 20px;
    }

    .inh-cta-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .inh-cta-banner-actions .inh-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inh-chevron {
        animation: none;
    }
}
