/* Colours and fonts match the Mping app (dark theme). */
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-Variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/fonts/NunitoSans-Variable.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-Variable.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --canvas: #0E0E0F;
  --base: #121214;
  --panel: #131316;
  --ink: rgba(255, 255, 255, 0.93);
  --ink-dim: rgba(255, 255, 255, 0.58);
  --line: rgba(255, 255, 255, 0.08);
  --go: #4DD973;
  --healthy-fill: #33B857;
  --healthy-text: #57DB70;
  --tile-healthy: #1D4A2A;
  --display: "Nunito", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--healthy-text); }
.wrap { max-width: 1040px; margin-left: auto; margin-right: auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0; text-wrap: balance; }

/* hero */
.hero { padding: 72px 0 40px; }
.brand { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.brand img { width: 96px; height: 96px; border-radius: 22px; }
h1 { font-size: clamp(44px, 7vw, 64px); letter-spacing: -0.01em; }
.tag { font: 700 15px var(--body); color: var(--ink-dim); vertical-align: middle; letter-spacing: 0.04em; }
.strap { margin: 4px 0 0; font: 700 17px var(--display); color: var(--ink-dim); }
.lead { font-size: clamp(20px, 2.6vw, 24px); line-height: 1.45; max-width: 36em; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.button { display: inline-block; padding: 12px 20px; border-radius: 10px; font: 800 16px var(--display); text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
.button:hover { border-color: rgba(255, 255, 255, 0.2); }
.button.go { background: var(--go); color: #0E0E0F; border-color: transparent; }
.button.go:hover { background: var(--healthy-text); }
.small { font-size: 14px; color: var(--ink-dim); margin: 0; }

/* map illustration */
.map { margin-top: 16px; margin-bottom: 72px; }
.map svg { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.map figcaption { font-size: 13px; color: var(--ink-dim); margin-top: 8px; }
.area rect { fill: rgba(70, 40, 40, 0.18); stroke: rgba(255, 255, 255, 0.1); }
.area text { fill: var(--ink); font: 800 15px var(--display); }
.link path { stroke: var(--healthy-fill); stroke-width: 4; fill: none; stroke-linecap: round; }
.flow path { stroke: #A8F0B8; stroke-width: 2; fill: none; stroke-dasharray: 3 14; stroke-linecap: round; animation: flow 1.6s linear infinite; opacity: 0.8; }
.thin { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.5; stroke-dasharray: 2 4; fill: none; }
.label rect { fill: #1A1B1E; stroke: rgba(255, 255, 255, 0.12); }
.label text { fill: var(--ink); font: 600 11px var(--mono); }
.label .port { fill: var(--ink); font-weight: 800; }
.tile > rect { fill: var(--tile-healthy); stroke: rgba(87, 219, 112, 0.35); stroke-width: 1; }
.tile .name { fill: var(--ink); font: 800 13px var(--display); }
.tile.small .name { font-size: 11px; }
.tile .addr { fill: var(--ink-dim); font: 500 11px var(--mono); }
.tile.small .addr { font-size: 10px; }
.tile .chip { fill: rgba(0, 0, 0, 0.35); }
.tile .mono { fill: var(--ink); font: 700 12px var(--mono); }
.tile .unit { fill: var(--ink-dim); font-size: 9px; }
.tile .temp { fill: var(--healthy-text); font: 700 13px var(--mono); }
.tile .dot { fill: var(--healthy-text); }
.tile .ripple { fill: none; stroke: var(--healthy-text); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ripple 2s ease-out infinite; }
.tile .r2 { animation-delay: 0.6s; }
.tile .r3 { animation-delay: 1.2s; }
@keyframes flow { to { stroke-dashoffset: -34; } }
@keyframes ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flow path, .tile .ripple { animation: none; } .tile .ripple { display: none; } }

/* sections */
section { margin-bottom: 72px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 24px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.grid h3 { font-size: 19px; margin-bottom: 8px; }
.grid h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--healthy-text); margin-right: 10px; vertical-align: 3px; }
.grid p { margin: 0; color: var(--ink-dim); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two h2 { font-size: 26px; margin-bottom: 12px; }
.two p { margin: 0; color: var(--ink-dim); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-dim); }
footer p { margin: 0 0 6px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 40px; }
  .brand img { width: 72px; height: 72px; border-radius: 16px; }
  .grid { grid-template-columns: 1fr; }
  .button { width: 100%; text-align: center; }
}
