/* =============================================================
   THEME — ASPA Light
   The only file that knows what colour anything is.

   Brand palette
   -------------
   #FFFFFF  sterile white     #8A0B00  oxblood (deep brand)
   #F5EDE0  bone (page base)  #CD3022  vermilion (lit face)
   #D86961  rose (highlight)  #B35A53  clay
   #999999  steel             #CCCCCC  silver      #000000  ink

   The bevel ramps below were sampled from the logo artwork: a deep
   #40–#70 red body, rose highlights at the lit edges, and #90–#F0
   neutrals on the scalpel. A few values (#3E0300, #5A0300, #2B0100)
   are oxblood mixed toward ink — the shaded faces of the moulding.

   To add a theme: copy this file, keep every custom property name,
   change only the values. No HTML or base.css edits needed.
   ============================================================= */

:root {
  color-scheme: light;

  /* --- Raw palette --- */
  --c-white:     #FFFFFF;
  --c-bone:      #F5EDE0;
  --c-oxblood:   #8A0B00;
  --c-vermilion: #CD3022;
  --c-rose:      #D86961;
  --c-clay:      #B35A53;
  --c-steel:     #999999;
  --c-silver:    #CCCCCC;
  --c-ink:       #000000;

  /* --- Surfaces --- */
  --bg-page:    var(--c-bone);
  --bg-surface: var(--c-white);
  --bg-inset:   #FAF6EE;          /* hover tint only — never a section fill */
  --bg-invert:  #14100E;          /* reserved: dark surfaces in a future theme */
  --bg-header:  rgba(245, 237, 224, 0.92);

  /* --- Text --- */
  --text-primary:        #241D1A;
  --text-secondary:      #4A403C;
  --text-heading:        #1C1614;
  --text-muted:          var(--c-steel);
  --text-brand:          var(--c-oxblood);
  --text-error:          var(--c-vermilion);

  --text-on-dark:        var(--c-white);
  --text-on-dark-soft:   rgba(245, 237, 224, 0.80);
  --text-on-dark-muted:  rgba(245, 237, 224, 0.60);
  --text-on-dark-accent: var(--c-rose);

  /* --- Lines --- */
  --line-hairline: var(--c-silver);
  --line-strong:   var(--c-steel);
  --line-on-dark:  rgba(245, 237, 224, 0.22);

  /* Surgical-steel rule for the ornament, fading at both ends. */
  --rule-steel: linear-gradient(to right,
      rgba(153,153,153,0) 0%, var(--c-steel) 28%, var(--c-silver) 50%, var(--c-steel) 72%, rgba(153,153,153,0) 100%);
  --rule-steel-on-dark: linear-gradient(to right,
      rgba(204,204,204,0) 0%, var(--c-steel) 32%, var(--c-silver) 50%, var(--c-steel) 68%, rgba(204,204,204,0) 100%);

  /* --- Brand --- */
  --brand-primary: var(--c-vermilion);

  /* --- The rail ribbon ----------------------------------------
     Five passes of the same path build the bevel: a shade behind, the
     oxblood body, the lit face, a rose highlight and a white glint at
     the outer edge. Because they are offsets of one curve, the lighting
     follows the wave instead of fighting it. Sampled from the logo. */
  --rail-shade: #3E0300;                 /* oxblood mixed toward ink */
  --rail-deep:  var(--c-oxblood);
  --rail-face:  var(--c-vermilion);
  --rail-hi:    var(--c-rose);
  --rail-glint: #FFFFFF;

  /* The straight run. Hard stops, because the curl's stacked passes make
     hard bands too — a smooth ramp here would not match at the join.
     0-7 shade | 7-13 glint | 13-30 highlight | 30-64 face | 64-92 deep | 92-100 shade */
  --rail-band: linear-gradient(to right,
      var(--rail-shade) 0% 7%,
      var(--rail-glint) 7% 13%,
      var(--rail-hi)    13% 30%,
      var(--rail-face)  30% 64%,
      var(--rail-deep)  64% 92%,
      var(--rail-shade) 92% 100%);

  --bevel-glint:   rgba(255, 255, 255, 0.55);
  --bevel-lozenge: linear-gradient(135deg, var(--c-rose) 0%, var(--c-vermilion) 45%, var(--c-oxblood) 100%);

  /* --- Depth --- */
  --nav-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.45);

  /* --- Controls --- */
  --btn-primary-bg: linear-gradient(to bottom,
      var(--c-vermilion) 0%, #A01206 52%, var(--c-oxblood) 100%);
  --btn-primary-text: var(--c-white);
  --btn-primary-text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  --btn-primary-bevel:
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(0, 0, 0, 0.5),
      0 1px 2px rgba(0, 0, 0, 0.25);
  --btn-primary-bevel-active: inset 0 1px 3px rgba(0, 0, 0, 0.45);

  --btn-ghost-border:   rgba(245, 237, 224, 0.45);
  --btn-ghost-bg-hover: rgba(245, 237, 224, 0.12);

  --input-bg:    var(--c-white);
  --input-inset: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  --focus-ring:  var(--c-vermilion);
  --focus-halo:  rgba(205, 48, 34, 0.18);

  --select-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23999999' d='M0 0h12L6 8z'/%3E%3C/svg%3E");

  /* --- Hero wordmark ---
     The bevel from the logo's lettering: a bright edge at the top of the
     glyph falling to near-black at the baseline. Silver is the same ramp
     run through the scalpel's neutrals. */
  --mark-red: linear-gradient(180deg,
      #E4837B 0%, var(--c-rose) 12%, var(--c-vermilion) 34%,
      var(--c-oxblood) 64%, #3E0300 84%, #170402 100%);
  --mark-silver: linear-gradient(180deg,
      #FFFFFF 0%, #E8E8E8 14%, var(--c-silver) 36%,
      var(--c-steel) 62%, #4A4A4A 84%, #15100E 100%);

  /* Light catches the top edge, a hard shade sits under it, then a soft
     cast shadow lifts the whole thing off the image. */
  --mark-emboss:
      drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.30))
      drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55))
      drop-shadow(0 4px 7px rgba(0, 0, 0, 0.65));
  --mark-emboss-sm:
      drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.28))
      drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6))
      drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));

  /* --- Hero --- */
  --hero-image: url("/assets/images/hero-bg.png");
  /* Keeps the left third dark enough for the headline, and stays mostly
     neutral: a strong red wash over the lamp bloom turns the whole frame pink. */
  --hero-veil: linear-gradient(
      100deg,
      rgba(8, 6, 6, 0.93) 0%,
      rgba(8, 6, 6, 0.80) 38%,
      rgba(8, 6, 6, 0.55) 62%,
      rgba(70, 8, 4, 0.42) 88%,
      rgba(8, 6, 6, 0.60) 100%);
  --hero-strip-bg: rgba(10, 8, 7, 0.58);
  --hero-title-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);

  /* --- Filigree corner hardware ---
     Steel outside, ink middle, red inside: the logo's three materials. */
  --fil-outer: var(--c-steel);
  --fil-mid:   var(--c-ink);
  --fil-inner: var(--c-vermilion);

  --emboss-hi: rgba(255, 255, 255, 0.55);
  --emboss-lo: rgba(0, 0, 0, 0.45);

  /* The logo artwork is drawn for a light ground, so it needs no help here.
     The dark theme overrides this. */
  --logo-filter: none;

  /* --- Coverage cell ---
     Scrim over the blurred map image. Slightly heavier in the dark theme
     so the cell does not glow brighter than the page around it. */
  --coverage-image: url("/assets/images/coverage-area.png");
  --coverage-scrim: linear-gradient(180deg, rgba(10,8,7,0.42) 0%, rgba(10,8,7,0.58) 100%);
}
