:root {
  --ground: #0B0C0C;
  --surface: #14161a;
  --surface2: #1b1e24;
  --line: #262b33;
  --text: #eaeef3;
  --muted: #a6b0be;
  --brand1: #F5A623;
  --brand2: #E8431F;
  --grad: linear-gradient(120deg, #F5A623, #E8431F);
  --good: #56b981;
  --radius: 14px;
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--brand2);
  color: #fff;
}

/* --- Layout --- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.btn,
.nav-links a.btn:hover {
  color: #0B0C0C;
}

@media (max-width: 899px) {
  /* keep the primary CTA in the nav; hide only the text links */
  .nav-links { gap: 0; }
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn { padding: 9px 16px; font-size: 0.85rem; }
}

@media (max-width: 519px) {
  /* on phones, the chip logo carries the brand so the CTA fits */
  .brand-name { display: none; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 99px;
  background: var(--grad);
  color: #0B0C0C;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(232, 67, 31, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand1);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

/* --- Chip --- */
.chip {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #0B0C0C;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.chip img {
  display: block;
}

/* --- Typography --- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
  margin: 0;
}

.grad-text {
  background: var(--grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand1);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

/* --- Sections --- */
.section {
  padding-block: clamp(64px, 10vw, 128px);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--brand1) 35%, var(--line));
  transform: translateY(-2px);
}

/* --- Grids --- */
.grid-2, .grid-3 {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 719px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Radar Hero Background --- */
.hero {
  position: relative;
  overflow: hidden;
}

.radar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  pointer-events: none;
  opacity: 0.6;
  z-index: -1;
}

.radar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(232, 67, 31, 0.14) 70deg, transparent 140deg);
  animation: radar-sweep 18s linear infinite;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.5;
}

.radar-ring:nth-child(1) { width: 200px; height: 200px; }
.radar-ring:nth-child(2) { width: 400px; height: 400px; }
.radar-ring:nth-child(3) { width: 600px; height: 600px; }

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.rise {
  animation: rise-up 0.7s ease both;
}

@keyframes rise-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scorebar --- */
.scorebar {
  width: 100%;
  height: 10px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}

.scorebar-fill {
  height: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.scorebar.in .scorebar-fill {
  transform: scaleX(1);
}

.weight-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 18px 0 8px;
}

.weight-label .num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--brand1);
}

/* --- Dial --- */
.dial {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--brand1) calc(var(--pct) * 1%), var(--surface2) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.dial-inner {
  width: 130px;
  height: 130px;
  background: var(--ground);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
}

/* --- Trace --- */
.trace {
  border-left: 2px solid var(--brand2);
  padding-left: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 8px 0;
}

.trace-empty {
  border-left: 2px dashed var(--line);
  font-style: italic;
}

/* --- Prose --- */
.prose {
  max-width: 68ch;
}

.prose h2 {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 48px;
}

.prose code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
}

.prose ul {
  padding-left: 1.2em;
}

.prose a {
  color: var(--brand1);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.prose th, .prose td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.prose blockquote {
  border-left: 3px solid var(--brand1);
  padding-left: 16px;
  margin: 24px 0;
  color: var(--muted);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--text);
}

/* --- Tag --- */
.tag {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise, .radar::before, .scorebar-fill {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .scorebar .scorebar-fill {
    transform: scaleX(1);
  }
  .card, .btn {
    transition: none;
  }
}
