*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.hero,
.section[id],
.site-footer[id] {
    scroll-margin-top: calc(var(--header-height) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--background-deep);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 15% 10%, rgba(59, 91, 219, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 45% at 85% 25%, rgba(123, 92, 240, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 80%, rgba(77, 212, 255, 0.06) 0%, transparent 55%),
        linear-gradient(180deg, var(--background-deep) 0%, var(--background-secondary) 45%, var(--background-deep) 100%);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

h1,
h2,
h3,
h4 {
    line-height: 1.15;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

a {
    color: var(--blue-accent);
    transition: color var(--duration-fast) var(--ease-soft);
}

a:hover {
    color: var(--cyan);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blue-accent);
    outline-offset: 3px;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

::selection {
    background: var(--champagne-soft);
    color: var(--text-primary);
}

#main-content {
    position: relative;
}
