/* ==========================================================================
   boudoir Frontend — Base Layer
   Resets, @font-face, element defaults.
   Layer 3 — requires tokens-structure.css + tokens-theme.css
   ========================================================================== */

/* Self-hosted fonts — the files live in /fonts/, no runtime request to
   any third-party host (DESIGN.md requirement). Both are variable fonts:
   weight range declared so one file covers every used weight. */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/jost-latin.woff2') format('woff2');
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* The page never scrolls horizontally — horizontal scrolling exists
       only inside intentionally-scrollable rows (.face-scroll etc). */
    overflow-x: hidden;
}

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

a {
    color: var(--color-text-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent-hover);
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-display);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

/* Visible focus ring on every interactive element — AA a11y, DESIGN.md */
:focus-visible {
    outline: var(--size-focus-ring) solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

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

/* Static-page prose (about/terms/privacy/dmca/2257/contact). */
.page-content {
    max-width: var(--content-max-width-prose);
    padding: var(--spacing-8) 0 var(--spacing-12);
}

.page-content__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--spacing-6);
}

.page-content__section {
    margin-bottom: var(--spacing-6);
}

.page-content__section h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--spacing-3);
}

.page-content__section p,
.page-content__section li {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--spacing-3);
}

.page-content__section ul {
    padding-left: var(--spacing-6);
}

.page-content__section li {
    margin-bottom: var(--spacing-2);
}

/* Reduced motion — honor it everywhere, not per-component. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
