/* /monitoring/ — HOS Monitoring System landing. Page-level composition only: every piece is a component of nv.css or a
   HOS demo (assets/nv/demos/hos-*); this file places them and tunes them for this page.
   Colours come from the shared tokens only, so both themes and the .nv-dark islands work. Only transform / opacity move.
   The h1 keeps nv.css's one split-hero size: this file never sets it. No glow layer reaches past its section's width. */

/* ── hero: the headline across the whole hero, then the words on the left and the same day without and with alerts on the right ──
   (the long headline runs in two lines over both columns, so it reads the same at any shared h1 size) */
.mon-hero { padding-top: calc(var(--nv-strip-h) + env(safe-area-inset-top, 0px) + clamp(36px, 5vw, 72px)); padding-bottom: clamp(56px, 6vw, 88px); }
.mon-hero .nv-hero__grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr); gap: clamp(32px, 3.6vw, 52px); align-items: start; margin-top: clamp(26px, 3vw, 40px); }
.mon-hero .nv-hero__sub { margin-top: 0; font-size: clamp(1.04rem, 1.2vw, 1.12rem); }
.mon-hero .nv-cta { margin-top: 30px; }
.mon-hero .nv-fine { margin-top: 18px; text-wrap: balance; }
.mon-down { margin-top: 8px; }
.mon-down::after { transform: translateY(-2px) rotate(135deg); }
.mon-down:hover::after { transform: translateY(2px) rotate(135deg); }
.mon-hero__visual { text-align: left; }
/* a warm glow behind the day (the product's amber) over the blue of the sky; it stays inside the column's width */
.mon-hero__visual::before { content: ""; position: absolute; z-index: -1; inset: -14% 0 -10%; pointer-events: none;
  background: radial-gradient(56% 46% at 62% 44%, color-mix(in srgb, var(--nv-hos) 20%, transparent), transparent 72%),
    radial-gradient(46% 42% at 24% 80%, var(--nv-glow-1), transparent 72%); }
.mon-hero nv-hos-compare .hc { box-shadow: inset 0 0 0 1px var(--nv-line-2), var(--nv-frame-glow); }

/* ── modules: three stages, the stage on the left (it stays in view while its cards pass), its modules on the right ── */
.mon-stage { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.mon-stage + .mon-stage { margin-top: clamp(36px, 4vw, 56px); padding-top: clamp(36px, 4vw, 56px); border-top: 1px solid var(--nv-line); }
.mon-stage__side { position: sticky; top: calc(var(--nv-strip-h) + 32px); }
.mon-stage__side h3 { margin-top: 16px; font-size: clamp(1.6rem, 2.3vw, 2.1rem); letter-spacing: -0.035em; }
.mon-stage__side p { margin-top: 10px; max-width: 22em; color: var(--nv-muted); }
.mon-stage__mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
.mon-mod { display: flex; flex-direction: column; padding: clamp(18px, 2vw, 26px); }
.mon-mod nv-hos-mod { margin-bottom: 22px; }
.mon-mod .nv-tile__icon { margin-bottom: 16px; }
.mon-mod h4 { font-size: clamp(1.14rem, 1.4vw, 1.3rem); font-weight: 720; letter-spacing: -0.024em; line-height: 1.2; }
.mon-mod .nv-dots { margin-top: 12px; font-size: 0.95rem; }
.mon-mod .nv-dots li { text-wrap: pretty; }
/* a module without a miniature spans the row: the icon, the name, the three checks side by side */
.mon-mod--wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: center; }
.mon-mod--wide .nv-tile__icon { grid-row: 1 / span 2; align-self: start; margin: 0; }
.mon-mod--wide .nv-dots { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 26px; }
.mon-nw { white-space: nowrap; }
.mon-note { margin-top: 26px; color: var(--nv-dim); font-size: 0.9rem; }
.mon-modules .mon-note { padding-left: calc(290px + clamp(28px, 4vw, 64px)); }

/* ── alerts: a night band in both themes; the live feed is the picture, the clocks on request beside it ── */
.mon-alerts { padding-top: clamp(64px, 7.2vw, 104px);
  background: radial-gradient(46% 54% at 20% 34%, color-mix(in srgb, var(--nv-hos) 11%, transparent), transparent 72%),
    radial-gradient(44% 50% at 94% 80%, var(--nv-glow-1), transparent 72%), var(--nv-bg);
  box-shadow: inset 0 1px 0 var(--nv-line), inset 0 -1px 0 var(--nv-line); }
/* the header fits one line on a desk, so «Alerts» in the strip lands on the whole feed */
.mon-alerts .nv-head { max-width: 62rem; }
.mon-alerts__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 2.6vw, 36px); align-items: start; }
.mon-alerts__feed { position: relative; }
.mon-alerts__feed::before { content: ""; position: absolute; z-index: 0; inset: -12% 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--nv-hos) 13%, transparent), transparent); }
.mon-alerts__feed nv-hos-feed { position: relative; z-index: 1; }
.mon-alerts nv-hos-feed .fd { --fd-n: 5; box-shadow: inset 0 0 0 1px var(--nv-line-2), var(--nv-frame-glow); }
.mon-alerts__side { display: grid; gap: 26px; min-width: 0; }
/* status chips in this band speak the feed's language: mono, outlined, no dot */
.mon-alerts .nv-badge { padding: 5px 8px 4px; border-radius: 6px; font: 650 11px/1 var(--nv-mono); letter-spacing: 0.09em;
  color: color-mix(in srgb, var(--nv-bc) 80%, var(--nv-ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nv-bc) 34%, transparent); }
.mon-alerts .nv-badge::before { display: none; }
/* the clocks on request: a name typed, the driver's clocks back */
.mon-ask { container-type: inline-size; }
.mon-ask__bd { display: grid; gap: 12px; padding: 16px; }
.mon-ask__q { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--nv-tile);
  box-shadow: inset 0 0 0 1px var(--nv-line-2); font: 600 0.95rem/1 var(--nv-mono); }
.mon-ask__q svg { flex: none; color: var(--nv-dim); }
.mon-ask__a { padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--nv-ok) 6%, var(--nv-tile)); box-shadow: inset 0 0 0 1px var(--nv-line); }
.mon-ask__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; font-size: 0.95rem; line-height: 1.35; }
.mon-ask__who b { font-weight: 700; }
.mon-ask__who span:last-child { color: var(--nv-muted); }
.mon-ask__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--nv-ok); box-shadow: 0 0 10px color-mix(in srgb, var(--nv-ok) 60%, transparent); }
.mon-ask__clocks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.mon-ask__clocks div { min-width: 0; padding: 9px 10px 10px; border-radius: 10px; background: var(--nv-box); box-shadow: inset 0 0 0 1px var(--nv-line); }
.mon-ask__clocks dt { color: var(--nv-dim); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.mon-ask__clocks dd { margin: 5px 0 0; font: 700 1rem/1.1 var(--nv-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mon-ask figcaption { padding: 0 16px 16px; color: var(--nv-dim); font-size: 0.88rem; line-height: 1.45; }
@container (max-width: 380px) { .mon-ask__clocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mon-more { display: grid; gap: 12px; }
.mon-more__l { color: var(--nv-dim); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.mon-more .nv-chips { gap: 8px; }

/* ── how it works: three steps ── */
.mon-how { padding-bottom: clamp(56px, 6.4vw, 96px); }
.mon-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); max-width: 1120px; margin-inline: auto; }
.mon-step { padding: clamp(24px, 2.8vw, 34px); }
.mon-step .nv-step-n { margin-bottom: 20px; }
.mon-step h3 { font-size: clamp(1.2rem, 1.6vw, 1.42rem); letter-spacing: -0.024em; }
.mon-step p { margin-top: 10px; color: var(--nv-muted); font-size: 0.98rem; }

/* ── integrations ── */
.mon-int { padding-block: clamp(56px, 7vw, 104px); }
.mon-int__more { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 26px; color: var(--nv-muted); }

/* ── pricing: the plan with a gradient edge, amber into the brand blue ── */
.mon-plan { position: relative; isolation: isolate; box-shadow: var(--nv-shadow-lg), 0 0 140px rgb(var(--nv-tint) / 0.14); }
.mon-plan::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(128deg, var(--nv-hos), color-mix(in srgb, var(--nv-hos) 35%, var(--nv-accent)) 38%, var(--nv-accent) 68%, var(--nv-info));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.mon-plan__alt { margin-top: 12px; color: var(--nv-muted); font-size: 0.96rem; }
/* a text link that opens the dialog is a 44 px target */
.mon-plan__alt a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

/* ── narrower ── */
@media (max-width: 1100px) {
  .mon-alerts__grid { grid-template-columns: minmax(0, 1fr); }
  .mon-alerts__side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
/* below 1180 px the stage goes above its cards, so each card keeps room for its miniature's alert line */
@media (max-width: 1180px) {
  .mon-stage { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mon-stage__side { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .mon-stage__side h3 { margin-top: 0; }
  .mon-stage__side p { grid-column: 1 / -1; max-width: 40em; }
  .mon-modules .mon-note { padding-left: 0; }
}
/* the hero stacks where nv.css stacks the split hero: the words centred, the day under them */
@media (max-width: 980px) {
  .mon-hero { text-align: center; }
  .mon-hero .nv-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .mon-hero__visual { width: 100%; max-width: 880px; margin-inline: auto; }
}
@media (max-width: 860px) {
  .mon-steps { grid-template-columns: minmax(0, 1fr); max-width: 600px; }
  .mon-step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; }
  .mon-step .nv-step-n { grid-row: 1 / span 2; margin: 0; }
  .mon-step p { grid-column: 2; }
}
@media (max-width: 760px) {
  .mon-mod--wide .nv-dots { grid-template-columns: minmax(0, 1fr); }
  .mon-alerts__side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .mon-stage__mods { grid-template-columns: minmax(0, 1fr); }
  .mon-mod--wide { display: flex; align-items: stretch; }
  .mon-mod--wide .nv-tile__icon { margin-bottom: 16px; }
  .mon-alerts nv-hos-feed .fd { --fd-n: 4; }
  .mon-dock .nv-btn { min-width: 0; padding: 0 12px; font-size: 0.98rem; }
}
/* a narrow card: the miniature's alert line puts its chip above the sentence, so the sentence reads whole */
@media (max-width: 420px) {
  .mon-mod nv-hos-mod { --nvm-h: 178px; }
  .mon-mod nv-hos-mod .al { flex-wrap: wrap; row-gap: 7px; }
  .mon-mod nv-hos-mod .tx { flex: 1 1 100%; }
}
