/* ============================================================================
   Theme: Chapel
   ============================================================================
   Traditional and reverent. Warm stone surfaces, muted navy, antique gold as the
   accent, serif headings, generous spacing, restrained shadows.

   THIS THEME EXERCISES THE TYPE AND DENSITY TOKENS.
   Midnight and Clarity only move colour, shape and shadow. Chapel is the first
   theme to change the FONT PAIR and the heading treatment, which is what proves
   a theme can alter personality rather than just hue:

       --ac-font-heading   Merriweather (already loaded in _Layout for scripture)
       --ac-heading-tracking / --ac-label-tracking
       --ac-gap / --ac-card-pad / --ac-section-gap

   Not touched: --ac-font-scripture. The Bible reader's serif is a readability
   decision, not a style one, and a theme has no business overriding it.

   AND IT IS THE COLLISION CASE.
   Chapel's accent is antique gold — the same hue the Give page used to hardcode.
   Under this theme a hardcoded-gold Give page would have become indistinguishable
   from the rest of the site: the page's whole visual identity would have silently
   vanished, with nothing erroring and no obvious cause. That is the concrete
   reason pages follow the theme instead of pinning their own colour.
   ============================================================================ */

/* ============================================================================
   LIGHT — the intended mode
   ============================================================================ */
:root[data-ac-theme="chapel"][data-bs-theme="light"] {
    --ac-brand: #1e3a5f;
    --ac-brand-rgb: 30, 58, 95;
    --ac-brand-hover: #162c48;
    --ac-brand-active: #101f33;
    --ac-brand-light: #5b7fa6;
    --ac-brand-soft: #eef2f7;
    --ac-brand-contrast: #ffffff;

    /* Antique gold. Bright fill, dark ink — gold is a light hue and cannot carry
       white text at any usable saturation. */
    --ac-accent: #8a6410;
    --ac-accent-rgb: 138, 100, 16;
    --ac-accent-fill: #c9a227;
    --ac-accent-fill-hover: #b28d1f;
    --ac-accent-on-fill: #201703;
    --ac-accent-ink: #6d4f0c;
    --ac-accent-soft: #faf5e6;

    /* Warm stone rather than cool slate — the single biggest reason this reads as
       a different building from the Default theme. */
    --ac-bg: #f7f5f1;
    --ac-surface: #fffefb;
    --ac-surface-sunken: #efece5;
    --ac-surface-raised: #fffefb;
    --ac-surface-glass: rgba(255, 254, 251, 0.95);
    --ac-surface-inverse: #26211a;
    --ac-text-on-inverse: #f7f5f1;

    --ac-text: #241f1a;
    --ac-text-muted: #5f574c;
    --ac-text-subtle: #857b6d;
    --ac-border: #ded8cc;
    --ac-border-strong: #857b6d;

    /* Serif headings, sans body — the traditional pairing. Merriweather is already
       loaded by _Layout, so this costs no extra font request. */
    --ac-font-heading: "Merriweather", Georgia, "Times New Roman", serif;
    --ac-weight-heading: 700;
    --ac-heading-tracking: -0.005em;
    --ac-label-tracking: 0.08em;

    /* Settled and unhurried. */
    --ac-gap: 1.25rem;
    --ac-card-pad: 1.5rem;
    --ac-section-gap: 2.5rem;
    --ac-leading-normal: 1.6;

    /* Restrained: a formal look does not float. */
    --ac-radius-xs: 2px;
    --ac-radius-sm: 4px;
    --ac-radius-md: 6px;
    --ac-radius-lg: 8px;
    --ac-shadow-sm: 0 1px 2px rgba(36, 31, 26, 0.06);
    --ac-shadow-md: 0 2px 6px rgba(36, 31, 26, 0.08);
    --ac-shadow-lg: 0 6px 16px rgba(36, 31, 26, 0.1);
    --ac-shadow-glow: none;
    --ac-lift: translateY(-2px);

    --ac-gradient-brand: linear-gradient(135deg, #1e3a5f 0%, #101f33 100%);
    --ac-gradient-accent: linear-gradient(135deg, #c9a227 0%, #b28d1f 100%);
    --ac-gradient-brand-accent: linear-gradient(135deg, #1e3a5f 0%, #8a6410 100%);
    --ac-gradient-inverse: linear-gradient(135deg, #26211a 0%, #171310 100%);

    --ac-tooltip-bg: #26211a;
    --ac-tooltip-text: #f7f5f1;

    /* Status tints warmed onto the stone surfaces. Hues unchanged — red is still
       red, per the status rule in theme-tokens.css. */
    --ac-success-soft: #e6f1e8;
    --ac-warning-soft: #f9efd9;
    --ac-danger-soft: #f7e4e2;
    --ac-info-soft: #e5eef5;
    --ac-neutral-soft: #efece5;
    --ac-neutral-text: #5f574c;
}

/* ---- Light variants: the brand hue only -------------------------------- */
:root[data-ac-theme="chapel"][data-ac-variant="stone"][data-bs-theme="light"] {
    --ac-brand: #57534e;
    --ac-brand-rgb: 87, 83, 78;
    --ac-brand-hover: #44403c;
    --ac-brand-active: #332f2c;
    --ac-brand-light: #a8a29e;
    --ac-brand-soft: #f2f0ed;
    --ac-gradient-brand: linear-gradient(135deg, #57534e 0%, #332f2c 100%);
    --ac-gradient-brand-accent: linear-gradient(135deg, #57534e 0%, #8a6410 100%);
}

:root[data-ac-theme="chapel"][data-ac-variant="wine"][data-bs-theme="light"] {
    --ac-brand: #7f1d3a;
    --ac-brand-rgb: 127, 29, 58;
    --ac-brand-hover: #67172f;
    --ac-brand-active: #4e1124;
    --ac-brand-light: #be6b85;
    --ac-brand-soft: #f9edf1;
    --ac-gradient-brand: linear-gradient(135deg, #7f1d3a 0%, #4e1124 100%);
    --ac-gradient-brand-accent: linear-gradient(135deg, #7f1d3a 0%, #8a6410 100%);
}

:root[data-ac-theme="chapel"][data-ac-variant="sage"][data-bs-theme="light"] {
    --ac-brand: #3f5340;
    --ac-brand-rgb: 63, 83, 64;
    --ac-brand-hover: #334333;
    --ac-brand-active: #263226;
    --ac-brand-light: #86a487;
    --ac-brand-soft: #eef2ee;
    --ac-gradient-brand: linear-gradient(135deg, #3f5340 0%, #263226 100%);
    --ac-gradient-brand-accent: linear-gradient(135deg, #3f5340 0%, #8a6410 100%);
}


/* ============================================================================
   DARK — candlelit rather than neon
   ============================================================================
   Warm near-blacks, not the cool charcoal Midnight uses. The brand has to lift
   well off a dark surface, so it becomes a pale slate blue.
   ============================================================================ */
:root[data-ac-theme="chapel"][data-bs-theme="dark"] {
    --ac-brand: #9fb8d4;
    --ac-brand-rgb: 159, 184, 212;
    --ac-brand-hover: #bdcee2;
    --ac-brand-active: #d8e3ef;
    --ac-brand-light: #d8e3ef;
    --ac-brand-soft: #1b2634;
    --ac-brand-contrast: #101b28;

    --ac-accent: #d8b23f;
    --ac-accent-rgb: 201, 162, 39;
    --ac-accent-fill: #c9a227;
    --ac-accent-fill-hover: #ddb63a;
    --ac-accent-on-fill: #201703;
    --ac-accent-ink: #e5c765;
    --ac-accent-soft: #2e250c;

    --ac-bg: #14110e;
    --ac-surface: #1e1a16;
    --ac-surface-sunken: #191511;
    --ac-surface-raised: #2a251f;
    --ac-surface-glass: rgba(30, 26, 22, 0.88);
    --ac-surface-inverse: #2a251f;
    --ac-text-on-inverse: #f2ece2;

    --ac-text: #f2ece2;
    --ac-text-muted: #b3a898;
    --ac-text-subtle: #8a8071;
    --ac-border: #332c24;
    --ac-border-strong: #8a8071;

    --ac-font-heading: "Merriweather", Georgia, "Times New Roman", serif;
    --ac-weight-heading: 700;
    --ac-heading-tracking: -0.005em;
    --ac-label-tracking: 0.08em;

    --ac-gap: 1.25rem;
    --ac-card-pad: 1.5rem;
    --ac-section-gap: 2.5rem;
    --ac-leading-normal: 1.6;

    --ac-radius-xs: 2px;
    --ac-radius-sm: 4px;
    --ac-radius-md: 6px;
    --ac-radius-lg: 8px;
    --ac-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --ac-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.55);
    --ac-shadow-lg: 0 8px 22px rgba(0, 0, 0, 0.65);
    --ac-shadow-glow: none;
    --ac-lift: translateY(-2px);

    --ac-gradient-brand: linear-gradient(135deg, #3a5a80 0%, #9fb8d4 100%);
    --ac-gradient-accent: linear-gradient(135deg, #a5831c 0%, #c9a227 100%);
    --ac-gradient-brand-accent: linear-gradient(135deg, #9fb8d4 0%, #c9a227 100%);
    --ac-gradient-inverse: linear-gradient(135deg, #2a251f 0%, #191511 100%);

    --ac-tooltip-bg: #3a332a;
    --ac-tooltip-text: #f2ece2;

    --ac-success-soft: #10301f;
    --ac-success-text: #7fd6a6;
    --ac-warning-soft: #35280a;
    --ac-warning-text: #f0cc70;
    --ac-danger-soft: #3a1a19;
    --ac-danger-text: #f2a8a2;
    --ac-info-soft: #12293a;
    --ac-info-text: #93c7e8;
    --ac-neutral-soft: #2a251f;
    --ac-neutral-text: #cbc0b0;
}

:root[data-ac-theme="chapel"][data-ac-variant="stone"][data-bs-theme="dark"] {
    --ac-brand: #c4bdb4;
    --ac-brand-rgb: 196, 189, 180;
    --ac-brand-hover: #d6d0c8;
    --ac-brand-active: #e8e3dc;
    --ac-brand-light: #e8e3dc;
    --ac-brand-soft: #2b2620;
    --ac-brand-contrast: #1c1814;
}

:root[data-ac-theme="chapel"][data-ac-variant="wine"][data-bs-theme="dark"] {
    --ac-brand: #e39bad;
    --ac-brand-rgb: 227, 155, 173;
    --ac-brand-hover: #edb7c4;
    --ac-brand-active: #f5d3db;
    --ac-brand-light: #f5d3db;
    --ac-brand-soft: #34161f;
    --ac-brand-contrast: #2a0f18;
}

:root[data-ac-theme="chapel"][data-ac-variant="sage"][data-bs-theme="dark"] {
    --ac-brand: #a7c4a8;
    --ac-brand-rgb: 167, 196, 168;
    --ac-brand-hover: #c0d6c1;
    --ac-brand-active: #d8e6d8;
    --ac-brand-light: #d8e6d8;
    --ac-brand-soft: #1d2a1e;
    --ac-brand-contrast: #14200f;
}
