/* ============================================================
   NITRO RABBIT LABS — PRODUCT DETAIL PAGES
   Page-scoped styles for nitro-fleet-agents.html, nitro-mapper.html
   and nitro-security.html only.

   Link order on those pages:
     main.css (tokens + base) -> site.css (components) -> product-page.css

   Nothing here restyles a shared component globally: every rule is
   either a new class or scoped under .product, so the rest of the
   site is untouched. All colour comes from the tokens in main.css.
   ============================================================ */

/* ============================================================
   PER-PRODUCT ACCENT SCOPE
   Set on <main class="product product--red"> so every descendant
   (cards, steps, panels, use-cases) inherits one accent.
     --accent      decorative fills + rules
     --accent-ink  accent-coloured TEXT on light surfaces (>= 4.5:1
                   on --surface-page; the raw blue/green tokens are
                   too light for body-size text)
     --accent-lift accent-coloured text on the carbon mock panels
     --accent-tint pale wash behind icon chips
   ============================================================ */
.product--red {
  --accent:      var(--nrl-nitro-red);
  --accent-ink:  var(--nrl-red-700);
  --accent-lift: var(--nrl-red-300);
  --accent-tint: var(--nrl-red-100);
}
.product--blue {
  --accent:      var(--nrl-rabbit-blue);
  /* Darkened mix, not the raw token — see --accent-ink-blue in main.css
     for the measured contrast. The 88% mix this replaced cleared the page
     surface (4.74:1) but missed the sunken band at 4.41:1. */
  --accent-ink:  var(--accent-ink-blue);
  --accent-lift: var(--nrl-cloud-blue);
  --accent-tint: var(--nrl-blue-100);
}
.product--green {
  --accent:      var(--nrl-labs-green);
  --accent-ink:  var(--accent-ink-green);
  --accent-lift: var(--nrl-goggle-mint);
  --accent-tint: var(--nrl-green-100);
}

/* Card icons on these pages use the darker ink so the glyph reads
   against its own pale tint (raw blue/green sat under 3:1). */
.product .card__icon { color: var(--accent-ink); }

/* ---- Eyebrow modifiers site.css does not ship ---- */
.eyebrow--blue  { color: var(--nrl-rabbit-blue); }
.eyebrow--green { color: var(--nrl-labs-green); }
/* accent eyebrow for LIGHT surfaces — always the ink variant */
.eyebrow--acc   { color: var(--accent-ink, var(--nrl-red-700)); }
/* On the carbon hero the base red eyebrow (#C32C38) reaches only
   3.41:1. Lift it to the 300 tint (7.99:1) — the same move
   .eyebrow--blue (7.19:1) and .eyebrow--green (9.87:1) already make
   on the Mapper and Security heroes. */
.product-hero .eyebrow--red { color: var(--nrl-red-300); }


/* ============================================================
   PRODUCT HERO  (extends .page-hero.nrl-on-carbon)
   ============================================================ */
.product-hero h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 18px;
}
.product-hero__name { min-width: 0; }
.product-hero__short {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nrl-on-carbon-soft);
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  white-space: nowrap;
  transform: translateY(-2px);
}
.product-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

/* ============================================================
   CONCEPT — two-column "what it is" + carbon mock panel
   ============================================================ */
.concept {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.concept__copy { min-width: 0; }
.concept__copy h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 16px; }
.concept__copy p:not(.eyebrow) {
  font-size: 1.0625rem;
  color: var(--text-body);
  line-height: 1.6;
  max-width: 54ch;
}
.concept__copy p:last-child { margin-bottom: 0; }

.concept__figure { min-width: 0; margin: 0; }
.concept__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-body);
  margin: 12px 0 0;
  text-align: right;
}

/* ---- The mock panel shell (three fillings share it) ---- */
.panel {
  min-width: 0;
  background: var(--surface-inverse-2);
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: var(--lh-mono);
  color: var(--nrl-on-carbon-soft);
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface-inverse);
  border-bottom: 1px solid var(--nrl-carbon-line);
}
.panel__dots { display: inline-flex; gap: 5px; flex: none; }
.panel__dot { width: 8px; height: 8px; border-radius: var(--radius-circle); background: var(--nrl-carbon-line); }
.panel__dot:first-child { background: var(--accent); }
.panel__label { font-size: 11px; letter-spacing: 0.06em; color: var(--nrl-on-carbon-soft); }
.panel__label--right { margin-left: auto; }
.panel__body { padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.panel__rule { border-top: 1px solid var(--nrl-carbon-line); padding-top: 13px; }

/* ---- Fleet Agents: agent roster + run log + spend meter ---- */
.roster { display: flex; flex-direction: column; gap: 7px; }
.roster__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-sm);
}
.roster__pip { width: 7px; height: 7px; flex: none; border-radius: var(--radius-circle); background: var(--nrl-on-carbon-faint); }
.roster__name { flex: 1; min-width: 0; color: var(--nrl-on-carbon); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster__state { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nrl-on-carbon-soft); }
.roster__row--done .roster__pip   { background: var(--nrl-labs-green); }
.roster__row--done .roster__state { color: var(--nrl-goggle-mint); }
.roster__row--live .roster__pip   { background: var(--accent-lift); }
.roster__row--live .roster__state { color: var(--accent-lift); }
.roster__row--hold { border-color: color-mix(in srgb, var(--nrl-spark-yellow) 35%, var(--nrl-carbon)); }
.roster__row--hold .roster__pip   { background: var(--nrl-spark-yellow); }
.roster__row--hold .roster__state { color: var(--nrl-spark-yellow); }

.log { display: flex; flex-direction: column; gap: 6px; }
.log__line { display: flex; gap: 10px; color: var(--nrl-on-carbon); }
.log__t { flex: none; color: var(--nrl-on-carbon-soft); }

.meter { display: flex; flex-direction: column; gap: 8px; }
.meter__row { display: flex; justify-content: space-between; gap: 12px; }
.meter__k { color: var(--nrl-on-carbon-soft); }
.meter__v { color: var(--nrl-on-carbon); }
.meter__track { height: 6px; border-radius: var(--radius-pill); background: var(--nrl-carbon-line); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: var(--pct, 50%); border-radius: inherit; background: var(--accent); }

/* ---- Mapper: tile grid with a route drawn over it ---- */
.tilemap {
  position: relative;
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tilemap__grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.tile {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tile--water { background: color-mix(in srgb, var(--nrl-rabbit-blue) 24%, var(--nrl-carbon)); }
.tile--park  { background: color-mix(in srgb, var(--nrl-labs-green) 18%, var(--nrl-carbon)); }
.tile--block { background: rgba(255, 255, 255, 0.07); }
.tilemap__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-lift);
}

.kvs { display: grid; gap: 7px; }
.kv { display: flex; justify-content: space-between; gap: 14px; }
.kv__k { color: var(--nrl-on-carbon-soft); }
.kv__v { color: var(--nrl-on-carbon); text-align: right; }
.kv__v--acc { color: var(--accent-lift); }

/* ---- Security: hybrid handshake ---- */
.hs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.hs__node {
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--nrl-on-carbon);
}
.hs__who { display: block; font-weight: var(--fw-bold); }
.hs__role {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nrl-on-carbon-soft);
  margin-top: 4px;
}
.hs__wire { position: relative; min-width: 92px; text-align: center; }
.hs__wire::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  transform: translateY(-1px);
  background: linear-gradient(90deg, transparent, var(--accent-lift), transparent);
}
.hs__wire span {
  position: relative;
  display: inline-block;
  padding: 3px 7px;
  background: var(--surface-inverse-2);
  color: var(--accent-lift);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--nrl-carbon-line);
  border-radius: var(--radius-pill);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nrl-on-carbon-soft);
}
.chip--acc {
  color: var(--accent-lift);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--nrl-carbon));
}

/* ============================================================
   STEPS — how it works
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2.6vw, 30px); }
.step {
  min-width: 0;
  padding-top: 18px;
  border-top: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}
.step__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p  { margin: 0; font-size: 15px; color: var(--text-body); line-height: 1.55; }

/* ============================================================
   USE CASES — who it is for
   ============================================================ */
.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.usecase {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface-card);
  border: var(--border-hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.usecase:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
  border-left-color: var(--accent);
}
.usecase__icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.usecase__icon .icon { width: 20px; height: 20px; }
.usecase h3 { margin: 0 0 6px; font-size: 16px; }
.usecase p  { margin: 0; font-size: 14px; color: var(--text-body); line-height: 1.55; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .usecases { grid-template-columns: 1fr; }
}

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

@media (max-width: 860px) {
  .concept { grid-template-columns: 1fr; }
  .concept__figure { order: 2; }
  .concept__note { text-align: left; }
  .steps { grid-template-columns: 1fr; }
  .step { padding-top: 14px; }
}

@media (max-width: 560px) {
  .product-hero__actions .btn { width: 100%; justify-content: center; }
  .hs { grid-template-columns: 1fr; }
  .hs__wire { min-width: 0; padding: 8px 0; }
  .hs__wire::before {
    left: 50%; right: auto; top: 0; bottom: 0;
    width: 2px; height: auto; transform: none;
    background: linear-gradient(180deg, transparent, var(--accent-lift), transparent);
  }
}

/* Motion: these pages add no keyframe animation. The transitions above
   are already neutralised by the prefers-reduced-motion block in
   main.css; this restates the intent for anything loaded standalone. */
@media (prefers-reduced-motion: reduce) {
  .usecase { transition: none; }
}
