/* =========================================================
   HALCYON & GRACE — BASE STYLES
   Shared foundation for every page
========================================================= */

/* ---------- Design tokens ---------- */
:root {
    --color-ink: #171514;
    --color-ink-soft: #3e3935;
    --color-cream: #f4efe5;
    --color-cream-deep: #e8dfd0;
    --color-paper: #fffdf8;
    --color-orange: #f4510b;
    --color-pink: #ec1375;
    --color-border: rgba(23, 21, 20, 0.18);

    --font-display: Georgia, "Times New Roman", serif;
    --font-body: Arial, Helvetica, sans-serif;

    --page-width: 1240px;
    --page-gutter: clamp(20px, 4vw, 64px);

    --space-1: 0.5rem;
    --space-2: 0.75rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 4.5rem;
    --space-8: 6rem;

    --transition-fast: 180ms ease;
    --transition-medium: 320ms ease;
}

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

/* ---------- Document ---------- */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-cream);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Media ---------- */
img,
picture,
video,
iframe {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
p,
figure {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.12;
}

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

/* ---------- Links ---------- */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ---------- Keyboard accessibility ---------- */
:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 4px;
}

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

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

/* ---------- Reduced motion ---------- */
@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;
    }
}
