/*
Theme Name: BanffGuide
Description: Child theme for BanffGuide.com. Colour and type tokens, the wordmark and the site's own templates. Layout and components come from the parent theme, DM Local.
Author: Digified Media
Template: dm-local
Version: 1.0.0
Text Domain: banffguide
*/

/* ==========================================================================
   Tokens: the Bow Valley at blue hour.

   The hour before sunrise at Vermilion Lakes: the limestone is in shadow and
   reads slate indigo, the snow holds what light there is, and the first sun
   lands on the summits as a thin warm line. The palette is that scene, read
   from the top down. The hero is the sky and the rock in shadow; the page
   stays white, like the snow; panels take the cool grey of limestone; links
   are the blue-violet of mountain lupins; and the one colour a
   reader acts on is the rock-flour turquoise of the lakes they came for. The
   warm note is the alpenglow, kept to the ridge line, the wordmark's summit
   and the focus ring.

   Three sister sites share the parent theme and hold the water and the
   plants between them: Tsawwassen's brand sits at hue 201, LadnerBC's at 141
   and Bimini's at 170. Evergreen and sky blue are both inside that span, so
   this site takes the rock and the hour instead of the forest: brand at 233,
   links at 250, the accent at 187. The nearest of the nine distances is 30
   degrees. Buttons carry dark ink on turquoise where Tsawwassen's carry
   white on coral, LadnerBC's dark on ochre and Bimini's white on hibiscus.

   Every ratio was computed, not estimated. scripts/contrast-check.py reads
   this block, measures all nine hue distances against the sisters' shipped
   values and recomputes every pair, so a polish pass that moves a token is
   checked before it ships; plans/design-notes.md carries its tables. The
   page background stays the parent's white, because a white-backed AdSense
   unit arrives in Phase 23 and would draw a visible rectangle on a tinted
   page.
   ========================================================================== */
:root {
    /* Colour */
    --dm-c-surface: #f3f4f9;        /* limestone in open shade; muted on it 6.90:1 */
    --dm-c-surface-alt: #e6e8f2;    /* deeper panel; muted on it 6.21:1 */
    --dm-c-ink: #141833;            /* near-black with the indigo in it; 17.38:1 on bg */
    --dm-c-muted: #4d5273;          /* 7.58:1 on bg */
    --dm-c-line: #d6d9e8;           /* hairline, tinted toward the surface */
    --dm-c-brand: #2a3166;          /* the rock in shadow; white on it 12.14:1 */
    --dm-c-brand-strong: #1c2149;   /* the wordmark's hover; 15.41:1 under white */
    --dm-c-brand-muted: #cfd4f1;    /* hero lede and footer body; 8.29:1 on brand */
    --dm-c-link: #563fc6;           /* lupin; 7.19:1 on bg, 6.54:1 on surface */
    --dm-c-link-hover: #3d2b99;     /* 10.48:1 on bg */
    --dm-c-accent: #1499aa;         /* rock-flour turquoise; fill 3.41:1 on bg */
    --dm-c-accent-hover: #2bb3c4;   /* lightens, because the ink on it is dark */
    --dm-c-accent-ink: #0a1230;     /* 5.40:1 on the accent, 7.31:1 on the hover */
    --dm-c-info-bg: #edeefb;
    --dm-c-info-line: #563fc6;      /* 6.24:1 on info-bg */
    --dm-c-warn-bg: #fcf3e0;
    --dm-c-warn-line: #8a5a0b;      /* amber, hue 37: a warning must not read as the focus
                                       ring (hue 16) or as a link. 5.37:1 on warn-bg */
    --dm-c-focus: #d95f33;          /* alpenglow, at the one lightness that clears 3:1 on
                                       all four grounds a ring can land on: 3.73:1 on the
                                       page, 3.39:1 on a panel, 3.05:1 on the deeper
                                       panel and 3.26:1 on the brand field. One value,
                                       so nothing is redefined outside this block. */

    /* Type. Heads are set in the engineering sans of road and trailhead signs:
       DIN Alternate on macOS and iOS, Bahnschrift on Windows. Tsawwassen has
       Georgia, LadnerBC a condensed gothic and Bimini a flared humanist.
       Android has neither face and falls back to Roboto. Nothing is
       downloaded. */
    --dm-font-head: "DIN Alternate", Bahnschrift, Roboto, "Segoe UI", system-ui, sans-serif;
    --dm-fw-black: 700;             /* down from 800: neither face ships one */
    --dm-ls-head: 0;                /* sign lettering is never tightened; the parent pulls in at -0.015em */
    --dm-ls-caps: 0.09em;           /* eyebrows and footer headings read as map labels */
    --dm-lh-head: 1.12;             /* a face with short extenders needs less leading */

    /* Shape. Corners a step squarer than the parent's, the way a routed sign
       is cut, and the parent's blue-grey shadow recast onto this site's ink. */
    --dm-radius: 4px;
    --dm-radius-lg: 8px;
    --dm-shadow: 0 1px 2px rgba(20, 24, 51, 0.06), 0 4px 14px rgba(20, 24, 51, 0.07);

    /* This site's own */
    --bnf-c-dawn: #6a5b9c;          /* the sky at the horizon, where the hero's field lifts
                                       toward first light. Decorative, and confined to
                                       the band the hero reserves under its text. */
    --bnf-c-ridge: #3c4482;         /* the far range, standing dark against that horizon
                                       the way distance flattens a mountain. Decorative. */
    --bnf-c-glow: #f6b08f;          /* first light along the near range's crest.
                                       Decorative: nothing that has to be read is set in
                                       it, and it is drawn only against the sky. */
    --bnf-c-tld: #0c7482;           /* the ".com" in the wordmark: the accent's own hue,
                                       deepened to 5.47:1 on bg so it reads as text */
    --bnf-ridge-h: 6rem;            /* the hero reserves exactly this in its own padding */
}

/* ==========================================================================
   Wordmark: one tilted summit with the first light on it.
   ========================================================================== */
.bnf-wordmark__tld { color: var(--bnf-c-tld); }
.bnf-wordmark__lit { fill: var(--dm-c-focus); }

/* On a phone narrower than 360px the wordmark and a labelled menu button do
   not fit side by side. The button keeps its icon; its label stays for screen
   readers. Measured at 320px with a one-item primary menu assigned, which is
   when the header is widest. */
@media (max-width: 22.4375em) {
    .dm-header__bar { gap: var(--dm-sp-2); }
    .dm-nav-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* ==========================================================================
   Homepage hero: the sky, a far range, and the near range in snow.

   The Front Ranges are thrust sheets: each mountain is a slab tilted the same
   way, a long ramp on one side and a cliff on the other. Mount Rundle is the
   one everybody photographs. So the hero's lower edge is a row of wedges that
   all lean one way, and it is the page's own white, cut into the sky, with a
   lighter range behind it and a warm line along its crest.

   Tsawwassen's hero ends in a symmetric wave, LadnerBC's in a level dyke and
   Bimini's in a shelf of shallow water. This one ends in a skyline.

   The drawing keeps its proportions at every width: the SVG is sliced, never
   stretched, so a phone shows the first peak and a half and a wide screen
   shows the range. Its height is fixed in rem and reserved by the hero's own
   padding, so nothing moves on load.
   ========================================================================== */
.bnf-hero {
    position: relative;
    padding-bottom: calc(var(--dm-sp-7) + var(--bnf-ridge-h));
    /* The sky lifts only inside the band the padding reserves, so the hero's
       text always sits on the plain brand field it was measured against. */
    background-image: linear-gradient(to bottom, var(--dm-c-brand) calc(100% - var(--bnf-ridge-h) - var(--dm-sp-7)), var(--bnf-c-dawn));
}
.bnf-hero .dm-eyebrow { display: flex; align-items: center; gap: var(--dm-sp-1); }
.bnf-hero__start { margin-top: var(--dm-sp-5); }
.bnf-hero__ridge {
    position: absolute;
    left: 0;
    bottom: -1px;
    display: block;
    width: 100%;
    max-width: none;
    height: var(--bnf-ridge-h);
    pointer-events: none;
}
.bnf-hero__far { fill: var(--bnf-c-ridge); }
.bnf-hero__near { fill: var(--dm-c-bg); }
.bnf-hero__glow { fill: none; stroke: var(--bnf-c-glow); }

@media (min-width: 48em) {
    :root { --bnf-ridge-h: 8rem; }
    .bnf-hero { padding-bottom: calc(var(--dm-sp-8) + var(--bnf-ridge-h)); }
}

/* ==========================================================================
   Figures. From Phase 11 this site is columns of readings: temperatures,
   air-quality values, vehicle counts by day, elevations and distances. A
   proportional cut sets them ragged, so digits line up.
   ========================================================================== */
table,
.dm-data__body { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   The links box on a guide page. The parent keeps a link's host name and icon
   on the label's line whenever they fit, so a short label beside a long one
   comes out a different shape, sometimes with the icon alone on a second
   line (Phase 6 review, 2026-11-24). Here every link takes the same two
   lines, the label and then the host name and icon at the right, and the
   links in a row share one height.
   ========================================================================== */
.dm-official__links li { display: flex; }
.dm-official__links .dm-source { align-content: center; }
.dm-official__links .dm-source > span:first-child { flex: 1 0 100%; }

/* ==========================================================================
   Homepage about block and the links to the pages about the site itself. It
   stays on the page's white rather than taking a tinted panel: a reserved ad
   container sits on either side of it, and a white-backed unit beside a
   tinted block is the visible rectangle Phase 23 has to avoid. A rule in the
   brand colour stands in for the panel.
   ========================================================================== */
.bnf-about { margin-bottom: 0; padding-left: var(--dm-sp-4); border-left: var(--dm-bw-thick) solid var(--dm-c-brand); }
.bnf-about > :last-child { margin-bottom: 0; }

.bnf-about__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dm-sp-2) var(--dm-sp-5);
    margin: var(--dm-sp-4) 0 0;
    padding: 0;
    list-style: none;
}
.bnf-about__links li { margin: 0; }
.bnf-about__links a {
    display: inline-flex;
    align-items: center;
    gap: var(--dm-sp-1);
    min-height: var(--dm-tap);
    font-weight: var(--dm-fw-medium);
}

@media (min-width: 48em) {
    .bnf-about { padding-left: var(--dm-sp-5); }
}
