/* =========================================================
   BEYONDER — design tokens
   Palette: void black control-room panel, amber "signal"
   accent for action, teal "scan" accent for data/telemetry.
   Type: Space Grotesk (display) / Inter (body) / JetBrains
   Mono (telemetry, command names, tags).
   ========================================================= */

@font-face {
  font-family: 'Space Grotesk';
  src: local('Space Grotesk');
}

:root {
  --void: #08090c;
  --void-2: #0c0e13;
  --panel: #12141a;
  --panel-2: #181b22;
  --line: #262a33;
  --line-soft: #1c1f27;
  --text: #edeff3;
  --muted: #8b909c;
  --muted-2: #5c616c;
  --signal: #ff8a3d;
  --signal-dim: #a35a2a;
  --scan: #4fd1c5;
  --scan-dim: #2f7d76;
  --danger: #e5484d;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius: 3px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--void);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255,138,61,0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 0%, rgba(79,209,197,0.06), transparent 55%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--signal); color: #1a0f06; }

:focus-visible {
  outline: 2px solid var(--scan);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--scan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--scan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--scan);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------------- status ticker ---------------- */
.ticker {
  border-bottom: 1px solid var(--line-soft);
  background: var(--void-2);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker__track {
  display: inline-flex;
  gap: 48px;
  padding: 7px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  animation: ticker-scroll 34s linear infinite;
  will-change: transform;
}
.ticker__track span { color: var(--muted); }
.ticker__track .dot-on { color: var(--scan); }
.ticker__track .dot-on.dot-degraded { color: var(--signal); }
.ticker__track .dot-on.dot-off { color: var(--danger); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- nav ---------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(8,9,12,0.85);
  border-bottom: 1px solid var(--line-soft);
}
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 30px;
}
.navlinks a {
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.15s ease;
  position: relative;
  padding: 4px 0;
}
.navlinks a:hover { color: var(--text); }
.navlinks a.active { color: var(--text); }
.navlinks a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--signal);
}
.navcta { display: flex; align-items: center; gap: 12px; }
.navtoggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-signal {
  background: var(--signal);
  color: #1a0f06;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(255,138,61,0.5);
}
.btn-signal:hover { background: #ffa15f; box-shadow: 0 0 22px rgba(255,138,61,0.35); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--scan); color: var(--scan); }
.btn-sm { padding: 8px 14px; font-size: 12px; }

/* ---------------- hero / terminal ---------------- */
.hero {
  padding: 84px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  margin: 18px 0 20px;
}
.hero h1 .accent { color: var(--signal); }
.hero p.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.hero__meta b { color: var(--scan); font-weight: 600; }

.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.terminal__bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line);
}
.terminal__bar .label {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  border-radius: 0;
  width: auto; height: auto;
  background: none;
}
.terminal__body {
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  min-height: 300px;
}
.terminal__line { color: var(--muted); opacity: 0; animation: line-in 0.25s ease forwards; }
.terminal__line .ok { color: var(--scan); }
.terminal__line .path { color: var(--text); }
.terminal__cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--signal);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: -2px;
}
@keyframes line-in { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- stats strip ---------------- */
.stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 34px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
}
.stat span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------------- sections ---------------- */
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section__head { max-width: 640px; margin-bottom: 44px; }
.section__head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 14px 0 12px;
}
.section__head p { color: var(--muted); font-size: 15.5px; }

/* module grid */
.modgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.modcard {
  background: var(--void);
  padding: 26px 24px;
  transition: background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.modcard:hover { background: var(--panel); }
.modcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modtag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--signal);
  border: 1px solid var(--signal-dim);
  padding: 2px 7px;
  border-radius: 2px;
}
.modcount {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}
.modcard h3 { font-size: 17px; font-weight: 600; }
.modcard p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* premium band */
.band {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel), var(--void-2));
  border-radius: 6px;
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.band h2 { font-size: 26px; margin: 10px 0 8px; }
.band p { color: var(--muted); max-width: 46ch; margin: 0; }

/* ---------------- commands page ---------------- */
.cmdtools {
  position: sticky;
  top: 68px;
  z-index: 30;
  background: rgba(8,9,12,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 0;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.searchbox svg { flex: none; color: var(--muted-2); }
.searchbox input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  width: 100%;
}
.searchbox input::placeholder { color: var(--muted-2); }
.searchbox .kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  background: var(--panel);
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.active { background: var(--signal); color: #1a0f06; border-color: var(--signal); font-weight: 700; }

.cmdresults { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); padding: 16px 0 4px; }

.cmdgroup { padding: 32px 0; border-bottom: 1px solid var(--line-soft); }
.cmdgroup__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.cmdgroup__head h3 { font-size: 19px; }
.cmdgroup__blurb { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; max-width: 60ch; }
.cmdlist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px 24px;
}
.cmditem {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.cmditem code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--scan);
  flex: none;
  min-width: 118px;
}
.cmditem span { color: var(--muted); font-size: 13.5px; }
.cmditem .prem {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--signal);
  border: 1px solid var(--signal-dim);
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
}
.hidden { display: none !important; }

/* ---------------- pricing / premium page ---------------- */
.perklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.perk { background: var(--void); padding: 22px 24px; }
.perk h3 { font-size: 15.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.perk h3::before { content: '◆'; color: var(--signal); font-size: 11px; }
.perk p { color: var(--muted); font-size: 13.5px; margin: 0; }

.pricecard {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 36px;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
}
.pricecard .eyebrow { justify-content: center; margin-bottom: 14px; }
.pricecard p.note { color: var(--muted); font-size: 14px; margin: 16px 0 26px; }

.faq { border-top: 1px solid var(--line-soft); }
.faqitem { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.faqitem h3 { font-size: 15.5px; margin-bottom: 8px; }
.faqitem p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------------- support page ---------------- */
.supportgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.supportcard {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 30px;
}
.supportcard .modtag { margin-bottom: 14px; display: inline-block; }
.supportcard h3 { font-size: 19px; margin-bottom: 8px; }
.supportcard p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ---------------- footer ---------------- */
footer.site {
  border-top: 1px solid var(--line-soft);
  padding: 46px 0 34px;
  margin-top: 40px;
}
.footgrid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.footbrand { max-width: 320px; }
.footbrand .brand { margin-bottom: 10px; }
.footbrand p { color: var(--muted-2); font-size: 13px; }
.footlinks { display: flex; gap: 60px; flex-wrap: wrap; }
.footlinks h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 12px;
}
.footlinks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footlinks a { color: var(--muted); font-size: 13.5px; }
.footlinks a:hover { color: var(--scan); }
.footbottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- page header (non-home) ---------------- */
.pagehead { padding: 64px 0 40px; }
.pagehead h1 { font-size: clamp(30px, 4vw, 44px); margin: 16px 0 12px; }
.pagehead p { color: var(--muted); max-width: 56ch; font-size: 15.5px; }

/* ---------------- partner bots ---------------- */
.partnergrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.partnercard {
  background: var(--void);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.partnercard__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.partnericon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--signal); flex-shrink: 0;
  overflow: hidden;
}
.partnericon img { width: 100%; height: 100%; object-fit: cover; }
.partnercard h3 { font-size: 16.5px; margin: 0 0 2px; }
.partnercard .tagline { color: var(--muted-2); font-size: 12px; font-family: var(--font-mono); }
.partnercard p.desc { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; flex-grow: 1; }
.partnercard .btn { align-self: flex-start; padding: 8px 16px; font-size: 12.5px; }

/* ---------------- team ---------------- */
.teamgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.teamcard {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  isolation: isolate;
}
.teamcard::before {
  /* corner bracket accent, matches control-room styling */
  content: "";
  position: absolute;
  inset: 10px;
  border-top: 1px solid transparent;
  border-left: 1px solid transparent;
  border-color: var(--scan);
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
  pointer-events: none;
}
.teamcard:hover::before { opacity: 0.9; }
.teamavatar {
  position: absolute;
  inset: 0;
  background: var(--void);
}
.teamavatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(65%) contrast(1.05) brightness(0.85);
  transform: scale(1.02);
  transition: filter 0.45s ease, transform 0.6s ease;
}
.teamcard:hover .teamavatar img {
  filter: grayscale(0%) contrast(1) brightness(0.95);
  transform: scale(1.08);
}
.teamcard::after {
  /* permanent bottom gradient so name/role stay legible over any photo */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,9,12,0) 35%, rgba(8,9,12,0.55) 62%, rgba(8,9,12,0.96) 100%);
  z-index: 1;
  transition: background 0.35s ease;
}
.teamcard:hover::after {
  background: linear-gradient(180deg, rgba(8,9,12,0.05) 0%, rgba(8,9,12,0.55) 38%, rgba(8,9,12,0.97) 100%);
}
.teamcard__info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 18px 18px 16px;
}
.teamcard h3 { font-size: 16px; margin: 0 0 3px; transition: transform 0.35s ease; }
.teamcard .role {
  color: var(--signal); font-size: 11px; font-family: var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 0; display: block;
  transition: margin 0.35s ease;
}
.teamcard__reveal {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}
.teamcard:hover .teamcard__reveal,
.teamcard:focus-within .teamcard__reveal {
  max-height: 120px;
  opacity: 1;
  margin-top: 10px;
}
.teamcard p.bio { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }
.teamcard .socials { display: flex; gap: 10px; flex-wrap: wrap; }
.teamcard .socials a {
  color: var(--muted-2); font-size: 11.5px; font-family: var(--font-mono);
  border: 1px solid var(--line); padding: 4px 9px; border-radius: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.teamcard .socials a:hover { color: var(--scan); border-color: var(--scan-dim); }

@media (max-width: 860px) {
  .partnergrid { grid-template-columns: repeat(2, 1fr); }
  .teamgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 560px) {
  .teamgrid { grid-template-columns: 1fr 1fr; }
  .teamcard { aspect-ratio: 3 / 4; }
}
@media (hover: none) {
  /* touch devices: no hover state, so keep bios visible by default */
  .teamcard__reveal { max-height: 120px; opacity: 1; margin-top: 10px; }
  .teamcard::after { background: linear-gradient(180deg, rgba(8,9,12,0.05) 0%, rgba(8,9,12,0.6) 40%, rgba(8,9,12,0.97) 100%); }
  .teamavatar img { filter: grayscale(0%) contrast(1) brightness(0.9); }
}
@media (max-width: 560px) {
  .partnergrid { grid-template-columns: 1fr; }
  .teamgrid { grid-template-columns: 1fr; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .modgrid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .perklist { grid-template-columns: 1fr; }
  .supportgrid { grid-template-columns: 1fr; }
  .cmdlist { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .navlinks { display: none; }
  .navtoggle { display: flex; }
  .navlinks.open {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--void);
    border-bottom: 1px solid var(--line);
    padding: 18px 28px;
    gap: 16px;
  }
  .modgrid { grid-template-columns: 1fr; }
  .footgrid { flex-direction: column; }
}
