/* ===========================================================================
   Design tokens — extracted from the mobile and desktop prototypes.

   Every value here came from the prototypes' inline styles. Components below
   this file reference the token, never the raw value, so changing the brand
   colour is one edit rather than 108.

   The prototypes carry 13 distinct font sizes (12.5, 13, 13.5, 14, 14.5 ...),
   which is normal for a design-tool export where each element was nudged
   individually. Those are rationalised into a scale here; colours and radii
   are reproduced exactly.
   =========================================================================== */

:root {
    /* ---- Brand ---------------------------------------------------------- */
    --c-brand:            #7A3420;  /* buttons, links, the wordmark          */
    --c-brand-hover:      #5E2618;
    --c-brand-ink:        #FBF3E8;  /* text ON brand — cream, not white      */
    --c-brand-tint:       #F0E0D6;  /* brand-tinted surface                  */
    --c-brand-tint-hard:  #E3C2B4;  /* its border                            */

    /* ---- Text ----------------------------------------------------------- */
    --c-ink:              #1B1917;  /* headings, primary copy                */
    --c-ink-2:            #5D5852;  /* body copy — the most used colour      */
    --c-ink-3:            #8A857D;  /* labels, captions, metadata            */

    /* ---- Surfaces ------------------------------------------------------- */
    --c-page:             #FAFAF8;  /* body background                       */
    --c-surface:          #FFFFFF;  /* cards                                 */
    --c-surface-2:        #F2F1ED;  /* inset panels                          */
    --c-surface-3:        #EFEDE8;

    /* ---- Lines ---------------------------------------------------------- */
    --c-line:             #E6E4DF;  /* default border                        */
    --c-line-strong:      #DAD7D0;

    /* ---- Accent: the "connected" gold state ----------------------------- */
    --c-gold:             #F3E8D2;
    --c-gold-strong:      #E0B25C;
    --c-gold-ink:         #6F4F14;

    /* ---- Type ----------------------------------------------------------- */
    --font-display: 'Outfit', 'Avenir Next', system-ui, sans-serif;
    --font-body:    'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

    --t-xs:    12.5px;
    --t-sm:    13.5px;
    --t-base:  15px;
    --t-md:    17px;
    --t-lg:    19px;
    --t-xl:    24px;
    --t-2xl:   30px;
    --t-3xl:   40px;
    --t-4xl:   56px;

    /* ---- Spacing: a 4px base, so vertical rhythm stays consistent -------- */
    --s-1:   4px;
    --s-2:   8px;
    --s-3:   12px;
    --s-4:   16px;
    --s-5:   20px;
    --s-6:   24px;
    --s-8:   32px;
    --s-10:  40px;
    --s-12:  48px;
    --s-16:  64px;
    --s-20:  80px;

    /* ---- Radii ---------------------------------------------------------- */
    --r-sm:    8px;
    --r-md:    12px;
    --r-lg:    16px;
    --r-xl:    20px;
    --r-pill:  999px;

    /* ---- Elevation ------------------------------------------------------ */
    --shadow-sm: 0 1px 2px rgba(27, 25, 23, 0.04);
    --shadow-md: 0 2px 8px rgba(27, 25, 23, 0.06);
    --shadow-lg: 0 8px 28px rgba(27, 25, 23, 0.10);

    /* ---- Layout --------------------------------------------------------- */
    --page-max:    1180px;
    --gutter:      20px;
    --header-h:    64px;
}

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

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

body {
    margin: 0;
    background: var(--c-page);
    color: var(--c-ink-2);
    font-family: var(--font-body);
    font-size: var(--t-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--c-ink);
    line-height: 1.15;
    margin: 0;
    font-weight: 600;
}

a { color: var(--c-brand); text-decoration: none; }
a:hover { color: var(--c-brand-hover); text-decoration: underline; }

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

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

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--c-line-strong); border-radius: var(--r-pill); }

/* Carried over from the prototypes. Respecting this is an accessibility
   requirement, not a nicety: motion can trigger nausea and migraine for some
   people, and the OS-level preference is how they ask us to stop. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

/* Visible focus for keyboard users. Never remove an outline without
   replacing it — that strands anyone navigating without a mouse. */
:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* Visually hidden, but still read by screen readers. */
.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;
}
