/* ============================================================
   BotForge Studios — design tokens
   Forge (blacksmith/ember) meets Circuit (bot/tech)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root{
  --bg:        #120F0D;
  --bg-alt:    #1B1613;
  --bg-panel:  #201A16;
  --border:    #3A2E26;
  --border-soft: #2A211C;

  --ember:      #FF7A33;
  --ember-dim:  #C7501A;
  --gold:       #FFC46B;
  --circuit:    #2FE8C5;
  --circuit-dim:#158F79;

  --text:      #F3EDE3;
  --text-dim:  #B9AFA2;
  --text-faint:#7A6F63;

  --danger: #FF5C5C;
  --success:#4EDE8E;

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --container: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* subtle forge-grain texture over everything */
body::before{
  content:'';
  position:fixed; inset:0;
  pointer-events:none;
  z-index:2;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,122,51,0.045), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(47,232,197,0.035), transparent 45%);
}

a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; letter-spacing:-0.01em; }
p{ margin:0; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }

::selection{ background:var(--ember); color:#1a1310; }

/* focus visibility */
a:focus-visible, button:focus-visible, .accordion-q:focus-visible{
  outline:2px solid var(--circuit);
  outline-offset:3px;
  border-radius:4px;
}

/* ambient canvas layer (embers) */
#ember-canvas{
  position:fixed; inset:0;
  width:100%; height:100%;
  z-index:0;
  pointer-events:none;
  opacity:0.75;
}

.wrap{
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
  position:relative;
  z-index:1;
}

/* ---------------- eyebrow / labels ---------------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono);
  font-size:12px; letter-spacing:0.14em; text-transform:uppercase;
  color:var(--ember);
}
.eyebrow::before{
  content:''; width:7px; height:7px; border-radius:50%;
  background:var(--ember);
  box-shadow:0 0 8px 2px rgba(255,122,51,0.7);
}
.eyebrow.circuit{ color:var(--circuit); }
.eyebrow.circuit::before{ background:var(--circuit); box-shadow:0 0 8px 2px rgba(47,232,197,0.6); }

/* ---------------- nav ---------------- */
.site-nav{
  position:sticky; top:0; z-index:50;
  background:rgba(15,12,11,0.94);
  border-bottom:1px solid var(--border-soft);
}
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 28px;
  max-width:var(--container);
  margin:0 auto;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:800; font-size:18px;
  color:var(--text);
}
.brand-mark{
  width:32px; height:32px; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  box-shadow:0 0 16px rgba(120,120,255,0.25);
  flex-shrink:0;
}
.brand-mark img{ width:100%; height:100%; object-fit:cover; display:block; }

.bot-mark{
  width:22px; height:22px; border-radius:6px;
  display:inline-flex; overflow:hidden; vertical-align:middle;
  margin-right:8px; flex-shrink:0;
}
.bot-mark img{ width:100%; height:100%; object-fit:cover; display:block; }
.bot-mark.lg{ width:44px; height:44px; border-radius:10px; }
.nav-links{
  display:flex; align-items:center; gap:2px;
}
.nav-links a{
  font-family:var(--font-mono); font-size:13px; letter-spacing:0.04em;
  color:var(--text-dim); padding:10px 14px; border-radius:8px;
  transition:color .2s ease, background .2s ease;
  position:relative;
}
.nav-links a:hover{ color:var(--text); background:rgba(255,255,255,0.04); }
.nav-links a.active{ color:var(--ember); }
.nav-links a.active::after{
  content:''; position:absolute; left:14px; right:14px; bottom:4px; height:2px;
  background:var(--ember); border-radius:2px;
}
.nav-cta{
  font-family:var(--font-mono); font-size:13px; font-weight:600;
  padding:10px 18px; border-radius:8px;
  background:var(--ember); color:#1a1310;
  box-shadow:0 4px 20px rgba(255,122,51,0.25);
  transition:transform .18s ease, box-shadow .18s ease;
  white-space:nowrap;
}
.nav-cta:hover{ transform:translateY(-1px); box-shadow:0 6px 24px rgba(255,122,51,0.4); }

.nav-toggle{
  display:none;
  background:none; border:1px solid var(--border); color:var(--text);
  border-radius:8px; width:38px; height:38px;
  align-items:center; justify-content:center;
}

/* ---------------- footer ---------------- */
.site-footer{
  border-top:1px solid var(--border-soft);
  margin-top:120px;
  padding:48px 0 32px;
  position:relative; z-index:1;
}
.footer-grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr;
  gap:32px;
  margin-bottom:32px;
}
.footer-col h4{ font-size:13px; color:var(--text-dim); font-family:var(--font-mono); letter-spacing:0.08em; text-transform:uppercase; margin-bottom:14px; }
.footer-col a, .footer-col p{ display:block; color:var(--text-dim); font-size:14px; margin-bottom:8px; }
.footer-col a:hover{ color:var(--ember); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  padding-top:24px; border-top:1px solid var(--border-soft);
  font-size:13px; color:var(--text-faint); font-family:var(--font-mono);
  flex-wrap:wrap; gap:10px;
}

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:14px; font-weight:600;
  padding:14px 26px; border-radius:10px;
  border:1px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary{
  background:var(--ember); color:#1a1310;
  box-shadow:0 6px 24px rgba(255,122,51,0.28);
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 10px 30px rgba(255,122,51,0.4); }
.btn-ghost{
  background:transparent; color:var(--text); border-color:var(--border);
}
.btn-ghost:hover{ border-color:var(--circuit); color:var(--circuit); }
.btn-circuit{
  background:transparent; color:var(--circuit); border-color:var(--circuit-dim);
}
.btn-circuit:hover{ background:rgba(47,232,197,0.08); box-shadow:0 0 24px rgba(47,232,197,0.18); }

/* ---------------- hero ---------------- */
.hero{
  padding:96px 0 72px;
  position:relative;
}
.hero-kicker{ margin-bottom:22px; }
.hero h1{
  font-size:clamp(38px, 6vw, 68px);
  font-weight:800;
  line-height:1.04;
  max-width:820px;
  margin-bottom:24px;
}
.hero h1 em{
  font-style:normal;
  background:linear-gradient(100deg, var(--ember), var(--gold));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p.lede{
  font-size:18px; color:var(--text-dim); max-width:560px; margin-bottom:36px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* ---------------- cards ---------------- */
.card{
  background:var(--bg-panel);
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  padding:28px;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,122,51,0.5), transparent);
  opacity:0; transition:opacity .3s ease;
}
.card:hover::before{ opacity:1; }

.section{ padding:88px 0; position:relative; }
.section-head{ max-width:640px; margin-bottom:48px; }
.section-head h2{ font-size:clamp(28px,4vw,42px); margin:14px 0 12px; }
.section-head p{ color:var(--text-dim); font-size:16px; }

/* reveal-on-scroll */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* ---------------- grids ---------------- */
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:24px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }

/* ---------------- price tags ---------------- */
.price-tag{
  font-family:var(--font-mono); font-weight:700; font-size:22px; color:var(--gold);
}
.price-tag small{ font-size:12px; color:var(--text-faint); font-weight:400; }

/* ---------------- badges ---------------- */
.badge{
  display:inline-block; font-family:var(--font-mono); font-size:11px;
  padding:4px 10px; border-radius:100px; letter-spacing:0.05em;
  border:1px solid var(--border); color:var(--text-dim);
}
.badge.hot{ color:var(--ember); border-color:var(--ember-dim); background:rgba(255,122,51,0.08); }
.badge.new{ color:var(--circuit); border-color:var(--circuit-dim); background:rgba(47,232,197,0.08); }

/* ---------------- code-decode (hero headline "compiling" effect) ---------------- */
.scr-char{
  display:inline;
  color:inherit;
}
.scr-char.scr-scrambling{
  display:inline-block;
  width:0.62em;
  text-align:center;
  font-family:var(--font-mono);
  color:var(--circuit);
  text-shadow:0 0 8px rgba(47,232,197,0.55);
}
.scr-char.scr-done{
  display:inline;
  animation: scrSettle 0.25s ease;
}
@keyframes scrSettle{
  from{ opacity:0.4; }
  to{ opacity:1; }
}

@keyframes heroFadeUp{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:none; }
}
.hero .hero-kicker{ animation: heroFadeUp 0.4s ease both; }
.hero p.lede{ opacity:0; animation: heroFadeUp 0.5s ease 1.3s both; }
.hero .hero-actions{ opacity:0; animation: heroFadeUp 0.5s ease 1.55s both; }

/* ---------------- window chrome (code-editor style header for price panels) ---------------- */
.window-chrome{
  display:flex; align-items:center; gap:8px;
  padding:12px 16px; margin:-28px -28px 22px;
  background:var(--bg-alt);
  border-bottom:1px solid var(--border-soft);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
}
.window-chrome .dot{ width:10px; height:10px; border-radius:50%; }
.window-chrome .dot:nth-child(1){ background:#FF5F57; }
.window-chrome .dot:nth-child(2){ background:#FEBC2E; }
.window-chrome .dot:nth-child(3){ background:#28C840; }
.window-chrome .file{
  margin-left:10px; font-family:var(--font-mono); font-size:12px; color:var(--text-faint);
}

/* ---------------- live telemetry widget ---------------- */
.telemetry-top{
  display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:20px;
  margin-bottom:24px;
}
.telemetry-count{ font-family:var(--font-mono); font-weight:700; color:var(--gold); font-size:52px; line-height:1; }
.telemetry-count-label{ font-family:var(--font-mono); font-size:12px; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.08em; margin-top:6px; }
.telemetry-periods{ display:flex; gap:8px; }
.telemetry-period{
  font-family:var(--font-mono); font-size:12.5px; padding:8px 14px; border-radius:8px;
  background:transparent; border:1px solid var(--border); color:var(--text-dim);
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.telemetry-period:hover{ border-color:var(--circuit-dim); color:var(--text); }
.telemetry-period.active{ background:var(--circuit); border-color:var(--circuit); color:#0a1a17; font-weight:600; }
.telemetry-flags{
  display:flex; flex-wrap:wrap; gap:12px;
  padding-top:20px; border-top:1px solid var(--border-soft);
}
.flag-item{
  display:flex; align-items:center; gap:7px;
  background:var(--bg-alt); border:1px solid var(--border-soft); border-radius:8px;
  padding:7px 11px; font-family:var(--font-mono); font-size:13px; color:var(--text-dim);
}
.flag-item img{ width:20px; height:15px; border-radius:2px; display:block; object-fit:cover; }
.flag-item span{ color:var(--text); font-weight:600; }
.telemetry-updated{
  font-family:var(--font-mono); font-size:11.5px; color:var(--text-faint); margin-top:18px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px){
  .grid-2,.grid-3,.grid-4{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; }
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}
