/**
 * A Lovely Wonder — Global styles & design tokens
 *
 * Rachel's world: soft blush surfaces, deep slate ink, muted mauve,
 * hand-drawn line florals. Playfair Display carries display type,
 * Rosarivo carries accents, Special Elite is the typewriter voice for
 * her own words, Roboto keeps body copy and forms quiet.
 */

:root {
    /* Surfaces */
    --bg: #FFFFFF;
    --blush: #F8F4F3;
    --blush-deep: #F1E9E6;

    /* Ink */
    --ink: #313341;
    --mauve: #847675;
    --text-muted: #A99C9B;

    /* Accent */
    --rose: #C4657E;
    --rose-soft: #E7C6CE;
    --error: #B3261E;

    /* Borders */
    --border-subtle: rgba(49, 51, 65, 0.10);
    --border-medium: rgba(49, 51, 65, 0.20);
    --border-strong: rgba(49, 51, 65, 0.38);

    /* Buttons */
    --btn-bg: #313341;
    --btn-text: #FFFFFF;
    --btn-hover-bg: #4A4D61;

    /* Shadows — soft, warm */
    --shadow-sm: 0 2px 10px rgba(132, 118, 117, 0.10);
    --shadow-md: 0 10px 40px rgba(132, 118, 117, 0.16);

    /* Type */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-serif: 'Rosarivo', Georgia, serif;
    --font-type: 'Special Elite', 'Courier New', monospace;
    --font-body: 'Roboto', Arial, sans-serif;

    /* Scale */
    --fs-hero: clamp(2.25rem, 5vw, 3.75rem);
    --fs-h2: clamp(1.625rem, 3vw, 2.25rem);
    --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
    --fs-body: 1rem;
    --fs-label: 0.8125rem;

    /* Rhythm */
    --section-pad: clamp(3.5rem, 8vw, 6.5rem);
    --container-max: 1140px;
    --container-narrow: 780px;
    --container-pad: clamp(1.25rem, 5vw, 3rem);

    --selection-bg: #313341;
    --selection-text: #F8F4F3;

    /* Aliases for shared component CSS (blog cards, kit sections, forms) */
    --text-primary: var(--ink);
    --text-secondary: var(--mauve);
    --text-muted-alias: var(--text-muted);
    --text-inverse: #FFFFFF;
    --text-inverse-secondary: rgba(255, 255, 255, 0.7);
    --bg-elevated: var(--blush);
    --bg-dark: var(--ink);
    --gold: var(--rose-soft);
    --gold-deep: var(--rose);
    --border-subtle-inverse: rgba(255, 255, 255, 0.14);
    --border-medium-inverse: rgba(255, 255, 255, 0.28);
    --shadow-lg: 0 24px 70px rgba(132, 118, 117, 0.24);
    --fs-statement: clamp(1.0625rem, 1.9vw, 1.5rem);

    --nav-offset: 106px;

    color-scheme: light;
}

/* ---------------------------------------------------------------- Reset */

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

html {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: 300;
    line-height: 1.85;
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: var(--ink);
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2rem 0;
}

/* Typography wrapping defaults (Colony standard) */
h1, h2, h3, h4, h5, h6,
.t-label, .navbar__menu-link-heading, .book-feature__status,
.training-hero__availability, .merch-teaser__badge,
.app-band__mark-sub { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }

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

/* ---------------------------------------------------------------- Lenis */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------------------------------------------------------------- Layout */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

.container--narrow { max-width: var(--container-narrow); }

/* ---------------------------------------------------------------- Utilities */

/* Small serif label with rose dashes */
.t-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-serif);
    font-size: var(--fs-label);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mauve);
}

.t-label::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--rose-soft);
}

.t-label--center::after {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--rose-soft);
}

/* Emphasis: <em> in headings = rose italic */
h1 em, h2 em, h3 em {
    font-style: italic;
    color: var(--rose);
}
p strong { font-weight: 500; color: var(--ink); }

/* Buttons — soft rectangle, serif tracking */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.9375rem 2.5rem;
    border-radius: 2px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-family: var(--font-serif);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.btn:hover { background: var(--btn-hover-bg); transform: translateY(-1px); }

.btn--rose { background: var(--rose); }
.btn--rose:hover { background: #B25570; }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--border-medium);
}
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }

/* Blush band base */
.section--blush { background: var(--blush); }

/* The script watermark — huge italic display text behind a section */
.watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.watermark span {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(6rem, 16vw, 13rem);
    white-space: nowrap;
    color: var(--blush-deep);
    opacity: 0.7;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    padding: 0.75rem 1.75rem;
    border-radius: 2px;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 30px; }

/* Focus visibility */
:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline-offset: -2px;
}
section:focus-visible { outline: none; }

/* ---------------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

main:focus { outline: none; }
