html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #0f172a;
    background: #ffffff;
}

/* Modern tighter heading tracking — sits nicely under Playfair display. */
h1, h2, h3 {
    letter-spacing: -0.02em;
}

::selection {
    background: rgba(59, 130, 246, 0.25);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Base button & form utilities. Kept intentionally small — the
   heavy lifting happens in Tailwind at the call site.
   ============================================================ */

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    background-size: 200% 100%;
    color: white; font-weight: 600; border-radius: .6rem; border: none; cursor: pointer;
    transition:
        transform .18s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow .18s ease,
        background-position .35s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.32);
    background-position: 100% 0;
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    transition: left .6s ease;
}
.btn-primary:hover:not(:disabled)::before {
    left: 130%;
}

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .55rem 1.1rem;
    background: white;
    color: #334155;
    font-weight: 600;
    border-radius: .5rem;
    border: 1px solid #e2e8f0;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
    cursor: pointer;
}
.btn-secondary:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
}

.input {
    display: block;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.gradient-text {
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Airy variant for hero sections. */
.hero-bg {
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(59, 130, 246, 0.18), transparent 60%),
        radial-gradient(900px 500px at 90% 30%, rgba(34, 211, 238, 0.16), transparent 60%),
        linear-gradient(180deg, #0b1e3f 0%, #143a75 55%, #0e63b8 100%);
}

.blazor-error-boundary { background: #dc2626; padding: 1rem; color: white; border-radius: .5rem; }
.blazor-error-boundary::after { content: "An error has occurred."; }

#blazor-error-ui {
    background: #dc2626; color: white;
    position: fixed; bottom: 0; left: 0; width: 100%;
    padding: .75rem 1.25rem; z-index: 1000; display: none;
}
