/* =====================================================================
   codex · theme: Northgard Battlegrounds
   Fills the semantic colour slots and the theme slots of base.css.
   A second theme (e.g. .theme-stellaris) is a sibling file with the
   same selectors and its own values/assets. No layout lives here.
   ===================================================================== */
.theme-northgard {
  /* ---- type ---- */
  --font-display: "Grenze", "Georgia", "Times New Roman", serif;
  --tracking-display: .015em;

  /* ---- night & slate ---- */
  --color-bg: #090e15;
  --color-bg-2: #0e1520;
  --color-surface: #17202a;          /* card panel (brief: ~#1e2731, darkened for stat legibility) */
  --color-surface-raised: #1e2731;   /* hover, overlay header */
  --color-surface-inset: #0a0f15;    /* effect rows, stat chips, tables */
  --color-text: #e4eaf0;             /* 13.6:1 on surface */
  --color-text-dim: #9eacba;         /*  7.1:1 on surface */
  --color-text-faint: #8593a3;       /*  5.3:1 on surface */
  /* stat colours always sit on --color-surface-inset (chips, card
     footers, tables): lowest is Poison at 4.6:1 there. */
  --color-border: rgba(166,212,238,.15);
  --color-border-strong: rgba(166,212,238,.36);
  --color-line: rgba(166,212,238,.5);
  --color-frost: #a6d4ee;            /* hairlines, diamonds, focus glow */
  --color-frost-bright: #d4ecfb;
  --color-accent: #e8bb5f;           /* trigger labels, gold pinstripes */
  --color-accent-ink: #1b1306;
  --color-focus: #9fdcff;
  --color-buff: #86d86f;
  --color-nerf: #ff6e6e;
  --color-scrim: rgba(3,6,10,.74);

  /* ---- jewel cloth (clan banners, section banners) ---- */
  --jewel-crimson: #8f1f33;
  --jewel-indigo: #4b3591;
  --jewel-ochre: #a87c22;

  /* ---- radii: carved, not rounded ---- */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  /* ---- elevation: cold shadow, warm rim ---- */
  --shadow-2: 0 14px 30px -14px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4);
  --shadow-3: 0 40px 90px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.5);
  --glow-frost: 0 0 0 1px rgba(166,212,238,.55), 0 0 14px rgba(120,190,235,.35);

  /* =================================================================
     THEME SLOTS
     ================================================================= */
  /* panel texture: faint embossed braid (own artwork, knot-tile.svg) */
  --slot-panel-texture: url("assets/knot-tile.svg") 0 0 / 48px 64px repeat;
  /* frame / border treatment: thin light border + carved inner bevel */
  --slot-frame-border: 1px solid rgba(166,212,238,.17);
  --slot-frame-shadow: inset 0 1px 0 rgba(212,236,251,.07), inset 0 0 0 1px rgba(0,0,0,.35), inset 0 -18px 30px -24px rgba(0,0,0,.6);
  /* ornament / divider: frost hairline, diamond ends (divider.svg for export) */
  --slot-ornament: url("assets/divider.svg");
  /* banner: torn dry-brush cloth edge + gold pinstripe */
  --slot-banner-mask: url("assets/banner-mask.svg");
  --slot-banner-stripe: rgba(232,187,95,.7);
  /* icon frame: pointy hex, thick bevelled ring tinted by rarity
     (hex-ring.svg is the ring's mask; the paint comes from --r) */
  --slot-icon-shape: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --slot-icon-ratio: .9;
  --slot-icon-frame: url("assets/hex-ring-outer.svg");        /* hex-ring-outer.svg */
  --slot-icon-frame-inner: url("assets/hex-ring-inner.svg");  /* hex-ring-inner.svg */
  /* rarity frame colours (shop hexes): muted band + bright rim; also used for card edges and hover glow */
  --rarity-common-band: #43484f;    --rarity-common-rim: #c3c9d1;
  --rarity-uncommon-band: #24543f;  --rarity-uncommon-rim: #5ed6a6;
  --rarity-rare-band: #24477a;      --rarity-rare-rim: #73b4ff;
  --rarity-epic-band: #4f3279;      --rarity-epic-rim: #ad7ff0;
  --rarity-legendary-band: #7c4f17; --rarity-legendary-rim: #ffc566;
  --rarity-clan-band: #6a1f2b;      --rarity-clan-rim: #ff7d8c;
  --rarity-special-band: #1d4f52;   --rarity-special-rim: #63ddd6;
  /* Fate card tiers (card-shaped frames, same band/rim language) */
  --tier-base-band: #43484f;   --tier-base-rim: #c3c9d1;
  --tier-bronze-band: #6a3f1f; --tier-bronze-rim: #e0975a;
  --tier-silver-band: #4b5763; --tier-silver-rim: #e4ecf3;
  --tier-gold-band: #7a5810;   --tier-gold-rim: #ffd56a;
  --slot-card-frame-base:   url("assets/card-frame-base.svg");
  --slot-card-frame-bronze: url("assets/card-frame-bronze.svg");
  --slot-card-frame-silver: url("assets/card-frame-silver.svg");
  --slot-card-frame-gold:   url("assets/card-frame-gold.svg");
  /* finished frames per rarity, modelled on the in-game shop hexes */
  --slot-icon-frame-common:    url("assets/hex-frame-common.svg");
  --slot-icon-frame-uncommon:  url("assets/hex-frame-uncommon.svg");
  --slot-icon-frame-rare:      url("assets/hex-frame-rare.svg");
  --slot-icon-frame-epic:      url("assets/hex-frame-epic.svg");
  --slot-icon-frame-legendary: url("assets/hex-frame-legendary.svg");
  --slot-icon-frame-clan:      url("assets/hex-frame-clan.svg");
  --slot-icon-frame-special:   url("assets/hex-frame-special.svg");
  /* background atmosphere, own art: night wash + warm centre glow */
  --slot-atmosphere:
    radial-gradient(60% 38% at 50% 0%, rgba(120,170,215,.16), transparent 70%),
    radial-gradient(40% 26% at 50% 34%, rgba(255,170,90,.07), transparent 70%),
    url("assets/atmosphere-night.png") center top / 100% auto no-repeat,
    linear-gradient(180deg, #0c1420 0%, #090e15 46%, #070b11 100%);
  --slot-grain: url("assets/grain.png") 0 0 / 256px 256px repeat;
  --slot-keyart: none;
}

/* icon frame paint: evaluated on each icon so it picks up the rarity tint */
.theme-northgard .hexicon {
  /* outer band: the rarity colour itself, a little light at the top */
  --slot-icon-frame-paint:
    linear-gradient(180deg,
      color-mix(in srgb, var(--frame-tint) 82%, #fff) 0%,
      var(--frame-tint) 35%,
      color-mix(in srgb, var(--frame-tint) 82%, #000) 100%);
  /* inner rim: a clearly brighter tint of the same colour */
  --slot-icon-frame-inner-paint:
    linear-gradient(180deg,
      color-mix(in srgb, var(--frame-tint) 40%, #fff) 0%,
      color-mix(in srgb, var(--frame-tint) 58%, #fff) 100%);
}

/* ---- OPT-IN: game key art. One slot, no layout change. ---------------
   Switch on later by adding .with-keyart to the root (or by setting
   --slot-keyart). Placeholder: press-kit key art 01. */
.theme-northgard.with-keyart {
  --slot-keyart: url("assets/keyart.jpg");
}
