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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body,
h1,
h2,
h3,
p,
ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

/* Document */
body {
    min-width: 20rem;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 4rem 4rem;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
}

main {
    display: block;
}

section {
    position: relative;
}

/* Typography */
h1,
h2,
h3 {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-heading);
    text-wrap: balance;
}

h1 {
    font-size: var(--font-size-hero);
    letter-spacing: var(--letter-spacing-tight);
    line-height: var(--line-height-tight);
    text-transform: uppercase;
}

h2 {
    font-size: var(--font-size-2xl);
    letter-spacing: var(--letter-spacing-tight);
    text-transform: uppercase;
}

h3 {
    font-size: var(--font-size-xl);
}

p {
    color: var(--color-text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

strong {
    font-weight: var(--font-weight-semibold);
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-text-dark);
}

/* Shared layout */
.container {
    width: min(100%, var(--container-width));
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

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

.section-heading {
    max-width: var(--content-width-md);
    margin-bottom: var(--space-8);
}

.section-heading h2 {
    margin-bottom: var(--space-3);
}

.section-heading > p:last-child {
    max-width: var(--content-width-sm);
    font-size: var(--font-size-md);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wider);
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 2.5rem;
    height: 2px;
    flex: 0 0 auto;
    content: "";
    background-color: currentColor;
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: var(--space-2);
    left: var(--space-2);
    z-index: var(--z-overlay);
    padding: 0.75rem 1rem;
    transform: translateY(calc(-100% - var(--space-2)));
    background-color: var(--color-accent);
    color: var(--color-text-dark);
    font-weight: var(--font-weight-semibold);
    transition: transform var(--transition-fast);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
