/* =========================================================================
   BRAND  -  every building's colours, in one file.

   HOW TO ADD A SCHOOL
   -------------------
   Copy any block below, change the slug and the values. That is the whole
   job - no layout, no markup, no new stylesheet, no build step.

       [data-brand="pine-level"] {
           --brand:     #1b4388;         the school's main colour
           --brand-rgb: 27,67,136;       SAME colour as R,G,B - see note below
           --brand-dk:  #14336a;         about 20% darker; paints hovers
           --accent:    #5c646e;         second colour; the nav keyline
       }

   Only --brand and --brand-rgb are required. Everything else falls back:
   --brand-dk and --accent to the brand itself, --on-brand to white,
   --brand-ink to --brand. Add a line only when the default is wrong.

   THE TWO THAT USUALLY ARE WRONG
       --on-brand   text sitting ON the colour. White by default; a pale
                    brand (Billingsley's gold) needs dark ink instead.
       --brand-ink  the brand used AS TEXT on a light surface. Billingsley's
                    gold is 1.74:1 on white, so it declares a darker ink.
                    Backgrounds keep using --brand; only type uses this.
   Check both against white and against the colour before shipping a school.

   The icon strip is painted with --brand and gets a 6px keyline of --accent
   above it, so --strip-ink follows --on-brand and is correct by default.
   Only the district overrides the strip itself, to Silver, per the mockup.

   (CSS comments do not nest. The annotations above are deliberately plain
   text: opening a second comment inside this one ends the block early and
   silently kills every rule that follows, which is exactly what happened
   the first time this file was written.)

   Then set data-brand="pine-level" on <body>. In the live site that comes
   from the AppSectionID; in these mockups it is typed into the HTML.

   WHY --brand-rgb EXISTS
   ----------------------
   Two bands need the brand colour at partial opacity (the news-card overlay
   and the stats band). CSS cannot add transparency to a hex variable without
   color-mix(), which is not safe for the browsers a school district's
   families actually use. Listing the same colour once as R,G,B lets us write
   rgba(var(--brand-rgb), .88) and works everywhere, forever.
   Keep the two in sync - they are the same colour written twice.

   CONTRAST
   --------
   ACS's own brand guide warns that its print palette "will pose accessibility
   challenges for use in digital applications". Checked: white on District Red
   is 5.14:1 (passes AA). Red text on black is 4.09:1 and FAILS for body text,
   which is why the footer keeps red as a background with white on it, never
   red text on the dark block.
   ========================================================================= */

/* ------------------------------------------------------------------ fonts
   Impact and Century Gothic are the print brand and neither is a web font.
   Oswald carries Impact's tall condensed proportions in the headlines, which
   is what gives these pages their character; Inter is a neutral body face
   that stays legible at 15px on a phone. Swap here and the whole site follows. */
/* The Google Fonts request that lived here as an @import is now a <link> in
   Content.aspx and protected/ProtectedPage.master, alongside the preconnects.
   An @import blocks rendering until the CSS itself has parsed; the <link>
   starts the font fetch with the rest of the head. Families are unchanged:
   Oswald 400-700, Inter 400-700, Kaushan Script. If you add a weight here,
   add it there too - this file no longer requests anything by itself. */

:root {
    --font-head: "Oswald", "Arial Narrow", Impact, sans-serif;
    --font-body: "Inter", "Century Gothic", "Segoe UI", system-ui, sans-serif;
    /* Her slides set "our vision", "our mission" and several school mottos in a
       casual script. Kaushan Script is the closest free web face to the one in
       the Canva artwork; swap it here if she names the real one. */
    --font-script: "Kaushan Script", "Brush Script MT", cursive;

    /* neutrals - shared by every building */
    --ink:        #1a1a1a;
    --muted:      #5c5c5c;
    --surface:    #ffffff;
    --surface-2:  #eef0f1;
    --line:       #d8dadb;

    /* events / footer neutrals - no brand involved, so :root is fine */
    --motto:     #e3e5e6;
    --ev-bg:     #f2f3f4;
    --ev-border: transparent;
    --foot-bg:   #3b393c;
    --foot-ink:  #ffffff;
    --foot-head: #ffffff;
    /* version C ground + surfaces */
    --page-bg:   #f4f5f6;
    --page-band: #f0ece3;      /* interior page header band, from her calendar slide */
    --panel-bg:  #26262a;
    --panel-ink: #ffffff;

    --topbar-bg:  #3b393c;      /* Dark Grey, straight from the ACS palette */
    --topbar-ink: #ffffff;

    --cta-ov:    linear-gradient(180deg,
                   rgba(18,18,20,.50) 0%,
                   rgba(18,18,20,.78) 55%,
                   rgba(18,18,20,.86) 100%);
    --on-cta:    #ffffff;
    --btn-bg:    #ffffff;

    /* enhanced layer (css/enhance.css). Neutrals only - nothing here is a
       school colour, so :root is the right place for them.
       --deep is the CTA band behind "Why Not Us": District Black lifted a
       touch toward the Dark Grey, so the photo can fade into it. --tex-line
       is the hairline used by the faint background textures; keep it under
       .06 alpha or the texture starts to read as pattern rather than paper. */
    --deep:      #1b1a1d;
    --deep-rgb:  27,26,29;
    --tex-line:  rgba(17,17,19,.05);
    --ghost:     #dcdedf;      /* the big outline type behind events */
}

/* =========================================================================
   DERIVED DEFAULTS - must live on [data-brand], NOT on :root.

   A custom property is resolved where it is DECLARED, not where it is used.
   --brand is declared on <body data-brand="...">, so a rule like
   "--strip-bg: var(--brand)" written inside :root resolves against a :root
   that has no --brand, yields nothing, and silently paints transparent.
   That is not a typo you can see - the strip simply disappears, and it only
   showed up here because the district happens to override --strip-bg while
   Marbury does not.

   Declaring them here means they resolve on the same element that carries
   --brand. Specificity matches the per-school blocks below, so those win on
   source order - keep this block ABOVE them.
   ========================================================================= */
[data-brand] {
    --on-brand:      #ffffff;
    --brand-on-dark: var(--brand);
    --focus:         var(--brand);
    --mast-name-ink: var(--ink);

    /* Second brand colour. Defaults to the primary, so a school with only one
       colour needs no extra lines. It paints one thing: the 6px keyline above
       the icon strip.

       It used to be the differentiator for the seven Prattville schools, which
       share one maroon. The district asked for the opposite on 14 Oct 2026 -
       "would love a consistent color here, the secondary colors are really
       throwing me" - so all seven now carry the same gold and are told apart
       by name and mark, not by a keyline nobody reads as a school. */
    --accent:      var(--brand);

    /* Brand colour for TEXT on a light surface. Identical to --brand for
       twelve of the fourteen, but Billingsley's gold is 1.74:1 on white -
       unreadable - so it needs a darker ink that still reads as the same
       colour. Backgrounds keep using --brand; only type uses this. */
    --brand-ink:   var(--brand);

    /* --brand-ink one step darker. Only exists so the legacy aliases below
       have a hover colour that is still readable under white text. For
       thirteen schools it is just --brand-dk; Billingsley overrides it,
       because its --brand-dk is a LIGHTER gold (#d2940e) that white text
       fails against, while every other school's is darker than its brand. */
    --brand-ink-dk: var(--brand-dk);

    /* ---------------------------------------------------------------- 
       LEGACY TOKEN ALIASES

       Styles/Custom.css holds the rich-text components the editor's Custom
       Components toolbar inserts - ih-card, ih-callout, ih-link-list and the
       rest. Those rules came from the Indian Hill template and are written
       against that template's palette names, none of which exist here.

       Aliasing them is deliberate. The alternative was rewriting ~500 lines
       of component CSS into --brand terms, once per tenant, and then keeping
       fourteen copies of it in step. Declared HERE rather than in Custom.css
       for the reason the top of this file explains at length: a custom
       property resolves against the element it is DECLARED on, so
       "--red: var(--brand)" written in :root resolves against a :root with no
       --brand and silently paints nothing.

       --red and --link point at --brand-ink, not --brand, because the
       components use them for type and for solid buttons with white text.
       Billingsley's gold is 1.74:1 on white; its --brand-ink is not.
       ---------------------------------------------------------------- */
    --red:         var(--brand-ink);
    --dark-red:    var(--brand-ink-dk);
    --link:        var(--brand-ink);
    --link-hover:  var(--brand-ink-dk);
    --gray:        var(--muted);
    --black:       var(--ink);
    --font:        var(--font-body);

    /* Fallback colours. --brand, --brand-rgb and --brand-dk are otherwise set
       ONLY inside the per-school blocks, so a data-brand value with no block -
       a fourteenth school, a typo - resolved to nothing and painted the whole
       page transparent with no error anywhere. These give an unknown slug the
       district's own colours instead. Same specificity as the blocks below,
       so source order lets every real school override them. */
    --brand:     #d61f1f;
    --brand-rgb: 214,31,31;
    --brand-dk:  #a71818;

    /* icon strip - the school's own colour, with the accent as the keyline
       above it. The district overrides the strip to Silver, per the mockup. */
    --strip-bg:      var(--brand);
    --strip-keyline: var(--accent);
    --strip-ink:   var(--on-brand);
    /* The hover underline under each icon. It sits ON the strip, while
       --strip-keyline sits above it against the white masthead - opposite
       grounds, so a colour that reads on one can disappear on the other.
       Defaults to the keyline, which is what every school used when there
       was only one token; Marbury and Pine Level override it because their
       keyline is now a dark grey that would be invisible on their blue. */
    --strip-marker: var(--strip-keyline);
    --strip-rule:  rgba(255,255,255,.28);
    --strip-hover: rgba(0,0,0,.16);

    --brand-ov: rgba(var(--brand-rgb), .88);   /* news-card overlay */
    --nums-ov:  rgba(var(--brand-rgb), .97);   /* stats band - photo is texture, not subject */
    --on-nums:  #ffffff;
    --btn-ink:  var(--ink);
    --chip-bg:  rgba(var(--brand-rgb), .10);   /* pale brand tint for icon chips */
    /* Same tint under its older name. The staff page's phone/email chips ask
       for --brand-soft and nothing ever declared it, so they painted
       transparent - white glyphs on white. Aliased rather than renamed so
       both spellings keep working. */
    --brand-soft: var(--chip-bg);

    /* enhanced layer (css/enhance.css). These assume white type on a
       dark-enough brand, which is true of twelve of the fourteen; Billingsley
       overrides them below.
       --fx-nums-blend / -veil  how the brand colour meets the numbers-band
                                photo: multiplied in (darkens it) at full
                                strength, so white type never sits on
                                anything lighter than --brand itself
       --fx-band-b-rgb          the darker of the two hero bands
       --fx-on-nums-line/-soft  hairlines and icon discs on the numbers band
       --fx-wm-ink              the giant watermark behind the numbers */
    --fx-nums-blend:   multiply;
    --fx-nums-veil:    1;
    --fx-band-b-rgb:   var(--brand-rgb);
    --fx-on-nums-line: rgba(255,255,255,.26);
    --fx-on-nums-soft: rgba(255,255,255,.12);
    --fx-wm-ink:       rgba(255,255,255,.08);
    --fx-on-brand-line: rgba(255,255,255,.34);  /* rules drawn on a --brand ground */
}

/* =======================================================================
   DISTRICT  -  Autauga County Schools
   Official palette, from 7ACS_branding_guidlines.pdf p10:
   District Red #d61f1f | District Black #000000 | Dark Grey #3b393c
   | Silver #cbcccc | White #ffffff
   ======================================================================= */
[data-brand="district"] {
    --brand:     #d61f1f;
    --brand-rgb: 214,31,31;
    --brand-dk:  #a71818;
    --on-brand:  #ffffff;

    /* The district strip is Silver with black icons, not red - see the
       mockup. Schools invert this and use their own colour. */
    --strip-bg:      #cbcccc;
    --strip-keyline: var(--brand);
    --strip-ink:   #000000;
    --strip-rule:  rgba(0,0,0,.16);
    --strip-hover: rgba(0,0,0,.09);
}

/* =========================================================================
   THE THIRTEEN SCHOOLS

   Colours below are taken from the artwork the district actually sent, in
   this order of authority:
     1. the school's own brand-guide PDF (Logos zip, Sept 2026)
     2. the dominant colour sampled from its primary logo mark
     3. the designer's mockup, where neither of the above exists

   SEVEN SCHOOLS SHARE ONE MAROON. Daniel Pratt, Prattville Elementary,
   Prattville High, Prattville Intermediate, Prattville Junior High,
   Prattville Kindergarten and Prattville Primary are all #862633 - that is
   not a mistake in this file, it is the Prattville brand and every one of
   those logos samples to it.

   THEY NOW SHARE ONE GOLD TOO. Their guides each name a different second
   colour and this file used to carry all seven - gold, grey, green, blue,
   peach, yellow, tan. The district's 14 Oct 2026 feedback: "Prattville
   Schools - would love a consistent color here. The secondary colors are
   really throwing me." All seven are #D19000, which is Prattville High's
   own brand gold and one of the three in Daniel Pratt's guide. That change
   also answered "Daniel Pratt - don't love the light yellow", which was the
   peach #FCD299 this file had picked for it.

   Do not re-split them without asking the district first.
   ========================================================================= */

/* --- Marbury ------------------------------------------------------------
   Both Marbury folders in the Logos zip arrived EMPTY, so these two ran on a
   blue sampled from the designer's mockup (#003595) until the district sent
   the bulldog M on 2026-10-02. #004C9C is sampled from that artwork - 16,500
   pixels of it - and replaces the guess. Both schools share the one mark.

   Their keyline was silver #D0D4DB. The district, 14 Oct 2026: "Marbury High
   - darker gray for transition color", same for Marbury Middle, and on the
   screenshot "would love to see a darker gray as the transition line between
   the white and the blue". #5C646E is that line. The silver stays as
   --strip-marker, which is the hover underline sitting ON the blue. */
[data-brand="marbury-high"] {
    --brand:     #004c9c;
    --brand-rgb: 0,76,156;
    --brand-dk:  #003a77;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

[data-brand="marbury-middle"] {
    --brand:     #004c9c;
    --brand-rgb: 0,76,156;
    --brand-dk:  #003a77;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

/* --- County-wide buildings --------------------------------------------- */

/* Autauga County Technology Center. Its Varsity Brands guide approves only
   black and white for the logotype, so the county palette carries the page. */
[data-brand="tech-center"] {
    --brand:     #d61f1f;
    --brand-rgb: 214,31,31;
    --brand-dk:  #a71818;
    --accent:     #3b393c;
}

/* Autauga Virtual Academy - navy + red, both named in its brand guide and
   both confirmed against the logo (#013C80 / #AB2D37). */
[data-brand="virtual-academy"] {
    --brand:     #013c80;
    --brand-rgb: 1,60,128;
    --brand-dk:  #012c5e;
    --accent:     #ab2d37;
}

/* --- Rural K-12 -------------------------------------------------------- */

/* Billingsley School - gold, #FFB71B in the guide, #FAB427 in the paw mark.
   Dark ink on gold: white would be 1.7:1 and unreadable. */
[data-brand="billingsley"] {
    --brand:     #ffb71b;
    --brand-rgb: 255,183,27;
    --brand-dk:  #d2940e;
    --on-brand:  #14130f;
    --brand-ink: #7a5c00;
    /* Darker still, for the hover state of a solid ih- button. --brand-dk is
       #d2940e here - LIGHTER than --brand-ink - so inheriting it would make a
       button get less readable on hover, which is the wrong direction. */
    --brand-ink-dk: #5a4400;
    --accent:     #1d1d1b;
    /* Her slide 29 runs the icon strip BLACK with gold icons and a gold
       keyline, not gold with dark icons. Billingsley is the one school whose
       strip is not painted with its primary colour. Gold on the black is
       9.68:1. */
    --strip-bg:      #1d1d1b;
    --strip-ink:     #ffb71b;
    --strip-keyline: #ffb71b;
    --strip-rule:  rgba(255,255,255,.20);
    --strip-hover: rgba(255,255,255,.10);
    --on-nums:   #14130f;
    --mast-name-ink: var(--ink);
    --brand-on-dark: #ffc746;
    /* Dark ink on the numbers band means the band must stay LIGHT: multiplying
       gold into the photo would turn it brown under black type. Lay the gold
       over the photo instead, nearly opaque. The darker hero band takes the
       strip's black, so the hero reads black-and-gold like her slide 29. */
    --fx-nums-blend:   normal;
    --fx-nums-veil:    .9;
    --fx-band-b-rgb:   29,29,27;
    --fx-on-nums-line: rgba(20,19,15,.22);
    --fx-on-nums-soft: rgba(255,255,255,.3);
    --fx-wm-ink:       rgba(20,19,15,.07);
    --fx-on-brand-line: rgba(20,19,15,.24);
}

/* Pine Level Elementary - BLUE, not green. The circle mark samples #1B4388
   across 11,500 pixels. An earlier draft of this file had it green, which
   came from the old website rather than the brand artwork.

   Its keyline was gold #C9A227 - "Pine Level Elementary - hate the gold",
   14 Oct 2026. It takes the same slate as the two Marbury schools, so the
   blue schools read as one family and the gold belongs to Prattville. */
[data-brand="pine-level"] {
    --brand:     #1b4388;
    --brand-rgb: 27,67,136;
    --brand-dk:  #14336a;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

/* --- The Prattville maroon family -------------------------------------- */
/* Keyline was the family gold #D19000. The district, Nov 2026 ("Website
   Tweaks"): "Make all yellow a gray". They take the same slate as Marbury and
   Pine Level, and the silver hover marker that sits ON the strip. */

[data-brand="prattville-high"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

[data-brand="prattville-junior-high"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

[data-brand="prattville-intermediate"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

[data-brand="prattville-elementary"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

/* Daniel Pratt's guide offers rose #B04A5A, peach #FCD299 and gold #D19000.
   This file ran on the peach, and the district did not like it - "Daniel
   Pratt - don't love the light yellow", 14 Oct 2026. It takes the gold,
   which its own guide names and which is now the whole family's. (The rose
   was never an option: as a keyline on the maroon strip it is dE 14.9, i.e.
   you cannot see it.) */
[data-brand="daniel-pratt"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

/* Kindergarten and Primary carried the two palest accents in the set
   (#FEDB00 and #E0A866). Both now take the family gold. */
[data-brand="prattville-kindergarten"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}

[data-brand="prattville-primary"] {
    --brand:     #862633;
    --brand-rgb: 134,38,51;
    --brand-dk:  #661d27;
    --accent:     #5c646e;
    --strip-marker: #d0d4db;
}
