/* =========================================================
   custom.css — MicroDOM "tech-forge" theme
   ---------------------------------------------------------
   THEMING ONLY. Requires:  mode.css  →  extras.css  →  this
   Re-skins the framework by overriding design tokens and
   adds the forge-specific decorative touches. All generic
   components live in extras.css; all colors live here.
   ========================================================= */

/* ---------------------------------------------------------
   1) TOKENS — re-skin to dark steel + molten ember
   --------------------------------------------------------- */
:root {
  /* Forge palette (theme-only extras) */
  --ember:   #ff7a18;
  --ember-2: #ffb347;
  --steel:   #5cc9d6;
  --heading: #f3f6fb;

  /* Override mode.css base tokens */
  --color-bg:          #0b0d12;
  --color-text:        #d8dee8;
  --color-muted:       #8b929e;
  --color-border:      #232a35;
  --color-accent:      var(--ember);
  --color-accent-text: #160a02;
  --max-width: 1080px;
  --radius: 12px;

  /* Override extras.css tokens for the dark theme */
  --color-surface:   #14181f;
  --color-surface-2: #1a1f28;
  --color-code-bg:   #0a0c10;
  --color-code-text: #d6deeb;
  --color-ok:   #4cd07d;
  --color-info: #5cc9d6;
  --color-warn: #ffb347;
  --color-exp:  #b388ff;
}

/* ---------------------------------------------------------
   2) GLOBAL ATMOSPHERE
   --------------------------------------------------------- */
body {
  background-image:
    radial-gradient(900px 520px at 85% -10%, rgba(255, 122, 24, 0.10), transparent 60%),
    radial-gradient(720px 520px at 0% 0%, rgba(92, 201, 214, 0.06), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--heading); letter-spacing: -0.01em; }
a:hover { color: var(--ember-2); opacity: 1; }
:focus-visible { outline-color: var(--steel); }
[µ-eyebrow] { color: var(--steel); }   /* cool kicker instead of neutral muted */

/* ---------------------------------------------------------
   3) HEADER — sticky glass bar + forge brand mark
   --------------------------------------------------------- */
body > header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, 0.72);
  backdrop-filter: blur(10px);
}
body > header b { display: inline-flex; align-items: center; gap: .55rem; color: var(--heading); letter-spacing: -.02em; }
body > header b span {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: #160a02;
  background: linear-gradient(135deg, var(--ember-2), var(--ember));
  box-shadow: 0 0 18px -4px var(--ember);
}
body > header b i { font-style: normal; font-weight: 500; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--color-muted); }
body > header nav a { padding: .4rem .7rem; border-radius: 8px; color: #aeb6c2; font-weight: 500; }
body > header nav a:hover { color: var(--heading); opacity: 1; background: var(--color-surface); }
body > header nav a[aria-current="page"] { color: var(--ember-2); background: rgba(255, 122, 24, 0.14); }
body > header label span,
body > header label span::before,
body > header label span::after { background: var(--heading); }

/* ---------------------------------------------------------
   4) CARDS — forge hover on the [µ-grid] > article base
   --------------------------------------------------------- */
[µ-grid] > article {
  background: linear-gradient(180deg, var(--color-surface), #0f1218);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
[µ-grid] > article::after {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: 0; transition: opacity .2s ease;
}
[µ-grid] > article:hover { transform: translateY(-2px); border-color: #34404f; box-shadow: 0 18px 40px -24px rgba(255, 122, 24, 0.45); }
[µ-grid] > article:hover::after { opacity: 1; }
[µ-grid] > article:hover [µ-cover] h3 { color: var(--ember-2); }

/* ---------------------------------------------------------
   5) BUTTONS — primary action gets the ember gradient
   --------------------------------------------------------- */
[µ-buttons] > button,
[µ-buttons] > a { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease; }
[µ-buttons] > button:hover,
[µ-buttons] > a:hover { border-color: var(--steel); background: var(--color-surface-2); color: var(--heading); opacity: 1; }
[µ-buttons] > :first-child {
  background: linear-gradient(135deg, var(--ember-2), var(--ember));
  color: #160a02; border-color: transparent;
  box-shadow: 0 10px 30px -12px var(--ember);
}
[µ-buttons] > :first-child:hover { color: #160a02; box-shadow: 0 12px 34px -10px var(--ember); transform: translateY(-1px); }

/* ---------------------------------------------------------
   6) FULL-BLEED THEMED SECTIONS — [µ-style="..."]
   --------------------------------------------------------- */

/* Hero */
[µ-style~="forge-hero"] {
  position: relative; overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  border-bottom: 1px solid var(--color-border);
}
[µ-style~="forge-hero"]::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(700px 420px at 72% 22%, #000, transparent 80%);
  pointer-events: none;
}
[µ-style~="forge-hero"] > div { position: relative; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--screen-padding); }
[µ-style~="forge-hero"] h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem); margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff, #c4ccd8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[µ-style~="forge-hero"] h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--ember-2), var(--ember));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[µ-style~="forge-hero"] [µ-subtitle] { color: var(--heading); }
[µ-style~="forge-hero"] [µ-lead] { white-space: pre-line; }

/* Inset feature panel */
[µ-style~="forge"] { background: linear-gradient(135deg, #0f172a 0%, #06080d 100%); border-block: 1px solid var(--color-border); }
[µ-style~="forge"] > div { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--screen-padding); }
[µ-style~="forge"] h1, [µ-style~="forge"] h2, [µ-style~="forge"] h3 { color: var(--ember-2); text-shadow: 0 0 24px rgba(255, 122, 24, 0.25); }

/* ---------------------------------------------------------
   7) CODE TOKEN COLORS — [µ-t]
   --------------------------------------------------------- */
[µ-t="k"] { color: var(--ember-2); }   /* keyword     */
[µ-t="s"] { color: #9ece6a; }          /* string      */
[µ-t="c"] { color: var(--color-muted); font-style: italic; } /* comment */
[µ-t="f"] { color: var(--steel); }     /* function    */
[µ-t="p"] { color: #8b929e; }          /* punctuation */

/* ---------------------------------------------------------
   8) FOOTER
   --------------------------------------------------------- */
body > footer b { display: inline-flex; align-items: center; gap: .5rem; color: var(--heading); }
body > footer b span {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  font-family: var(--font-mono); font-weight: 700; color: #160a02;
  background: linear-gradient(135deg, var(--ember-2), var(--ember));
}
body > footer nav a:hover { color: var(--ember-2); }
body > footer code { color: #aeb6c2; font-family: var(--font-mono); }
