/* Radarbox.ai — marketing site.
 *
 * Direction: the signal room. The site wears the same navy and light blue as
 * the app behind it, so radarbox.ai → app.radarbox.ai reads as one product.
 * Instrument Serif carries the headlines, JetBrains Mono the labels, and the
 * only thing that moves is the radar sweep in the hero.
 */

:root {
  --ink:      hsl(220 46% 8%);
  --ink-2:    hsl(220 44% 12%);
  --panel:    hsl(220 40% 16%);
  --panel-2:  hsl(220 44% 22%);
  --rule:     hsl(220 34% 24%);
  --signal:   hsl(203 64% 62%);
  --text:     hsl(214 28% 86%);
  --muted:    hsl(214 20% 66%);

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

/* ------------------------------------------------------------------ type */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 1rem;
}
.eyebrow--tight { margin-bottom: 0.25rem; }
.eyebrow--muted { color: var(--muted); margin-bottom: 0.5rem; }
.eyebrow__icon { width: 14px; height: 14px; }

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 42em;
}
.lede--centre { margin-inline: auto; text-align: center; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.4375rem 0.875rem;
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #fff;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-head .eyebrow { margin-bottom: 0; }

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(220 46% 8% / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-right: auto;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--signal);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__mark--lg { width: 48px; height: 48px; border-radius: 14px; }
.brand__mark--lg svg { width: 26px; height: 26px; }

.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.wordmark span { color: var(--signal); }
.wordmark--sm { font-size: 1.25rem; }

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.masthead__nav > a:not(.btn) {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.masthead__nav > a:not(.btn):hover { color: #fff; }

.masthead__toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

/* ------------------------------------------------------------------ button */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn__icon { width: 16px; height: 16px; }

.btn--primary { background: var(--signal); color: var(--ink); font-weight: 600; }
.btn--primary:hover { background: hsl(203 70% 70%); }

.btn--ghost { border-color: var(--rule); color: #fff; }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal); }

.masthead__nav .btn { padding: 0.625rem 1.125rem; }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(60rem 30rem at 50% -10%, hsl(203 64% 62% / 0.16), transparent 60%),
    linear-gradient(var(--ink-2) 0%, var(--ink) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 14em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--signal); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero__note {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ------------------------------------------------------------------- radar */

.radar {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1;
  margin-top: clamp(2rem, 5vw, 4rem);
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: radial-gradient(circle at 50% 50%, var(--panel) 0%, var(--ink) 70%);
}

.radar__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid hsl(220 34% 24% / 0.8);
}
.radar__ring--1 { inset: 12.5%; }
.radar__ring--2 { inset: 25%; opacity: 0.85; }
.radar__ring--3 { inset: 37.5%; opacity: 0.7; }

.radar__axis { position: absolute; background: hsl(220 34% 24% / 0.6); }
.radar__axis--v { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar__axis--h { top: 50%; left: 0; right: 0; height: 1px; }

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, hsl(203 64% 62% / 0.35) 0deg, hsl(203 64% 62% / 0.04) 70deg, transparent 90deg);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.radar__centre {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 6px hsl(203 64% 62% / 0.18);
}

.radar__blip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  animation: blip 3s ease-in-out infinite;
}
.radar__blip--1 { left: 66%; top: 21%; }
.radar__blip--2 { left: 17%; top: 54%; animation-delay: 1s; }
.radar__blip--3 { left: 57%; top: 75%; animation-delay: 2s; }
@keyframes blip { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.radar__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px hsl(203 64% 62% / 0.2);
  flex-shrink: 0;
}

.radar__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: hsl(220 46% 8% / 0.8);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

/* ----------------------------------------------------------------- modules */

.modules { padding: clamp(4rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }

.modules__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.module {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  transition: transform 0.15s;
}
.module:hover { transform: translateY(-3px); }

.module__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--signal);
}
.module__icon svg { width: 22px; height: 22px; }

.module__num { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

.module h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.module > p { font-size: 0.9375rem; color: var(--muted); }

.checks {
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.checks li::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2372b3e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------- band */

.band {
  padding: clamp(3.5rem, 7vw, 4.5rem) 0;
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.band__head { max-width: 40em; margin-bottom: 2.5rem; }
.band__head .eyebrow { margin-bottom: 0.625rem; }

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.2fr) 64px minmax(0, 1fr);
  align-items: center;
}

.flow__node {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--ink);
  font-size: 0.9375rem;
}

.flow__arrow { display: flex; justify-content: center; color: var(--signal); }
.flow__arrow svg { width: 28px; height: 28px; }

.flow__hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  border: 1px solid hsl(203 64% 62% / 0.5);
  background: var(--panel);
  box-shadow: 0 0 0 8px hsl(203 64% 62% / 0.06);
  text-align: center;
}

.flow__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--signal);
}
.flow__mark svg { width: 26px; height: 26px; }

.flow__name { font-family: var(--display); font-size: 1.75rem; color: #fff; }
.flow__sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.caps {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2.5rem;
}

.cap { display: flex; flex-direction: column; gap: 0.375rem; }
.cap svg { width: 20px; height: 20px; color: var(--signal); margin-bottom: 0.125rem; }
.cap h4 { font-size: 1rem; font-weight: 600; color: #fff; }
.cap p { font-size: 0.875rem; line-height: 1.55; color: var(--muted); }

/* ----------------------------------------------------------------- connect */

.connect { padding: clamp(3.5rem, 7vw, 5rem) 0; }

.connect__card {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
}
@media (min-width: 60rem) {
  .connect__card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.connect__card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 0.875rem;
}
.connect__card > div > p { font-size: 0.9375rem; color: var(--muted); margin-bottom: 1.5rem; }

.code {
  margin: 0;
  padding: 1.375rem;
  border-radius: 12px;
  background: var(--ink);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}
.code__c { color: var(--muted); }
.code__k { color: var(--signal); }

/* --------------------------------------------------------------------- cta */

.cta { padding: 0 0 clamp(3.5rem, 7vw, 5rem); }

.cta__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--panel), var(--ink-2));
  border: 1px solid var(--rule);
}

.cta__card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  color: #fff;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--rule); }

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 2rem 0;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__tag { font-family: var(--body); font-size: 0.875rem; color: var(--muted); }

.footer__nav { display: flex; gap: 1.25rem; font-size: 0.875rem; }
.footer__nav a { color: var(--muted); text-decoration: none; }
.footer__nav a:hover { color: #fff; }

.footer__legal { font-size: 0.75rem; color: var(--muted); }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 60rem) {
  .flow { grid-template-columns: 1fr; gap: 0.75rem; }
  .flow__arrow svg { transform: rotate(90deg); }
}

@media (max-width: 48rem) {
  .masthead__toggle { display: inline-block; }
  .masthead__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem var(--gutter) 1.25rem;
    background: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .masthead__nav.is-open { display: flex; }
  .masthead__nav > a:not(.btn) { padding: 0.625rem 0; }
  .masthead__nav .btn { justify-content: center; margin-top: 0.5rem; }

  .radar__label { font-size: 0.625rem; }
  .radar__blip--1 { left: 58%; }
  .radar__blip--2 { left: 8%; }
  .radar__blip--3 { left: 46%; }
}
