/* Global styles. Component styles live next to their components (*.razor.css); the fonts'
   @font-face rules are in App.razor, so their URLs can be fingerprinted like the preloads. */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-functional);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration-color: var(--hairline);
    text-underline-offset: .3em;
    transition: color .3s ease, text-decoration-color .3s ease;

    &:hover {
        text-decoration-color: currentColor;
    }
}

:focus-visible {
    outline: 2px solid var(--hairline);
    outline-offset: 3px;
}

/* FocusOnNavigate (Routes.razor) moves focus to the page's h1 so screen readers announce the new
   page; that focus is programmatic and needs no ring (as in the Blazor template). */
h1:focus {
    outline: none;
}

h1,
h2,
h3 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-editorial);
    font-weight: 300;
    letter-spacing: .02em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

p {
    margin: 0 0 var(--space-2);
}

/* Small uppercase labels (the studio's "Outfit label" role), on any element, headings included. */
.label {
    font-family: var(--font-functional);
    font-weight: 400;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* A product's primary action (ProductAction, Configurator): the one solid element on the page;
   the accent glaze stays rare. */
.action {
    display: inline-block;
    padding: .95rem 2.2rem;
    background: var(--bg-deep);
    color: var(--ink-on-deep);
    font-weight: 400;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .3s ease;

    &:hover {
        background: var(--accent);
    }
}

/* One readable column: legal text, not-found and error pages. */
.narrow {
    max-width: calc(var(--measure) + 2 * var(--gutter));
    margin: 0 auto;
    padding: var(--space-6) var(--gutter);
}

/* Scroll reveal: a presence shift, never a slide (the studio's motion rules). Elements are hidden
   only once <html> has the js class, so nothing stays invisible without JavaScript. Use it below
   the fold; hiding the first screen only delays its paint. */
.js [data-reveal] {
    opacity: 0;
    filter: blur(2px);
    transition: opacity var(--reveal-duration) var(--ease), filter var(--reveal-duration) var(--ease);

    &.revealed {
        opacity: 1;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
        opacity: 1;
        filter: none;
        transition: none;
    }
}
