:root {
    --home-primary: var(--vij-primary, #5b1e9e);
    --home-primary-deep: var(--vij-primary-deep, #431675);
    --home-secondary: var(--vij-secondary, #f4f1fc);
    --home-contrast: var(--vij-contrast, #b2845d);
    --home-bg: var(--vij-bg, #fdfcfd);
    --home-text: var(--vij-text, #150d2b);
    --home-muted: var(--vij-text-muted, rgba(21, 13, 43, 0.64));
    --home-faint: var(--vij-text-faint, rgba(21, 13, 43, 0.44));
    --home-rule: var(--vij-rule, rgba(21, 13, 43, 0.12));
    --home-rule-strong: var(--vij-rule-strong, rgba(21, 13, 43, 0.22));
    --home-on-primary: var(--vij-on-primary, #fdfcfd);
    --home-on-primary-accent: #e8d5c0;
    --home-header-height: 66px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--home-header-height); }

body.home-page {
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--home-bg);
    color: var(--home-text);
    font-family: var(--vij-font-body);
    font-size: var(--vij-size-body);
    line-height: var(--vij-leading-body);
}

.home-page [hidden] { display: none !important; }
.home-page a, .home-page button { -webkit-tap-highlight-color: transparent; }
.home-page a:focus-visible, .home-page button:focus-visible { outline: 2pt solid var(--home-primary); outline-offset: 2pt; }

.home-container, .home-section {
    width: min(100%, 1200px);
    margin-inline: auto;
    padding-inline: clamp(var(--vij-space-4), 4vw, var(--vij-space-6));
}

.home-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: var(--home-header-height);
    border-bottom: 1.5pt solid var(--home-primary);
    background: rgba(253, 252, 253, 0.97);
}

.home-header-inner {
    min-height: var(--home-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--vij-space-3);
    padding-block: var(--vij-space-2);
}

.home-wordmark { font-family: var(--vij-font-heading); font-weight: 400; letter-spacing: -0.01em; }
.home-wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: var(--home-primary);
    font-size: calc(var(--vij-size-h2) * 1.4);
    line-height: 1;
    text-decoration: none;
}

.home-header-nav, .home-header-actions { display: flex; align-items: center; }
.home-header-actions { gap: clamp(var(--vij-space-3), 2vw, var(--vij-space-5)); }
.home-login-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    color: var(--home-primary);
    font-weight: 600;
    text-decoration-color: var(--home-contrast);
    text-underline-offset: 2px;
}

.home-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: var(--vij-radius);
    background: var(--home-primary);
    color: var(--home-on-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.home-button:hover, .home-button:active { background: var(--home-primary-deep); color: var(--home-on-primary); }
.home-button-compact { padding-inline: var(--vij-space-4); }

.home-section { padding-block: clamp(var(--vij-space-6), 6vw, calc(var(--vij-space-6) * 2)); }
.home-split { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(var(--vij-space-5), 4vw, calc(var(--vij-space-6) * 1.5)); }
.home-hero { padding-block: clamp(var(--vij-space-5), 6vw, calc(var(--vij-space-6) * 2)); }
.home-copy { flex: 1 1 340px; min-width: 0; }

.home-page .vij-eyebrow {
    margin: 0 0 var(--vij-space-2);
    color: var(--home-contrast);
    font-family: var(--vij-font-body);
    font-size: var(--vij-size-micro);
    font-weight: 600;
    letter-spacing: var(--vij-track-eyebrow);
    text-transform: uppercase;
}

.home-copy h1, .home-copy h2, .get-started-inner h2 {
    margin: 0;
    color: var(--home-text);
    font-family: var(--vij-font-heading);
    font-weight: 400;
    line-height: var(--vij-leading-tight);
    letter-spacing: -0.005em;
    text-wrap: balance;
}
.home-copy h1 { font-size: clamp(var(--vij-size-h1), 4.2vw, var(--vij-size-display)); }
.home-copy h2, .get-started-inner h2 { font-size: clamp(calc(var(--vij-size-h2) * 1.5), 2.4vw, var(--vij-size-h1)); }
.home-page .vij-rule-accent { width: 40pt; margin: var(--vij-space-4) 0; border: 0; border-top: 2pt solid var(--home-contrast); }
.home-lede { max-width: 30em; margin: 0; color: var(--home-muted); font-size: var(--vij-size-h3); text-wrap: pretty; }

.home-demo { flex: 1.45 1 480px; min-width: 0; margin: 0; }
.home-demo-frame {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(var(--vij-space-4), 3vw, var(--vij-space-6));
    border-radius: var(--vij-radius);
    background: var(--home-primary);
}
.home-demo-frame .home-demo-eyebrow { margin: 0; color: var(--home-on-primary-accent); }
.home-demo-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--vij-space-4); }
.home-demo-script { display: flex; flex-direction: column; gap: var(--vij-space-1); color: var(--home-on-primary); font-family: var(--vij-font-heading); font-size: clamp(var(--vij-size-h2), 2.2vw, var(--vij-size-h1)); line-height: var(--vij-leading-head); }
.home-demo-play { display: flex; width: clamp(56px, 6vw, 80px); height: clamp(56px, 6vw, 80px); flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--home-on-primary); }
.home-demo-play svg { width: 40%; height: 40%; fill: var(--home-primary); }
.home-demo figcaption { margin-top: var(--vij-space-2); color: var(--home-muted); font-size: var(--vij-size-small); }
.home-section-rule { margin: 0; border: 0; border-top: 0.75pt solid var(--home-rule); }

.home-preview-panel { flex: 1.2 1 420px; min-width: 0; padding: clamp(var(--vij-space-3), 2vw, var(--vij-space-5)); border-radius: var(--vij-radius); background: var(--home-secondary); }
.vault-tabs { display: flex; gap: var(--vij-space-4); overflow: hidden; margin-bottom: var(--vij-space-4); border-bottom: 0.75pt solid var(--home-rule-strong); }
.vault-tabs span { padding-block: var(--vij-space-2); color: var(--home-muted); font-size: var(--vij-size-small); white-space: nowrap; }
.vault-tabs .is-active { margin-bottom: -0.75pt; border-bottom: 1.5pt solid var(--home-primary); color: var(--home-primary); font-weight: 600; }
.vault-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(88px, 22%), 1fr)); gap: var(--vij-space-2); }
.vault-month { display: flex; min-height: 84px; flex-direction: column; gap: var(--vij-space-2); padding: var(--vij-space-3); border-radius: var(--vij-radius); background: var(--home-bg); }
.vault-month > strong { color: var(--home-text); font-family: var(--vij-font-heading); font-size: var(--vij-size-h3); font-weight: 400; line-height: 1; }
.vault-month small { margin-top: auto; color: var(--home-muted); font-size: var(--vij-size-micro); letter-spacing: var(--vij-track-eyebrow); text-transform: uppercase; }
.vault-month.is-missing { border: 0.75pt solid var(--home-rule-strong); background: transparent; }
.vault-month.is-missing > strong { color: var(--home-muted); }
.vault-month.is-missing small { color: var(--home-contrast); font-weight: 600; }
.bill-lines { display: flex; flex-direction: column; gap: var(--vij-space-1); }
.bill-lines i { display: block; width: 80%; height: 5px; border-radius: 2px; background: var(--home-rule); }
.bill-lines i:last-child { width: 55%; }

.analysis-preview { display: flex; flex-direction: column; gap: var(--vij-space-4); }
.trend-card, .charge-list { border-radius: var(--vij-radius); background: var(--home-bg); }
.trend-card { padding: var(--vij-space-4); }
.trend-card .vij-eyebrow { margin: 0 0 var(--vij-space-3); }
.trend-card svg { display: block; width: 100%; height: 96px; }
.trend-card line { stroke: var(--home-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-card .trend-baseline { stroke: var(--home-rule-strong); }
.trend-card path { fill: none; stroke: var(--home-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-months { display: grid; grid-template-columns: repeat(12, 1fr); margin-top: var(--vij-space-2); color: var(--home-faint); font-size: var(--vij-size-micro); text-align: center; }
.charge-list { padding: var(--vij-space-2) var(--vij-space-4); }
.charge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--vij-space-3); padding-block: var(--vij-space-3); border-bottom: 0.5pt solid var(--home-rule); }
.charge-row strong, .charge-row small { display: block; }
.charge-row strong { color: var(--home-text); font-family: var(--vij-font-body); font-weight: 600; }
.charge-row small { margin-top: var(--vij-space-1); color: var(--home-muted); font-size: var(--vij-size-small); line-height: var(--vij-leading-head); }
.charge-row > i { display: block; width: 44px; height: 10px; margin-top: 5px; border-radius: 2px; background: rgba(91, 30, 158, 0.08); filter: blur(1.5px); }

.get-started-section { background: var(--home-secondary); }
.get-started-inner { padding-block: clamp(var(--vij-space-6), 6vw, calc(var(--vij-space-6) * 2)); }
.get-started-inner > .vij-rule-accent { margin-bottom: clamp(var(--vij-space-5), 3vw, var(--vij-space-6)); }
.signup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(var(--vij-space-3), 2vw, var(--vij-space-5)); margin: 0; padding: 0; list-style: none; }
.signup-steps li { display: flex; flex-direction: column; gap: var(--vij-space-3); margin: 0; padding: var(--vij-space-5) var(--vij-space-4); border-radius: var(--vij-radius); background: var(--home-bg); }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-top svg { width: 28px; height: 28px; fill: none; stroke: var(--home-muted); stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.step-top span { color: var(--home-contrast); font-family: var(--vij-font-num); font-size: var(--vij-size-h1); line-height: 1; }
.signup-steps h3 { margin: 0; color: var(--home-text); font-family: var(--vij-font-heading); font-size: var(--vij-size-h2); font-weight: 400; }
.signup-steps p { margin: 0; color: var(--home-muted); }
.signup-button { margin-top: clamp(var(--vij-space-5), 3vw, var(--vij-space-6)); padding-inline: var(--vij-space-6); font-size: var(--vij-size-h3); }

@media (max-width: 560px) {
    .home-header-actions { gap: var(--vij-space-2); }
    .home-login-link { padding-inline: var(--vij-space-2); }
    .home-button-compact { padding-inline: var(--vij-space-3); }
}

@media (max-width: 350px) {
    .home-wordmark { font-size: var(--vij-size-h2); }
    .home-header-inner { padding-inline: var(--vij-space-3); }
    .home-login-link, .home-button-compact { font-size: var(--vij-size-small); }
    .home-button-compact { padding-inline: var(--vij-space-2); }
    .vault-tabs { gap: var(--vij-space-3); }
    .vault-tabs span { font-size: var(--vij-size-micro); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Homepage video (Nov 2026): plays silently on loop with burned-in captions; "Sound on" restarts it with the voice-over. */
:root:not(#vj) body.home-page .home-demo-frame.home-video { display: block; padding: 0; background: #F6F1EC; }
:root:not(#vj) body.home-page .home-video video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
:root:not(#vj) body.home-page .home-video-play { position: absolute; inset: 0; margin: auto; display: flex; width: 72px; height: 72px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #5A2786; box-shadow: 0 10px 28px rgba(90, 39, 134, 0.28); cursor: pointer; }
:root:not(#vj) body.home-page .home-video-play[hidden] { display: none; }
:root:not(#vj) body.home-page .home-video-play svg { width: 40%; height: 40%; fill: #FFFFFF; }
:root:not(#vj) body.home-page .home-video-sound { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; background: rgba(28, 27, 32, 0.72); color: #FFFFFF; font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.15s; }
:root:not(#vj) body.home-page .home-video-sound:hover { background: rgba(28, 27, 32, 0.86); }
:root:not(#vj) body.home-page .home-video-sound:focus-visible, :root:not(#vj) body.home-page .home-video-play:focus-visible { outline: 3px solid #E6DDEF; outline-offset: 2px; }
:root:not(#vj) body.home-page .home-video-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:root:not(#vj) body.home-page .home-video-sound svg path:first-child { fill: currentColor; }
:root:not(#vj) body.home-page .home-video-sound .home-video-wave { display: none; }
:root:not(#vj) body.home-page .home-video-sound[aria-pressed="true"] .home-video-wave { display: inline; }
:root:not(#vj) body.home-page .home-video-sound[aria-pressed="true"] .home-video-mute { display: none; }
@media (max-width: 620px) { :root:not(#vj) body.home-page .home-video-sound { right: 10px; bottom: 10px; height: 32px; font-size: 12px; } }
