/* HopWarden — shared styles.
   Extends the MAH7 gate page's language: white ground, #111 ink, hairline
   #ddd rules, small restrained type, generous air.
   The one deliberate addition is a monospace display face. That isn't
   decoration: the product is a network sensor, and the MAH7 gate itself
   switches to monospace the moment input looks like a code. The idiom is
   already the brand's. No webfonts — the edge serves static files only,
   and every face below ships with Windows or macOS. */

:root {
  --ink:        #111;
  --ink-soft:   #666;
  --ink-faint:  #999;
  --ink-ghost:  #bbb;
  --rule:       #ddd;
  --rule-soft:  #ececec;
  --ground:     #fff;
  --ground-alt: #fafafa;
  --accent:     #1b6b4a;          /* single accent, used sparingly */

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', 'Consolas', 'Fira Code', monospace;

  --measure: 34rem;               /* reading width */
  --gutter:  1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #ededed;
    --ink-soft:   #a0a0a0;
    --ink-faint:  #7a7a7a;
    --ink-ghost:  #5c5c5c;
    --rule:       #2e2e2e;
    --rule-soft:  #242424;
    --ground:     #0d0d0d;
    --ground-alt: #151515;
    --accent:     #5fbf92;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--ground);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- skip link: first tab stop, invisible until focused ---------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ground);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border: 1px solid var(--ink);
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --- shell ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1 0 auto; }

/* --- masthead ---------------------------------------------------------- */
.masthead {
  padding: 3.5rem 0 0;
}

.wordmark {
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}

.wordmark .warden { color: var(--ink-faint); }

.masthead nav {
  float: right;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
}

.masthead nav a {
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.masthead nav a:hover,
.masthead nav a:focus-visible { color: var(--ink); border-color: var(--ink); }

/* --- hero -------------------------------------------------------------- */
.hero {
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
}

h1 {
  font-size: clamp(1.85rem, 5vw, 2.7rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.018em;
  max-width: 22ch;
}

.lede {
  margin-top: 1.4rem;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* --- readout: the metric names the sensor actually computes ------------ */
/* Names only, never sample values — a fake dashboard would read as data. */
.readout {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

.readout div {
  padding: 0.9rem 0.4rem 0.9rem 0;
  border-right: 1px solid var(--rule-soft);
}
.readout div:last-child { border-right: 0; }

.readout dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.readout dd {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* --- sections ---------------------------------------------------------- */
section { padding: 3rem 0; border-bottom: 1px solid var(--rule); }

h2 {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 1.6rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}

p { max-width: var(--measure); }
p + p { margin-top: 1rem; }

.rows { display: grid; gap: 2rem; }
@media (min-width: 44rem) { .rows.two { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

.rows p { color: var(--ink-soft); font-size: 0.93rem; }

/* --- callout ----------------------------------------------------------- */
.callout {
  background: var(--ground-alt);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  max-width: var(--measure);
}

.callout p { font-size: 0.93rem; color: var(--ink-soft); }

/* --- buttons ----------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--ground); }

.btn-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* --- gate preview (portal-beta) ---------------------------------------- */
.preview {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  max-width: var(--measure);
  background: var(--ground-alt);
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.preview-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule); flex: none;
}

/* The replica is deliberately inert. It sits on its own white ground
   because that is what the live page is, in both colour schemes. */
.preview-stage {
  background: #fff;
  color: #111;
  padding: 2.75rem 1.5rem;
  text-align: center;
}

.preview-stage .mark {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: #111;
}

.preview-stage .tagline {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-style: italic;
  color: #888;
  letter-spacing: 0.15em;
}

.preview-stage .field {
  margin: 1.75rem auto 0;
  max-width: 20rem;
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  color: #bbb;
  font-size: 0.9rem;
  font-family: var(--sans);
  user-select: none;
}

.preview-stage .rule {
  width: 40px; height: 1px; background: #ddd; margin: 1.4rem auto;
}

.preview-stage .contact { font-size: 0.72rem; color: #bbb; }

figcaption {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* --- steps ------------------------------------------------------------- */
ol.steps { list-style: none; counter-reset: s; max-width: var(--measure); }

ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 1.45rem; height: 1.45rem;
  display: grid; place-items: center;
}

/* --- footer ------------------------------------------------------------ */
footer {
  flex: none;
  padding: 2.5rem 0 3.5rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

footer .brandline { display: flex; align-items: center; gap: 0.7rem; }

footer img { width: 74px; height: auto; opacity: 0.75; }

@media (prefers-color-scheme: dark) {
  /* the wordmark PNG is dark ink on transparent — lift it on dark ground */
  footer img { filter: invert(1) brightness(1.6); opacity: 0.6; }
}

footer .tm { font-style: italic; letter-spacing: 0.1em; font-size: 0.68rem; color: var(--ink-ghost); }

footer .legal { margin-top: 1.1rem; max-width: var(--measure); line-height: 1.7; }

footer a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
footer a:hover, footer a:focus-visible { color: var(--ink); border-color: var(--ink); }

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
