/* =========================================================================
   GTS — base.css
   Design tokens and shared styles. Inherited by every page.
   Edit values here to propagate across the site.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
    /* Colour */
    --c-green:        #1B3B2F;   /* British Racing Green — primary */
    --c-green-deep:   #122821;   /* Darker green for hovers / depth */
    --c-brass:        #B8956A;   /* Brass / champagne — accent */
    --c-brass-soft:   #C9A984;   /* Lighter brass for hovers */
    --c-cream:        #F5F2EC;   /* Off-white — page background */
    --c-cream-warm:   #EDE7DB;   /* Warmer off-white for bands */
    --c-charcoal:     #1A1A1A;   /* Body text / deep neutral */
    --c-charcoal-mid: #4A4A4A;   /* Secondary text */
    --c-rule:         rgba(184, 149, 106, 0.35); /* Brass at low opacity for rules */

    /* Typography */
    --f-serif: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
    --f-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Type scale — fluid, restrained */
    --t-hero:    clamp(2.75rem, 6vw + 0.5rem, 5.25rem);  /* Hero serif */
    --t-display: clamp(2rem, 3.5vw + 0.5rem, 3.25rem);   /* Section serifs */
    --t-h2:      clamp(1.5rem, 1.5vw + 0.75rem, 2rem);   /* Subheads */
    --t-h3:      1.125rem;                                /* Tile titles */
    --t-body:    1rem;                                    /* Body */
    --t-small:   0.8125rem;                               /* Captions, nav */
    --t-micro:   0.6875rem;                               /* Eyebrows, labels */

    /* Spacing scale */
    --s-1:  0.5rem;
    --s-2:  1rem;
    --s-3:  1.5rem;
    --s-4:  2rem;
    --s-5:  3rem;
    --s-6:  4.5rem;
    --s-7:  6rem;
    --s-8:  9rem;

    /* Layout */
    --container:        1280px;
    --container-narrow: 720px;   /* For prose passages */
    --container-text:   560px;   /* For tight editorial columns */

    /* Motion */
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:   180ms;
    --t-med:    320ms;
    --t-slow:   600ms;
}

/* ---------- Reset (light) ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--c-cream);
    color: var(--c-charcoal);
    font-family: var(--f-sans);
    font-size: var(--t-body);
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ---------- Type ---------- */
h1, h2, h3, h4 {
    font-family: var(--f-serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
}

p { margin: 0; }

.eyebrow {
    font-family: var(--f-sans);
    font-size: var(--t-micro);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-brass);
}

.eyebrow--dark { color: var(--c-charcoal-mid); }

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--s-3);
}

@media (min-width: 768px) {
    .container { padding-inline: var(--s-5); }
}

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

.section { padding-block: var(--s-7); }

@media (min-width: 768px) {
    .section { padding-block: var(--s-8); }
}

/* ---------- Site chrome ---------- */
.site-header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 10;
    padding: var(--s-3) var(--s-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--c-cream);
}

/* Static variant — for pages without a full-bleed hero. Sits on dark band. */
.site-header--static {
    position: relative;
    background: var(--c-charcoal);
    inset: auto;
}

@media (min-width: 768px) {
    .site-header { padding: var(--s-4) var(--s-5); }
}

.wordmark {
    font-family: var(--f-serif);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    color: inherit;
}

.wordmark .dot { color: var(--c-brass); }

.nav {
    display: none;
    gap: var(--s-4);
    font-size: var(--t-small);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .nav { display: flex; }
}

.nav a {
    position: relative;
    padding-block: var(--s-1);
    transition: color var(--t-fast) var(--ease);
}

.nav a::after {
    content: "";
    position: absolute;
    inset: auto 0 0 50%;
    width: 0;
    height: 1px;
    background: var(--c-brass);
    transition: width var(--t-med) var(--ease), left var(--t-med) var(--ease);
}

.nav a:hover::after { width: 100%; left: 0; }

/* Mobile nav toggle — minimal, just visual for now */
.nav-toggle {
    display: block;
    font-size: var(--t-small);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-charcoal);
    color: var(--c-cream);
    padding: var(--s-6) 0 var(--s-4);
    font-size: var(--t-small);
}

.site-footer .container {
    display: grid;
    gap: var(--s-5);
}

@media (min-width: 768px) {
    .site-footer .container {
        grid-template-columns: 1fr 1fr 1fr;
        align-items: start;
    }
}

.site-footer h4 {
    font-family: var(--f-sans);
    font-size: var(--t-micro);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-brass);
    margin-bottom: var(--s-2);
}

.site-footer a { transition: color var(--t-fast) var(--ease); }
.site-footer a:hover { color: var(--c-brass); }

.site-footer .meta {
    grid-column: 1 / -1;
    margin-top: var(--s-4);
    padding-top: var(--s-3);
    border-top: 1px solid rgba(245, 242, 236, 0.15);
    color: rgba(245, 242, 236, 0.55);
    font-size: var(--t-micro);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--s-2);
}

/* ---------- Buttons / CTAs ---------- */
.cta {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--f-sans);
    font-size: var(--t-small);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: var(--s-2) 0;
    border-bottom: 1px solid currentColor;
    transition: gap var(--t-med) var(--ease), color var(--t-fast) var(--ease);
}

.cta::after {
    content: "→";
    font-size: 1rem;
    transition: transform var(--t-med) var(--ease);
}

.cta:hover { gap: var(--s-3); }
.cta:hover::after { transform: translateX(2px); }

.cta--brass { color: var(--c-brass); }
.cta--cream { color: var(--c-cream); }

/* Solid button variant (for form submit, etc.) */
.btn {
    display: inline-block;
    padding: var(--s-2) var(--s-4);
    font-family: var(--f-sans);
    font-size: var(--t-small);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: var(--c-green);
    color: var(--c-cream);
    border: 1px solid var(--c-green);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
    cursor: pointer;
}

.btn:hover { background: var(--c-green-deep); }
.btn--ghost { background: transparent; color: var(--c-cream); }
.btn--ghost:hover { background: var(--c-cream); color: var(--c-green); }

/* ---------- Rules / dividers ---------- */
.rule {
    width: 100%;
    height: 1px;
    background: var(--c-rule);
    border: 0;
    margin: 0;
}

.rule--brass {
    height: 1px;
    background: var(--c-brass);
    width: 40px;
    margin-inline: auto;
}

.rule--brass-left {
    height: 1px;
    background: var(--c-brass);
    width: 40px;
    margin: 0;
}

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--c-brass);
    outline-offset: 3px;
}

.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;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
