/* ============================================================
   BASHCOIN — design tokens
   Direction: a shell. The coin is called Bashcoin, so the product is
   dressed as the terminal it is named after — phosphor on black, one
   monospace family, CRT grain. Three layers: primitive -> semantic ->
   component; components never touch a raw hex.
   ============================================================ */

:root{
  /* ---------------------------------------------------------
     1. PRIMITIVES
     --------------------------------------------------------- */
  --void:#050806;          /* the screen when it is off */
  --void-2:#071009;
  --void-3:#0B1711;

  --phos-100:#D6F5E3;      /* phosphor, brightest */
  --phos-300:#93C7AC;
  --phos-500:#4FE38F;      /* the live green */
  --phos-700:#37B873;
  --phos-900:#1C6B43;

  --amber-300:#FFCF7A;     /* money is amber, the other classic CRT */
  --amber-500:#FFB347;
  --amber-700:#C27C14;

  --wire-400:#5BD9F5;      /* info, links, network */
  --flare-400:#FF5FA2;     /* attention */
  --alert-400:#FF6B6B;     /* errors, losses */
  --plasma-400:#A78BFA;    /* secondary accent */

  /* ---------------------------------------------------------
     2. SEMANTIC
     --------------------------------------------------------- */
  --bg-0:var(--void);
  --bg-1:var(--void-2);
  --bg-2:var(--void-3);

  /* panels are a wash of phosphor over the void, never grey */
  --surface:rgba(120,255,190,.055);
  --surface-2:rgba(120,255,190,.10);
  --surface-strong:rgba(7,16,9,.96);

  --stroke:rgba(79,227,143,.20);          /* decorative rules */
  --stroke-strong:rgba(79,227,143,.34);
  --stroke-control:rgba(120,255,190,.46);  /* control boundaries, 3.5:1 */

  /* verified on --surface: 15.9 / 9.7 / 5.8 */
  --text:var(--phos-100);
  --text-2:var(--phos-300);
  --text-3:#6E9A84;

  --brand:var(--amber-500);       /* BASH, prices, the currency itself */
  --brand-strong:var(--amber-700);
  --on-brand:#1A1000;
  --primary:var(--phos-500);      /* the shell: prompts, cursor, active state */
  --primary-text:var(--phos-500);
  --on-primary:#032012;
  --success:var(--phos-500);
  --on-success:#032012;
  --danger:var(--alert-400);
  --attention:var(--flare-400);
  --info:var(--wire-400);
  --ring:var(--phos-500);

  --glow-phos:0 0 12px rgba(79,227,143,.55);
  --glow-amber:0 0 12px rgba(255,179,71,.5);

  --grad-gold:linear-gradient(180deg,var(--amber-300),var(--amber-500) 55%,var(--amber-700));
  --grad-violet:linear-gradient(180deg,#C4B1FF,#7C5CF0);
  --grad-cyan:linear-gradient(180deg,#9DEBFF,#2FA9C9);
  --grad-mint:linear-gradient(180deg,#8CFFC4,var(--phos-700));
  --grad-rose:linear-gradient(180deg,#FF9BC4,#D92B72);

  /* ---------------------------------------------------------
     3. TYPE — one monospace family, because this is a terminal.
     Sizes land on a 1ch-friendly scale: 11 / 12 / 13 / 15 / 17 / 20 / 26 / 32
     --------------------------------------------------------- */
  --font-display:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --font-ui:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --font-num:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;

  --fs-badge:11px;
  --fs-label:12px;
  --fs-sub:13px;
  --fs-body:15px;
  --fs-lead:17px;
  --fs-h3:20px;
  --fs-h2:26px;
  --fs-h1:32px;

  --lh-tight:1.2;
  --lh-snug:1.4;
  --lh-body:1.6;          /* monospace needs more air than a sans */
  --tracking:.02em;

  /* ---------------------------------------------------------
     4. SPACING — 4pt rhythm
     --------------------------------------------------------- */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px;
  --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px;
  --gap:10px;
  --pad:14px;

  /* ---------------------------------------------------------
     5. SIZE
     --------------------------------------------------------- */
  --tap:44px;
  --tap-lg:52px;
  --icon-sm:16px; --icon-md:20px; --icon-lg:24px;
  --tabbar-h:72px;

  /* ---------------------------------------------------------
     6. SHAPE — terminals are rectangular. Radii are small on purpose;
        the rounded-glass look is exactly what we are getting away from.
     --------------------------------------------------------- */
  --r-sm:3px; --r-md:4px; --r-lg:5px; --r-xl:6px; --r-pill:3px;
  --sh-1:0 1px 0 rgba(0,0,0,.6);
  --sh-2:0 6px 24px rgba(0,0,0,.6);
  --sh-3:0 20px 60px rgba(0,0,0,.8);

  /* ---------------------------------------------------------
     7. MOTION — a terminal snaps. Exits run at ~65% of entrances.
     --------------------------------------------------------- */
  --e-out:cubic-bezier(.2,.9,.3,1);
  --e-in:cubic-bezier(.5,0,1,1);
  --e-spring:cubic-bezier(.3,1.5,.6,1);
  --e-step:steps(8,end);
  --t-press:90ms;
  --t-fast:140ms;
  --t:220ms;
  --t-enter:320ms;
  --t-exit:200ms;

  /* legacy aliases */
  --t-slow:var(--t-enter);
  --gold:var(--brand); --gold-2:var(--brand-strong); --gold-3:var(--amber-700);
  --violet:var(--plasma-400); --violet-2:#7C5CF0;
  --cyan:var(--info); --mint:var(--success); --rose:var(--attention); --red:var(--danger);
  --gold-100:var(--amber-300); --gold-300:var(--amber-300); --gold-500:var(--amber-500);
  --gold-600:var(--amber-500); --gold-800:var(--amber-700); --gold-900:var(--amber-700);
  --violet-300:#C4B1FF; --violet-400:var(--plasma-400); --violet-500:var(--plasma-400);
  --violet-600:#7C5CF0; --violet-800:#4C1D95;
  --cyan-400:var(--wire-400); --mint-400:var(--phos-500);
  --rose-400:var(--flare-400); --red-400:var(--alert-400);
  --ink-0:var(--void); --ink-1:var(--void-2); --ink-2:var(--void-3); --ink-3:var(--void-3);
  --paper:var(--phos-100);
  --glow-gold:var(--glow-amber); --glow-violet:0 0 12px rgba(167,139,250,.5);

  /* CRT */
  --scanline:rgba(0,0,0,.34);
  --scanline-size:3px;

  --sat:env(safe-area-inset-top,0px);
  --sab:env(safe-area-inset-bottom,0px);
}

/* A terminal has no light mode worth the name; "light" becomes paper-white
   with ink-dark phosphor so the theme switch still does something sane. */
:root[data-theme="light"]{
  --bg-0:#E8EDE9; --bg-1:#DFE6E1; --bg-2:#D5DED8;
  --surface:rgba(5,40,20,.06);
  --surface-2:rgba(5,40,20,.11);
  --surface-strong:rgba(255,255,255,.96);
  --stroke:rgba(5,60,32,.22);
  --stroke-strong:rgba(5,60,32,.36);
  --stroke-control:rgba(5,60,32,.5);
  --text:#06170E; --text-2:#20543A; --text-3:#3D6B52;
  --primary:#0C7A45; --primary-text:#0C7A45; --success:#0C7A45;
  --brand:#8A5A00; --on-brand:#FFF6E0;
  --ring:#0C7A45;
  --scanline:rgba(0,0,0,.05);
  --sh-2:0 6px 24px rgba(20,50,35,.16);
  --sh-3:0 20px 60px rgba(20,50,35,.2);
}
