@import "tailwindcss";
@import "./tokens.css";

html {
    background: var(--color-background);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-foreground);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 30%),
        linear-gradient(180deg, var(--color-background) 0%, var(--color-background-elevated) 48%, var(--color-muted) 100%);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a:not([data-button-variant]) {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

code {
    font-family: var(--font-mono);
}

::selection {
    background: rgba(40, 60, 120, 0.12);
    color: var(--color-foreground);
}

:where(a, button, input, textarea, summary):focus-visible {
    outline: 3px solid rgba(40, 60, 120, 0.22);
    outline-offset: 4px;
}

main {
    display: block;
}

.foundation-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
}

.foundation-page::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), transparent 16%),
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.72), transparent 28%);
}

.foundation-page[data-shell-tone='brand']::before {
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.82), transparent 30%),
        radial-gradient(circle at 86% 0%, rgba(40, 60, 120, 0.04), transparent 28%),
        radial-gradient(circle at 72% 22%, rgba(40, 60, 120, 0.03), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 18%);
}

.foundation-page[data-shell-tone='trust']::before {
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.8), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(40, 60, 120, 0.04), transparent 30%),
        radial-gradient(circle at 74% 30%, rgba(100, 80, 140, 0.03), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 18%);
}

.foundation-page::after {
    position: absolute;
    inset: clamp(0.7rem, 1vw, 1.2rem);
    z-index: -1;
    content: "";
    border: 1px solid var(--color-frame);
    border-radius: calc(var(--radius-panel) + 0.45rem);
    pointer-events: none;
}

.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 40;
    transform: translateY(-200%);
    border-radius: var(--radius-pill);
    background: var(--color-foreground);
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: transform 140ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.section-divider {
    border-top: 1px solid var(--color-border-subtle);
}

.site-shell {
    position: relative;
}

.shell-panel {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: linear-gradient(180deg, var(--surface-shell-strong), var(--surface-shell));
    box-shadow: var(--shadow-panel-strong);
    backdrop-filter: blur(18px);
}

.glass-panel {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: linear-gradient(180deg, var(--surface-shell-strong), var(--surface-shell));
    box-shadow: var(--shadow-panel-strong);
    backdrop-filter: blur(18px);
}

.surface-card {
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, var(--color-card), var(--surface-card-soft));
    box-shadow: var(--shadow-card);
}

.surface-card-muted {
    border: 1px solid var(--color-border-subtle);
    background: linear-gradient(180deg, var(--surface-muted-strong), var(--surface-muted));
    box-shadow: var(--shadow-soft);
}

.surface-card-accent {
    border: 1px solid var(--color-border-strong);
    background: linear-gradient(180deg, var(--surface-accent-strong), var(--surface-accent));
    box-shadow: var(--shadow-soft);
}

.section-density-compact {
    padding-block: var(--space-section-compact);
}

.section-density-base {
    padding-block: var(--space-section);
}

.section-density-spacious {
    padding-block: var(--space-section-spacious);
}

.section-shell-muted {
    border: 1px solid var(--color-border-subtle);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(243, 247, 251, 0.4));
    border-radius: calc(var(--radius-lg) + 0.15rem);
}

.section-shell-emphasis {
    border: 1px solid var(--color-border-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(40, 60, 120, 0.03));
    border-radius: calc(var(--radius-lg) + 0.15rem);
}

.text-link {
    color: var(--color-foreground);
    text-decoration: underline;
    text-decoration-color: rgba(17, 36, 58, 0.2);
    text-underline-offset: 0.3em;
    transition:
        color 140ms ease,
        text-decoration-color 140ms ease;
}

.text-link:hover {
    color: var(--color-primary);
    text-decoration-color: rgba(40, 60, 120, 0.35);
}

.legal-prose p {
    margin: 0;
    color: var(--color-copy);
    line-height: 1.8;
}

.legal-prose p + p {
    margin-top: 1rem;
}

.legal-prose ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--color-copy);
    line-height: 1.75;
}

.legal-prose li + li {
    margin-top: 0.6rem;
}

.foundation-page [data-disclosure-layer='1'] {
    position: relative;
    z-index: 1;
}

.foundation-page [data-disclosure-layer='2'] {
    position: relative;
    z-index: 0;
}

.foundation-page [data-disclosure-layer='3'] {
    position: relative;
    z-index: 0;
}

.motion-rise {
    animation: rise-in 520ms ease both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Section tint bands ── */
.section-tinted {
    background: var(--surface-section-tinted);
    border-radius: calc(var(--radius-lg) + 0.15rem);
}

.section-warm {
    background: var(--surface-section-warm);
    border-radius: calc(var(--radius-lg) + 0.15rem);
}

/* ── Hero gradient band ── */
.hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(40, 60, 120, 0.02), transparent),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(40, 60, 120, 0.015), transparent);
    padding-bottom: var(--space-section);
}

/* ── Card hover lift ── */
.surface-card,
.surface-card-muted,
.surface-card-accent {
    transition:
        box-shadow 220ms ease,
        transform 220ms ease;
}

.card-hoverable:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* ── Callout accent bar ── */
.callout-bar {
    position: relative;
    padding-left: 1.25rem;
}

.callout-bar::before {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--color-primary);
    content: "";
}

.callout-bar[data-bar-tone="trust"]::before {
    background: var(--color-success);
}

.callout-bar[data-bar-tone="warm"]::before {
    background: var(--color-warning);
}

/* ── Accent text highlight ── */
.text-accent-word {
    color: var(--color-primary);
}

/* ── Feature icon circle ── */
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--surface-accent), var(--surface-accent-strong));
    color: var(--color-primary);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}
