/* Homepage composition. Shared marketing routes retain their own layouts. */
body.homepage {
    --bg: #EDF2F7;
    --bg-alt: color-mix(in srgb, var(--brand-slate) 5%, var(--brand-neutral));
    --surface: #fff;
    --surface-alt: var(--brand-neutral);
    --text: var(--brand-navy);
    --text-secondary: var(--brand-slate);
    --text-tertiary: var(--brand-slate);
    --stroke: color-mix(in srgb, var(--brand-slate) 22%, transparent);
    --action: color-mix(in srgb, var(--accent) 86%, var(--brand-navy));
    --shell: min(1240px, calc(100% - 64px));
    --section-gap: clamp(64px, 7vw, 100px);
    background: var(--bg);
}
[data-theme="dark"] body.homepage {
    --bg: var(--brand-navy);
    --bg-alt: color-mix(in srgb, var(--brand-slate) 15%, var(--brand-navy));
    --surface: color-mix(in srgb, var(--brand-slate) 20%, var(--brand-navy));
    --surface-alt: var(--brand-navy);
    --text: var(--brand-neutral);
    --text-secondary: color-mix(in srgb, var(--brand-neutral) 82%, var(--brand-slate));
    --text-tertiary: var(--text-secondary);
    --stroke: color-mix(in srgb, var(--brand-neutral) 22%, transparent);
}
.homepage :where([id]) { scroll-margin-top: calc(var(--site-header-height, 80px) + 24px); }
.homepage :where(a, button, summary, input, select, textarea, [role="button"]):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
.homepage :where(a, button, summary) { -webkit-tap-highlight-color: transparent; }
.homepage :where(h1, h2, h3, p) { text-wrap: pretty; }
.homepage :where(h1, h2, h3) { text-wrap: balance; }
.homepage .btn-primary { background: var(--action); border-color: var(--action); color: #fff; }
.homepage .btn-primary:hover { background: var(--brand-navy); border-color: var(--brand-navy); }
.homepage .btn-ghost { color: var(--text); border-color: var(--stroke); }
.homepage .btn { border-radius: 6px; }
.homepage .btn-lg { padding-inline: 24px; min-height: 52px; }
.homepage .skip-link {
    position: fixed;
    top: 12px;
    left: 20px;
    z-index: 1100;
    padding: 12px 20px;
    color: #fff;
    background: var(--brand-navy);
    border-radius: 6px;
    transform: translateY(-160%);
}
.homepage .skip-link:focus { transform: none; }
.homepage .site-header { background: color-mix(in srgb, var(--surface) 96%, transparent); }
.homepage .site-nav { min-height: 80px; gap: 24px; }
.homepage .brand-lockup { gap: 10px; flex-shrink: 0; }
.homepage .brand-name strong { font-family: var(--font-display); font-size: 1.05rem; }
.homepage .brand-name span { max-width: 190px; font-size: .6875rem; line-height: 1.4; }
.homepage .nav-center { gap: 0; }
.homepage .nav-center a { padding: 12px 10px; font-size: .875rem; white-space: nowrap; }
.homepage .nav-center a.active { color: var(--text); background: var(--surface-alt); }
.homepage :is(.theme-toggle, .nav-toggle) { width: 44px; height: 44px; flex-shrink: 0; border-radius: 6px; }
.homepage .nav-right .btn { min-height: 44px; padding-inline: 14px; }
.homepage .trust-band { padding-block: 24px; background: var(--surface); border-bottom: var(--rule); }
.homepage .trust-band-inner { gap: 16px 32px; }
.homepage .trust-band-label { font-size: .875rem; letter-spacing: 0; text-transform: none; color: var(--text-secondary); }
.homepage .trust-band-items { gap: 12px 26px; flex-wrap: wrap; }
.homepage .trust-band-items li { font-size: .875rem; color: var(--text); }
.homepage .sec-head { max-width: 900px; margin-bottom: clamp(32px, 4vw, 48px); }
.homepage .sec-head h2 { font-size: clamp(1.8rem, 3.1vw, 2.7rem); line-height: 1.18; letter-spacing: -.04em; }
.homepage .sec-sub { max-width: 64ch; margin-top: 20px; font-size: 1.0625rem; line-height: 1.75; }
.homepage :is(.sec-tag, .proof-kicker, .overline, .grove-kicker, .price-label) {
    letter-spacing: 0;
    text-transform: none;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
}
.homepage .sec-rule { gap: 0; margin-bottom: 14px; }
.homepage .sec-rule::before, .homepage .sec-rule::after { content: none; }
.homepage .reveal { opacity: 1; transform: none; animation: none; transition: none; }
.homepage .story-art { display: none; }
.homepage #problem { background: var(--bg); }
.homepage #how-it-works { background: var(--surface); }
.homepage .morning-film-intro { align-items: center; margin-bottom: 20px; gap: 20px; }
.homepage .morning-film-intro h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.homepage .morning-film .proof-kicker,
.homepage .public-chat-callout .proof-kicker,
.homepage .beta-copy .overline,
.homepage #grove .grove-kicker { color: var(--text-secondary); }
.homepage .morning-film a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.homepage .marketing-film-frame { padding: 0; border-radius: 8px; box-shadow: none; }
.homepage .morning-film-outro { font-size: .875rem; line-height: 1.6; }
.homepage .ledger-cell { padding: clamp(24px, 3vw, 40px); }
.homepage .ledger-cell h3 { font-size: 1.125rem; line-height: 1.45; }
.homepage .ledger-cell p { font-size: 1rem; line-height: 1.7; max-width: 56ch; }
.homepage .stats-band { background: var(--surface); padding-block: 48px; }
.homepage .stat strong { font-size: clamp(2rem, 3vw, 2.75rem); font-variant-numeric: tabular-nums; }
.homepage .stat span { color: var(--text-secondary); font-size: .9375rem; line-height: 1.6; max-width: 28ch; }
.homepage .beta-reporting-note { color: var(--text-secondary); font-size: .875rem; line-height: 1.65; }
.homepage .pricing-grid { gap: 20px; align-items: stretch; }
.homepage .price-card { padding: 32px; border: var(--rule); border-radius: 8px; }
.homepage .price-card.featured { border: 2px solid var(--accent); }
.homepage .price-label { color: var(--text-secondary); }
.homepage .price-amount { margin-block: 12px 16px; font-size: 3rem; line-height: 1.1; }
.homepage .price-amount span { color: var(--text-secondary); font-size: .875rem; }
.homepage .price-badge { background: var(--action); color: #fff; text-transform: none; font-size: .8125rem; letter-spacing: 0; }
.homepage .price-desc { min-height: 3.5em; font-style: normal; color: var(--text-secondary); font-size: .9375rem; line-height: 1.6; }
.homepage .price-features { margin-block: 24px 0; gap: 14px; }
.homepage .price-features li { font-size: .9375rem; line-height: 1.6; }
.homepage .cloud-banner { padding: 24px 28px; border: var(--rule); border-radius: 8px; gap: 20px; }
.homepage .cloud-banner h4 { line-height: 1.5; }
.homepage .cloud-banner h4 span { color: var(--text); }
.homepage .cloud-banner p { margin-top: 6px; font-size: .9375rem; line-height: 1.6; max-width: 80ch; }
.homepage .pricing-action { justify-content: space-between; text-align: left; gap: 32px; }
.homepage .pricing-action p { max-width: 72ch; font-size: .875rem; line-height: 1.65; }
.homepage #beta-trial .panel { padding: 0; background: transparent; border: 0; overflow: visible; }
.homepage .beta-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.homepage .beta-copy { padding-block: 20px; }
.homepage .beta-copy h2 { max-width: 20ch; margin-top: 12px; font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.22; }
.homepage .beta-copy .lead { margin-top: 20px; font-size: 1.0625rem; line-height: 1.75; max-width: 46ch; }
.homepage .sample-portal-card { grid-template-columns: 1fr; gap: 22px; padding: 24px 0 0; border: 0; border-top: var(--rule); background: transparent; border-radius: 0; }
.homepage .sample-portal-card span { margin-top: 8px; font-size: .9375rem; max-width: 44ch; }
.homepage .sample-portal-card .btn { justify-self: start; white-space: normal; text-align: center; }
.homepage .beta-form-card { padding: clamp(24px, 3vw, 40px); border-radius: 8px; }
.homepage .beta-form-card h3 { font-size: 1.4rem; line-height: 1.35; }
.homepage .form-help { margin-top: 12px; color: var(--text-secondary); font-size: .9375rem; line-height: 1.6; }
.homepage :is(.form-required-note, .form-hint) { color: var(--text-secondary); font-size: .8125rem; line-height: 1.5; }
.homepage .form-required-note { margin-bottom: 20px; }
.homepage .form-grid { gap: 20px 16px; }
.homepage .form-field { align-content: start; min-width: 0; }
.homepage .form-field label { color: var(--text); font-size: .875rem; }
.homepage .form-field :is(input, select, textarea) { min-height: 48px; min-width: 0; border-color: color-mix(in srgb, var(--text-secondary) 55%, transparent); border-radius: 5px; font-size: 1rem; }
.homepage .form-field :is(input, textarea)::placeholder { color: var(--text-secondary); opacity: .9; }
.homepage .form-field :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.homepage .form-field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--action); border-width: 2px; }
.homepage .form-field .field-validation-error { color: var(--text); }
.homepage .field-validation-error { color: var(--text); font-weight: 600; font-size: .8125rem; line-height: 1.5; }
.homepage .field-validation-valid { display: none; }
.homepage .beta-validation-summary.validation-summary-valid { display: none; }
.homepage .beta-validation-summary.validation-summary-errors,
.homepage .success-banner { padding: 16px 18px; margin-block: 20px; border: var(--rule); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--surface-alt); color: var(--text); font-size: .9375rem; line-height: 1.6; }
.homepage .beta-validation-summary ul { list-style: none; margin: 0; padding: 0; }
.homepage .public-chat-callout { margin-top: 48px; border-radius: 8px; }
.homepage .public-chat-callout p { font-size: .9375rem; }
.homepage .home-capabilities { background: var(--surface); }
.homepage .home-capabilities .sec-head { margin-inline: 0; text-align: left; }
.homepage .home-capabilities .sec-head h2 { margin-inline: 0; }
.homepage .home-capabilities .sec-rule { justify-content: flex-start; }
.homepage .home-capabilities .sec-sub { margin-inline: 0; }
.homepage .site-footer { background: var(--surface); padding-block: 0 32px; }
.homepage .footer-inner { grid-template-columns: auto 1fr; gap: 28px 48px; padding-top: 32px; align-items: start; }
.homepage .footer-links { justify-content: flex-end; gap: 4px 24px; }
.homepage .footer-links a { display: inline-flex; align-items: center; min-height: 40px; font-size: .875rem; }
.homepage .footer-right { grid-column: 1 / -1; justify-content: space-between; }
.homepage .footer-copy { font-size: .8125rem; }
.homepage .screenshot-lightbox-close { width: 48px; height: 48px; }
@media (max-width: 1180px) {
    .homepage .nav-toggle { display: inline-flex; }
    .homepage .nav-center { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 16px 32px 24px; border: 0; border-bottom: var(--rule); border-radius: 0; background: var(--surface); box-shadow: 0 14px 24px color-mix(in srgb, var(--brand-navy) 12%, transparent); max-height: calc(100dvh - var(--site-header-height, 80px)); overflow-y: auto; }
    .homepage .nav-center.is-open { display: flex; }
    .homepage .nav-center a { min-height: 48px; padding: 14px 16px; font-size: 1rem; }
}
@media (max-width: 960px) {
    .homepage .beta-grid { grid-template-columns: 1fr; gap: 32px; }
    .homepage .beta-copy { max-width: 640px; padding: 0; }
    .homepage .beta-copy .lead { max-width: 60ch; }
    .homepage .pricing-grid { max-width: 620px; }
    .homepage .price-desc { min-height: auto; }
    .homepage .trust-band-inner { flex-direction: column; }
    .homepage .trust-band-items { justify-content: center; }
}
@media (max-width: 600px) {
    body.homepage { --shell: calc(100% - 40px); --section-gap: 64px; }
    .homepage .site-nav { min-height: 72px; gap: 12px; }
    .homepage .site-header .shell { width: calc(100% - 24px); }
    .homepage .brand-name { display: none; }
    .homepage .brand-logo { width: 36px; height: 36px; }
    .homepage .nav-right { gap: 6px; }
    .homepage .nav-right .btn { font-size: .8125rem; padding-inline: 12px; }
    .homepage .sec-head { text-align: left; }
    .homepage .sec-rule { justify-content: flex-start; }
    .homepage .sec-head h2 { font-size: clamp(1.7rem, 7.6vw, 2.25rem); }
    .homepage .sec-sub { font-size: 1rem; }
    .homepage .trust-band-items { gap: 12px 20px; }
    .homepage .trust-band-label, .homepage .trust-band-items li { font-size: .8125rem; }
    .homepage .stats-band { padding-block: 36px; }
    .homepage .stats-grid { gap: 28px 20px; }
    .homepage .stat { padding: 0; border: 0; }
    .homepage .stat span { font-size: .8125rem; }
    .homepage .beta-reporting-note { text-align: left; }
    .homepage .price-card { padding: 28px; }
    .homepage .pricing-action { align-items: stretch; text-align: left; gap: 20px; }
    .homepage .cloud-banner { align-items: flex-start; text-align: left; }
    .homepage .form-grid { grid-template-columns: 1fr; }
    .homepage .beta-form-card { padding: 24px 20px; }
    .homepage .public-chat-callout-copy { align-items: flex-start; gap: 14px; }
    .homepage .public-chat-callout-copy > i { display: none; }
    .homepage .footer-inner { grid-template-columns: 1fr; gap: 16px; }
    .homepage .footer-links { justify-content: flex-start; }
    .homepage .footer-right { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 360px) {
    .homepage .site-nav { gap: 8px; }
    .homepage .brand-logo { width: 32px; height: 32px; }
    .homepage .nav-right { gap: 4px; }
    .homepage .nav-right .btn { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .homepage *, .homepage *::before, .homepage *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
