/* ============================================================
   base.css — reset, design tokens, typography, utilities
   Design System: "The Sovereign Precision"
   Typefaces: Newsreader (editorial serif) + Inter (precision sans)
   ============================================================ */

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

:root {
    /* ── Brand Colours ──────────────────────────────────────── */
    --color-primary:      #25D366;   /* WhatsApp green — accent only */
    --color-primary-dk:   #202C2B;   /* Teal — interactive */
    --color-accent:       #006d2f;   /* Deep Trust Green — footer */
    --color-orange:       #FF5A1F;   /* Action orange */
    --color-ink:          #1c1b1b;   /* Near-black for headings/body */
    --color-ink-muted:    #6b7280;   /* Muted body text */

    /* ── Surface Layers (warm tonal stack) ──────────────────── */
    --surface:            #fcf9f8;   /* Page base */
    --surface-low:        #f6f3f2;   /* Alternate sections */
    --surface-card:       #ffffff;   /* Cards, modals */
    --surface-border:     rgba(28, 27, 27, 0.08);

    /* ── Semantic aliases ────────────────────────────────────── */
    --color-text:         var(--color-ink);
    --color-text-muted:   var(--color-ink-muted);
    --color-bg:           var(--surface);
    --color-bg-alt:       var(--surface-low);
    --color-border:       var(--surface-border);

    /* ── Typography ──────────────────────────────────────────── */
    --font-serif:  'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

    /* ── Spacing scale ───────────────────────────────────────── */
    --space-xs:   0.25rem;
    --space-sm:   0.5rem;
    --space-md:   1rem;
    --space-lg:   2rem;
    --space-xl:   4rem;
    --space-2xl:  7rem;

    /* ── Radii ───────────────────────────────────────────────── */
    --radius-sm:   0.125rem;
    --radius:      0.25rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-full: 9999px;

    /* ── Layout ──────────────────────────────────────────────── */
    --container-max: 1200px;

    /* ── Shadows (tinted with ink, not grey) ─────────────────── */
    --shadow-xs: 0 1px 3px rgba(28, 27, 27, 0.04);
    --shadow-sm: 0 2px 8px rgba(28, 27, 27, 0.05);
    --shadow:    0 4px 16px rgba(28, 27, 27, 0.07);
    --shadow-lg: 0 20px 40px rgba(28, 27, 27, 0.09);
}

/* ── Base ──────────────────────────────────────────────────── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip; /* prevents any element from widening the page */
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    max-width: 100%;
}

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

a {
    color: var(--color-primary-dk);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { text-decoration: underline; color: #0f7569; }

/* ── Headings ──────────────────────────────────────────────── */
/* Newsreader for h1–h3 (narrative/editorial), Inter for h4–h6 (utility) */
h1, h2, h3 {
    font-family: var(--font-serif);
    line-height: 1.15;
    font-weight: 700;
    color: var(--color-ink);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h4, h5, h6 {
    font-family: var(--font-sans);
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(1.92rem, 4.4vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 1em; }

ul, ol { padding-left: 1.5rem; margin-bottom: var(--space-md); }
li { margin-bottom: 0.25rem; }

/* ── Blockquote ─────────────────────────────────────────────── */
blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-style: italic;
    line-height: 1.55;
    color: var(--color-ink);
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
}
blockquote p             { font-size: inherit; margin-bottom: var(--space-sm); }
blockquote p:last-child  { margin-bottom: 0; }
blockquote footer {
    display: block;
    font-style: normal;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-dk);
    margin-top: var(--space-md);
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

/* ── Utilities ──────────────────────────────────────────────── */

/* Eyebrow label — small all-caps label above a heading.
   Pairs with .page-hero h1, .section-title, or any standalone heading.
   Also mapped to the frontmatter `label` key in default.php.          */
.eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.text-center    { text-align: center; }
.text-left      { text-align: left; }
.text-muted     { color: var(--color-text-muted); }
.text-sm        { font-size: 0.875rem; }
.text-xs        { font-size: 0.8rem; }
.text-lead      { font-size: 1.125rem; line-height: 1.75; color: var(--color-text-muted); }
.text-serif     { font-family: var(--font-serif); }
.font-bold      { font-weight: 700; }

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    max-width: 680px;
    margin-inline: auto;
    font-size: 1.075rem;
    line-height: 1.75;
    
}
/* When subtitle follows a centered title, remove top margin */
.section-title + .section-subtitle { margin-top: calc(-1 * var(--space-sm)); }

/* Narrow centred prose column */
.container-narrow { max-width: 800px; }

.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-0   { margin-bottom: 0; }
.mb-lg  { margin-bottom: var(--space-lg); }

/* Fade-in on scroll */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

blockquote.reveal.visible{
    max-width: 800px;
    margin: 4rem auto;
}