/* ---------------------------------------------------------------
   ScepNet — public pages (landing, pricing, documentation).

   Layered on top of style.css so the marketing side and the portal
   share one palette and one type scale. Everything here is additive:
   no token is redefined, so a change to the portal's colours carries
   through to these pages rather than drifting away from them.
   --------------------------------------------------------------- */

/* ---------------------------------------------------- marketing nav */

.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}

.mkt-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  /* Wrapping is permitted at every width rather than switched on at some
     breakpoint chosen from a guess about how wide the words are. The row
     reflows when it stops fitting, so there is no width at which the header
     can overflow — including in a language where "Documentation" is longer. */
  flex-wrap: wrap;
}

.mkt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.015em;
  font-size: 16.5px;
  white-space: nowrap;
  flex: none;
}

.mkt-brand svg { width: 26px; height: 26px; flex: none; }

.mkt-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.mkt-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  /* Labels wrap as whole items or not at all. Without this "Start free trial"
     breaks across two lines inside its own button. */
  white-space: nowrap;
  flex: none;
}

.mkt-links a:hover { color: var(--ink); }

.mkt-links a.cta {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
}

.mkt-links a.cta:hover { background: var(--accent-soft-ink); color: #fff; }

/* ---------------------------------------------------------- shell */

.mkt { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.mkt-section { padding: 78px 0; }
.mkt-section + .mkt-section { padding-top: 0; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-soft-ink);
  margin: 0 0 14px;
}

.mkt h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -.028em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.mkt h2 {
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.mkt h3 { font-size: 16px; margin: 0 0 7px; letter-spacing: -.01em; }

.lede {
  font-size: clamp(16px, 1.7vw, 18.5px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34rem;
  margin: 0 0 28px;
}

.mkt p { color: var(--ink-2); line-height: 1.62; }

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

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 54px;
  align-items: center;
  padding: 76px 0 68px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn-lg {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-lg.primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-lg.primary:hover { background: var(--accent-soft-ink); }
.btn-lg.ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-lg.ghost:hover { border-color: var(--ink-3); }

.hero-note { font-size: 13px; color: var(--ink-3); margin: 16px 0 0; }

/* -------------------------------------------------- the diagram */

.diagram {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 44px rgba(16, 20, 34, .10));
}

.diagram .label {
  font: 600 10.5px var(--mono);
  letter-spacing: .04em;
  fill: var(--ink-3);
}

.diagram .label-strong { font: 700 11.5px var(--mono); fill: var(--ink); letter-spacing: .02em; }
.diagram .device-body { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.diagram .screen { fill: var(--surface-3); }
.diagram .node { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.diagram .node-accent { fill: var(--accent); }
.diagram .cert { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.diagram .cert-mark { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-linecap: round; }

.diagram .wire { stroke: var(--border-strong); stroke-width: 1.6; fill: none; }

.diagram .flow {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  animation: flow 1.5s linear infinite;
}

@keyframes flow { to { stroke-dashoffset: -26; } }

@media (prefers-reduced-motion: reduce) {
  .diagram .flow { animation: none; stroke-dasharray: none; opacity: .75; }
}

/* -------------------------------------------------------- panels */

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2m { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.panel p { font-size: 14px; margin: 0; }

.panel-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.panel-icon svg { width: 19px; height: 19px; }

/* Numbered because these really are sequential — the order is the
   procedure a customer follows, not decoration. */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.step-card { position: relative; padding-top: 6px; }

.step-card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 13px;
}

.step-card p { font-size: 14px; margin: 0; }

/* ----------------------------------------------------- band + cta */

.band {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 46px 44px;
  color: #fff;
}

.band h2 { color: #fff; }
.band p { color: #b9c0d0; }
.band .lede { color: #b9c0d0; }

.band .btn-lg.primary { background: #fff; color: var(--ink); }
.band .btn-lg.primary:hover { background: #e8ecf6; }
.band .btn-lg.ghost { background: transparent; color: #fff; border-color: #3a4256; }
.band .btn-lg.ghost:hover { border-color: #6b7385; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.check-list svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--ok); }
.band .check-list li { color: #d5daea; }
.band .check-list svg { color: #4ade80; }

/* ------------------------------------------------------- pricing */

/* Three across, so the six tiers fill two even rows. At four the ladder broke
   into a row of four and an orphaned pair, which reads as two groups of plan
   rather than one ladder. */
/* Five across: the free tier and the four paid ones, on one row.
   Deliberately a fixed count rather than auto-fit. The ladder is read as a
   ladder — each card is only meaningful next to the one beside it — and
   auto-fit would reflow it into 3 + 2 at some widths, which puts the two
   largest plans on a row of their own and reads as a second, separate offer.
   The count changes with the tier count, in this file, next to the widths that
   have to hold it. */
.price-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }

/* The ladder's own breakpoints, set by what a card has to fit rather than by
   the page layout — which is why they do not live in the 900px block below
   with the rest of it. The binding constraint is the amount: "R74 990" at 31px
   needs about 126px, and five columns stop giving it that at roughly 1060px.
   Below that it is 3 + 2, which keeps the free tier and the two smallest plans
   — the ones a visitor is actually choosing between — together on the top
   row. */
@media (max-width: 1060px) {
  .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-md); }

.price-card .devices { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.price-card .amount { font-size: 31px; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.price-card .per { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.price-card .save { font-size: 12.5px; color: var(--ok); font-weight: 600; margin-bottom: 16px; }
.price-card a { margin-top: auto; }

/* The tier above the ladder. Deliberately not a .price-card: it has no price,
   and a card shaped like the others but with words where the amount goes reads
   as a plan whose price failed to load. Full width, below the grid, laid out
   as a sentence. */
.price-contact {
  margin-top: 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  justify-content: center;
  text-align: center;
}

.price-contact strong { font-size: 15px; }
.price-contact span { color: var(--ink-2); font-size: 14px; }
.price-contact a { font-weight: 600; }

.toggle-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }

/* --------------------------------------------------------- docs */

.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 44px; align-items: start; }

.doc-nav { position: sticky; top: 86px; display: grid; gap: 3px; }

.doc-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.doc-nav a:hover { background: var(--surface-2); color: var(--ink); }

.doc-body h2 { margin-top: 42px; scroll-margin-top: 96px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin-top: 24px; font-size: 15px; }
.doc-body p, .doc-body li { max-width: 44rem; font-size: 14.5px; }
.doc-body ul, .doc-body ol { padding-left: 20px; color: var(--ink-2); }
.doc-body li { margin-bottom: 6px; line-height: 1.6; }

.doc-body pre {
  background: var(--ink);
  color: #e6e9f2;
  padding: 15px 17px;
  border-radius: var(--r-sm);
  overflow-x: auto;
  font: 12.5px/1.6 var(--mono);
  max-width: 44rem;
}

.doc-body code { font: .92em var(--mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.doc-body pre code { background: none; padding: 0; color: inherit; }

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

.mkt-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 40px 0 54px; }

.mkt-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  gap: 40px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.mkt-footer p { font-size: 13.5px; margin: 0; color: var(--ink-3); }

.mkt-footer-links { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }

.mkt-footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
}

.mkt-footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 36px; padding: 46px 0 40px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-2m { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; gap: 26px; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .mkt-section { padding: 52px 0; }
  .band { padding: 34px 26px; }
}

@media (max-width: 700px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .price-grid { grid-template-columns: 1fr; }
}

/* Once the links have wrapped below the brand, `margin-left: auto` would shove
   them all to the right edge. They take the full row and spread instead, so
   the second line reads as a menu rather than as leftovers. */
@media (max-width: 680px) {
  .mkt-nav-inner { gap: 12px; padding: 12px 18px; }
  .mkt-links {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .mkt-nav-inner { padding: 12px 16px; }
  .mkt-links { gap: 10px; font-size: 13px; }
  .mkt-links a { font-size: 13px; }
  .mkt-links a.cta { padding: 7px 12px; }
  .mkt-brand { font-size: 15.5px; }
}

/* A whole panel that is a link. The heading and paragraph inside already carry
   their own colours from `.mkt h2` / `.mkt p`, so this only has to add the
   affordance that a card is clickable. */
.panel-link { display: block; text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.panel-link:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.panel-link h2 { transition: color .12s; }
.panel-link:hover h2 { color: var(--accent-soft-ink); }
