/* TaxCycle marketing — design tokens & base */
:root {
    --canvas: #f1f4f8;
    --surface: #ffffff;
    --muted: #e9eef5;
    --ink: #0c1222;
    --text: #121c2d;
    --text-muted: #556070;
    --border: #d0d8e4;
    --border-subtle: #e2e8f0;
    --border-strong: #a8b4c4;
    --brand-navy: #0d2b45;
    --brand-mint: #0d9f7a;
    --primary: #0d6d64;
    --primary-dark: #0a5851;
    --primary-soft: #c5ebe4;
    --accent: #1d4ed8;
    --focus-ring: #2563eb;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.1);
    --max-width: 72rem;
    --gutter: clamp(1rem, 4vw, 1.75rem);
    --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

h1:focus,
h2:focus,
h3:focus {
    outline: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/*
 * Header/footer primary nav: NavLink renders <a> without the parent .razor.css scope attribute,
 * so scoped rules do not apply and anchors fall back to browser defaults (underline, visited colour).
 * These selectors live in global CSS so NavLink and plain <a> both match.
 */
.site-header a.site-logo,
.site-header a.site-logo:visited {
    text-decoration: none;
    color: inherit;
}

.site-header .site-nav a.site-nav__link,
.site-header .site-nav a.site-nav__link:visited {
    box-sizing: border-box;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 500;
    font-style: normal;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    margin: 0 -0.125rem;
    border-radius: 8px;
    border: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-header .site-nav a.site-nav__link:hover {
    color: var(--text);
    text-decoration: none;
    background: color-mix(in srgb, var(--text) 6%, transparent);
}

.site-header .site-nav a.site-nav__link:focus {
    outline: none;
}

.site-header .site-nav a.site-nav__link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    color: var(--text);
}

.site-footer a.site-footer__brand-link,
.site-footer a.site-footer__brand-link:visited {
    text-decoration: none;
    color: inherit;
}

.site-footer .site-footer__links a.site-footer__link,
.site-footer .site-footer__links a.site-footer__link:visited {
    box-sizing: border-box;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 500;
    font-style: normal;
    color: color-mix(in srgb, #fff 88%, var(--ink));
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    margin: 0 -0.125rem;
    border-radius: 8px;
    border: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-footer .site-footer__links a.site-footer__link:hover {
    color: #fff;
    text-decoration: none;
    background: color-mix(in srgb, #fff 7%, transparent);
}

.site-footer .site-footer__links a.site-footer__link:focus {
    outline: none;
}

.site-footer .site-footer__links a.site-footer__link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    color: #fff;
}

.site-footer .site-footer__links a.site-footer__link.active {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    background: color-mix(in srgb, #fff 11%, transparent);
}

@media (max-width: 52rem) {
    .site-header .site-nav a.site-nav__link,
    .site-header .site-nav a.site-nav__link:visited {
        display: block;
        padding: 0.625rem 0.5rem;
        margin: 0;
    }

}

/* Buttons & links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--primary-dark);
}

.btn--secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
    border-color: var(--border-strong);
    background: var(--muted);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-row--tight {
    margin-top: 1.25rem;
}

.btn--lg {
    padding: 0.8rem 1.4rem;
    font-size: 0.9375rem;
}

/* Typography helpers */
.eyebrow {
    display: inline-block;
    margin: 0 0 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-navy);
}

.headline-xl {
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.1;
    color: var(--text);
    max-width: 30rem;
}

@media (min-width: 56rem) {
    .headline-xl {
        max-width: 28rem;
    }
}

.headline-lg {
    margin: 0;
    font-size: clamp(1.55rem, 2.85vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.028em;
    line-height: 1.2;
    color: var(--text);
}

.headline-md {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
}

.lead {
    margin: 1rem 0 0;
    font-size: 1.0625rem;
    line-height: 1.62;
    color: var(--text-muted);
    max-width: 36rem;
}

.lead--tight {
    margin-top: 0.875rem;
    max-width: 32rem;
}

.lead--snug {
    margin-top: 0.65rem;
    font-size: 1.02rem;
    line-height: 1.58;
    max-width: 40rem;
}

.section-intro {
    margin-bottom: 1.1rem;
}

.section-intro .eyebrow {
    margin-bottom: 0.5rem;
}

.section-intro .headline-lg + .lead {
    margin-top: 0.65rem;
}

.subtle {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.text-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link:hover {
    color: var(--ink);
}

/* Hero — premium backdrop */
.home-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 85% at 15% -25%, color-mix(in srgb, var(--brand-mint) 22%, transparent), transparent 52%),
        radial-gradient(ellipse 70% 55% at 95% 10%, color-mix(in srgb, var(--brand-navy) 9%, transparent), transparent 48%),
        linear-gradient(180deg, var(--surface) 0%, transparent 28%);
    pointer-events: none;
    z-index: 0;
}

.home-hero .section__inner {
    position: relative;
    z-index: 1;
}

/* Hero layout */
.hero {
    display: grid;
    gap: clamp(1.75rem, 4vw, 2.25rem);
    align-items: center;
}

@media (min-width: 56rem) {
    .hero {
        grid-template-columns: 1.08fr 0.92fr;
        gap: clamp(2rem, 4vw, 3.25rem);
        align-items: start;
    }
}

.hero__panel {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.4rem;
    box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--surface) 70%, var(--border-subtle));
    border: 1px solid color-mix(in srgb, var(--border-subtle) 85%, var(--brand-navy));
}

.hero__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hero__rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hero__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    background: var(--muted);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.hero__row strong {
    font-weight: 600;
    color: var(--text);
}

.hero__pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--primary-soft) 88%, var(--brand-mint));
    color: var(--brand-navy);
}

.trust-strip {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0.85rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.35rem;
    border-top: 1px solid var(--border-subtle);
    max-width: 36rem;
}

.trust-strip__item {
    position: relative;
    margin: 0;
    padding-left: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.trust-strip__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-mint);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-mint) 35%, transparent);
}

/* Cards & grids */
.card-grid {
    display: grid;
    gap: 1.1rem;
    margin-top: 0.35rem;
}

@media (min-width: 40rem) {
    .card-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.35rem 1.25rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card--premium:hover {
    border-color: color-mix(in srgb, var(--border-strong) 55%, var(--brand-mint));
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .card--premium:hover {
        transform: none;
    }
}

.card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft) 65%, #fff));
    color: var(--brand-navy);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.card p {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Steps */
.steps {
    display: grid;
    gap: 1rem;
    margin-top: 0.75rem;
    counter-reset: step;
}

@media (min-width: 48rem) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .steps--premium .step:not(:first-child)::after {
        content: "";
        position: absolute;
        left: -0.65rem;
        top: 50%;
        width: 0.65rem;
        height: 2px;
        background: linear-gradient(90deg, var(--border-subtle), var(--border));
        transform: translateY(-50%);
        z-index: 0;
    }
}

.step {
    position: relative;
    padding: 1.2rem 1.15rem 1.2rem 3.15rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.steps--premium .step {
    border-color: color-mix(in srgb, var(--border-subtle) 92%, var(--brand-navy));
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0.95rem;
    top: 1.1rem;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 35%, transparent);
    z-index: 1;
}

.step h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.step p {
    margin: 0.4rem 0 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* List checks */
.check-list {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.check-list li {
    position: relative;
    padding-left: 1.65rem;
    margin-bottom: 0.65rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.check-list--tight {
    margin-top: 0.85rem;
}

.check-list--tight li {
    margin-bottom: 0.5rem;
    font-size: 0.90625rem;
    line-height: 1.52;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 2px var(--primary);
}

/* CTA band */
.cta-band {
    background: linear-gradient(125deg, var(--brand-navy) 0%, #0e4a45 42%, var(--primary-dark) 100%);
    color: #e8fffb;
    border-radius: var(--radius-lg);
    padding: clamp(1.65rem, 3.5vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, #fff 12%, transparent);
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.cta-band--premium {
    position: relative;
    overflow: hidden;
}

.cta-band--premium::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 100% 0%, color-mix(in srgb, var(--brand-mint) 28%, transparent), transparent 55%);
    pointer-events: none;
}

.cta-band--premium > * {
    position: relative;
    z-index: 1;
}

@media (min-width: 48rem) {
    .cta-band {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.cta-band h2 {
    margin: 0;
    font-size: clamp(1.28rem, 2.2vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.22;
    color: #fff;
    max-width: 28rem;
}

.cta-band p {
    margin: 0.45rem 0 0;
    font-size: 0.90625rem;
    line-height: 1.55;
    color: color-mix(in srgb, #fff 84%, var(--brand-navy));
    max-width: 34rem;
}

.cta-band__link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cta-band__link:hover {
    color: color-mix(in srgb, #fff 88%, var(--primary-soft));
}

.cta-band__btn-primary {
    background: #fff;
    color: var(--brand-navy);
    border: 1px solid #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.cta-band__btn-primary:hover {
    background: var(--primary-soft);
    border-color: var(--primary-soft);
    color: var(--primary-dark);
}

.cta-band__btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid color-mix(in srgb, #fff 45%, transparent);
}

.cta-band__btn-secondary:hover {
    background: color-mix(in srgb, #fff 12%, transparent);
    border-color: color-mix(in srgb, #fff 70%, transparent);
    color: #fff;
}

.cta-band .btn--secondary {
    background: #fff;
    border-color: #fff;
    color: var(--brand-navy);
    font-weight: 600;
}

.cta-band .btn--secondary:hover {
    background: var(--primary-soft);
    border-color: var(--primary-soft);
    color: var(--primary-dark);
}

/* Legal / inner pages */
.page-header {
    padding: clamp(2rem, 5vw, 3rem) 0 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, var(--surface) 0%, var(--canvas) 100%);
}

.page-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.page-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-header p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    max-width: 40rem;
}

.prose {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2.5rem var(--gutter) 4rem;
}

.prose h2 {
    margin: 2.25rem 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.prose p,
.prose li {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.prose p {
    margin: 0 0 1rem;
}

.prose ul {
    margin: 0 0 1rem 1.1rem;
    padding: 0;
}

.prose li {
    margin-bottom: 0.35rem;
}

.prose .meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.prose code {
    font-size: 0.9em;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: var(--muted);
    border: 1px solid var(--border-subtle);
}

.prose address {
    font-style: normal;
    margin: 1rem 0;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.callout {
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.callout p {
    margin: 0;
}

/* Blazor */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}
