/* ==========================================================================
   Virtually Rory - style.css
   v26. Adds alias tokens for legacy/scattered variable names so admin,
   blog post, and other components all resolve consistently.
   ========================================================================== */

:root {
    /* ── Core palette ─────────────────────────────────────────────── */
    --bg:        #ffffff;       /* main page background */
    --bg-warm:   #fbf9f5;       /* cream section background */
    --ink:       #1a1814;       /* primary text */
    --ink-2:     #4a4640;       /* secondary text */
    --ink-3:     #7c776f;       /* tertiary/muted text */
    --ink-4:     #b8b4ac;       /* very light, for placeholders, borders */

    --line:      #e8e5e0;       /* hairline borders */
    --brand:     #2C4F7A;       /* navy blue brand */

    /* ── Status colours (used by admin, forms, alerts) ─────────────── */
    --green:       #16a34a;
    --green-soft:  #dcfce7;
    --red:         #b91c1c;
    --red-soft:    #fee2e2;

    /* ── Aliases ──────────────────────────────────────────────────────
       Keeps older/scattered class names working without rewriting every
       component. New code should also be free to use either name.
       ─────────────────────────────────────────────────────────────── */
    --white:         var(--bg);
    --cream:         var(--bg-warm);
    --sand:          var(--bg-warm);
    --warm:          var(--ink-3);
    --stone:         var(--ink-2);
    --border:        var(--line);
    --border-light:  var(--line);
    --accent:        var(--brand);
    --accent-hover:  #1f3a5c;            /* slightly darker brand */
    --blue-mist:     #eaf0f7;            /* soft tint of brand */

    /* ── Corners ──────────────────────────────────────────────────── */
    --r-sm:      6px;
    --r:         8px;
    --r-lg:      12px;

    /* Radius aliases */
    --radius:     var(--r);
    --radius-sm:  var(--r-sm);
    --radius-lg:  var(--r-lg);

    /* ── Shadows (used by admin cards) ────────────────────────────── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
    --shadow:    0 4px 16px rgba(0,0,0,0.04);

    /* ── Type ─────────────────────────────────────────────────────── */
    --display:   'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --body:      'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   RESET
   ========================================================================== */

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

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

body {
    font-family: var(--body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

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

/* Links default to ink. Any component styles (nav, hero, etc)
   set their own colours. No global hover colour. */
a {
    color: var(--ink);
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

::selection {
    background: var(--ink);
    color: #fff;
}

/* ==========================================================================
   HEADINGS (base only. Section-specific styles override.)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* ==========================================================================
   LAYOUT HELPERS
   ========================================================================== */

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Narrow content column — for blog posts and other reading content. */
.wrap-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 720px) {
    .wrap { padding: 0 20px; }
    .wrap-narrow { padding: 0 20px; }
}

/* Full-bleed sections (used with .wrap nested inside) */
.full-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Reveal animation used by IntersectionObserver in footer.php */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   SVG SPRITE (hidden defs referenced via <use href="#id">)
   Only needs to sit somewhere in the DOM; we hide it here.
   ========================================================================== */

svg[style*="display:none"],
svg[style*="display: none"] { display: none; }

/* ==========================================================================
   FOCUS STATES (accessible default)
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 2px;
}
button:focus-visible,
a:focus-visible {
    outline-offset: 3px;
}

/* Images should never show the outline */
img:focus-visible { outline: none; }

/* ==========================================================================
   COMMON UTILITIES
   ========================================================================== */

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

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .wa-float,
    .cookie-banner,
    .modal-overlay,
    nav, footer { display: none !important; }
    body { background: #fff; color: #000; }
}