/* ==========================================================================
   stem markets — theme
   Theme only: fonts, colours, backgrounds, buttons, panels.
   Layout is unchanged — keep your existing structure and add these classes.

   Files that ship with this:
     fonts/GeistPixel-Square.woff2   (Geist Pixel by Vercel, SIL Open Font License 1.1)
     fonts/OFL-Geist.txt             (keep this licence file with the font)
   Inter and DM Mono load from Google Fonts below; self-host them if you prefer.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400..700&family=DM+Mono:wght@400;500&display=swap");

@font-face {
  font-family: "Geist Pixel";
  src: url("fonts/GeistPixel-Square.woff2?v=80887afede") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* type */
  --display: "Geist Pixel", "DM Mono", monospace;   /* headlines, big numbers */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* light surfaces (default) */
  --bg: #f8f8f8;       /* page background */
  --fg: #1a1a1a;       /* main text, primary button */
  --mut: #6b6b6b;      /* secondary text */
  --dim: #737373;      /* small labels, code comments (passes 4.5:1 on --bg) */
  --line: #e6e6e6;     /* hairlines, card and window borders */
  --panel: #ffffff;    /* cards, windows, inputs */
  --hover: #efefef;    /* hover fill for nav links and secondary buttons */
  --dot: rgba(0, 0, 0, .15);   /* dot-matrix background */

  /* accent — terminal details only ($ prompts, ✓, cursors, status dot) */
  --acc: #15803d;      /* alternatives: #0a7184 (teal), #1a1a1a (no colour) */

  --focus: #2557ff;
}

/* Dark scope — closing call to action and footer */
.dark {
  --bg: #0a0a0a;
  --fg: #f4f4f4;
  --mut: #a3a3a3;
  --dim: #8a8a8a;
  --line: #1f1f1f;
  --panel: #141414;
  --hover: #1a1a1a;
  --dot: rgba(255, 255, 255, .13);
  background: var(--bg);
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.mut { color: var(--mut); }
.dim { color: var(--dim); }

/* --------------------------------------------------------------------------
   3. Type
   -------------------------------------------------------------------------- */

.h1 {
  font-family: var(--display);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 400;
  margin: 0;
}

.h2 {
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 400;
  margin: 0;
}

.h3 {
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.025em;
  font-weight: 650;
  margin: 0;
}

.lead {
  font-size: 18px;
  line-height: 30px;
  color: var(--mut);
  margin: 0;
}

.body {
  font-size: 15px;
  line-height: 26px;
  color: var(--mut);
  margin: 0;
}

/* Small uppercase labels: "CPC", "BREAK_EVEN", "T+0" headings, etc. */
.mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11.5px;
  line-height: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Command lines, logs, JSON */
.code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 24px;
}

/* Big figures: $0.91 ÷ 1.2% = $76, calculator output */
.num {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

/* Customer quote — sans, not pixel, for readability at length */
.quote {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   4. Buttons and nav
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}

.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

/* Primary: black pill (white pill inside .dark) */
.btn-p { background: var(--fg); color: var(--bg); }
.btn-p:hover { opacity: .86; }

/* Secondary: white pill with hairline (outline only inside .dark) */
.btn-o {
  background: var(--panel);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-o:hover { background: var(--hover); }
.dark .btn-o {
  background: transparent;
  box-shadow: inset 0 0 0 1px #3a3a3a;
}

.navb {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mut);
}
.navb:hover { color: var(--fg); background: var(--hover); }

/* --------------------------------------------------------------------------
   5. Backgrounds
   -------------------------------------------------------------------------- */

/* Dot-matrix texture. Place as an absolutely positioned layer inside a
   position:relative section. Uses --dot, so it flips to white dots in .dark. */
.gridbg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero .gridbg { opacity: .5; }

/* Soft green glow behind the hero */
.glow {
  position: absolute;
  left: 50%;
  top: 180px;
  width: 820px;
  height: 560px;
  margin-left: -410px;
  background: radial-gradient(closest-side, rgba(170, 225, 200, .45), rgba(170, 225, 200, 0));
  pointer-events: none;
}

/* Hero demo / video frame */
.demo {
  border-radius: 24px;
  background: #0c0c0e;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 90px -40px rgba(0, 0, 0, .35);
}

/* --------------------------------------------------------------------------
   6. Panels
   -------------------------------------------------------------------------- */

/* Window mock (agent.log, flight-tickets.json) */
.win {
  border-radius: 22px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -30px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.win-bar i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: var(--line);
}

/* Calculator inputs */
.field label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mut);
}
.inbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px #d4d4d4;
}
.inbox:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.inbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--fg);
}
.inbox span { font-family: var(--mono); font-size: 18px; color: var(--mut); }

/* Timeline markers (T+0 … T+30) */
.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  box-sizing: border-box;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px #c4c4c4;
}
.step-dot.is-current { background: var(--acc); box-shadow: none; }

/* --------------------------------------------------------------------------
   7. Terminal details
   -------------------------------------------------------------------------- */

.acc { color: var(--acc); }

.caret,
.caret-s {
  display: inline-block;
  background: var(--acc);
  animation: stem-blink 1.1s steps(1) infinite;
}
.caret   { width: .42em; height: .78em; margin-left: .1em; vertical-align: -0.04em; }
.caret-s { width: 9px;   height: 17px;  margin-left: 4px;  vertical-align: -3px; }

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--acc);
  animation: stem-pulse 2s ease-in-out infinite;
}

@keyframes stem-blink { 50% { opacity: 0; } }
@keyframes stem-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .caret, .caret-s, .pulse { animation: none; }
}
