/* The public site at /. Colors, buttons and the logo come from app.css. */

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { font-size: 15px; line-height: 1.55; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-2); }
.btn.big { padding: 11px 20px; font-size: 15px; font-weight: 600; border-radius: 8px; }
body.site .brand { font-size: 17px; gap: 10px; } /* app.css shrinks it to the logo on narrow screens */
a.btn:hover { text-decoration: none; }

/* Navigation */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.site-links { display: flex; gap: 4px; }
.site-links a { color: var(--text-2); padding: 6px 12px; border-radius: 6px; }
.site-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Hero and sign-up */
.hero { padding: 72px 0 56px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 20px; font-weight: 700; }
.lead { font-size: 18px; color: var(--text-2); margin: 0 0 24px; max-width: 34em; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); font-size: 14px; }
.checks li::before { content: "✓"; color: var(--good); font-weight: 700; margin-right: 7px; }

.signup-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .07); display: flex; flex-direction: column; gap: 14px;
}
.signup-card h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.signup-card p { margin: 0; }
.signup-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); min-width: 0; }
.signup-card input { padding: 9px 11px; font-size: 15px; }
.signup-card .error:empty { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fine { font-size: 13px; color: var(--text-2); text-align: center; }
.done-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
#signup-done:focus { outline: none; }

/* Dashboard preview */
.preview-section { padding: 8px 0 72px; }
.window {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--page);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .10);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--grid); }
.window-bar span { margin: 0 auto; font-size: 12px; color: var(--muted); padding-right: 51px; }
.window-body { padding: 20px; display: grid; gap: 16px; }
.mock-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mock-tiles div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.mock-tiles span { font-size: 12px; color: var(--text-2); }
.mock-tiles b { font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-tiles small { font-size: 13px; color: var(--muted); font-weight: 400; }
.mock-chart { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; position: relative; min-width: 0; }
.mock-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 10px; }
.mock-head span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-svg { width: 100%; height: 220px; display: block; overflow: visible; cursor: pointer; touch-action: pan-y; }
#mock-cpu .mock-svg { height: 130px; }
.mock-svg .grid { stroke: var(--grid); stroke-width: 1; }
/* CPU and the map, side by side under the traffic chart. */
.mock-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

/* Preview hover: the bar under the pointer swells from its base while the
   rest of the day steps back; a legend entry picks out one series. */
.mock-plot { position: relative; }
.mock-svg .col {
  transform-box: fill-box; transform-origin: 50% 100%;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.25), opacity .18s ease;
}
.mock-svg.hovering .col { opacity: .4; }
.mock-svg .col.on { opacity: 1; transform: scale(1.38, 1.03); }
.mock-svg .seg { transition: opacity .18s ease, filter .18s ease; }
.mock-svg .col.on .seg.hot { filter: brightness(1.12) saturate(1.1); }
.mock-svg .ghost { fill: var(--accent); opacity: .2; pointer-events: none; }
.mock-svg[data-focus="c0"] .seg:not(.c0), .mock-svg[data-focus="c1"] .seg:not(.c1),
.mock-svg[data-focus="c2"] .seg:not(.c2), .mock-svg[data-focus="c3"] .seg:not(.c3),
.mock-svg[data-focus="c4"] .seg:not(.c4), .mock-svg[data-focus="c5"] .seg:not(.c5),
.mock-svg[data-focus="c6"] .seg:not(.c6), .mock-svg[data-focus="c7"] .seg:not(.c7),
.mock-svg[data-focus="c8"] .seg:not(.c8) { opacity: .15; }
/* The card's outline and the line from the bar to it, in the color of the
   part picked out (--callout). */
.mock-tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 200px;
  background: var(--surface); border: 1px solid var(--callout, var(--axis)); border-radius: 8px;
  box-shadow: 0 0 0 1px var(--callout, transparent), 0 4px 16px rgba(0, 0, 0, .12);
  padding: 8px 10px; font-size: 12px; line-height: 1.5; color: var(--text);
  transition: left .1s ease-out, top .1s ease-out;
}
.mock-callout { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; display: none; }
.mock-callout.on { display: block; }
.mock-callout line { stroke: var(--callout, var(--muted)); stroke-width: 1.5; stroke-linecap: round; }
.mock-callout circle { fill: var(--callout, var(--muted)); stroke: var(--surface); stroke-width: 1.5; }
.mock-tip .t { font-weight: 600; margin-bottom: 4px; }
.mock-tip .r, .mock-tip .tot { display: flex; justify-content: space-between; gap: 16px; }
.mock-tip .r { padding: 0 4px; margin: 0 -4px; border-radius: 4px; }
.mock-tip .r.hot { background: var(--accent-wash); font-weight: 600; }
.mock-tip .r span:last-child, .mock-tip .tot span:last-child { font-weight: 550; font-variant-numeric: tabular-nums; }
.mock-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.mock-tip .tot { border-top: 1px solid var(--grid); margin-top: 4px; padding-top: 4px; }
.mock-tip .foot { color: var(--muted); margin-top: 4px; }
.mock-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.preview-caption { text-align: center; color: var(--text-2); font-size: 14px; margin: 18px auto 0; max-width: 46em; }
@media (prefers-reduced-motion: reduce) {
  .mock-svg .col, .mock-svg .seg, .mock-tip { transition: none; }
}
.c0 { fill: var(--other); background: var(--other); }
.c1 { fill: var(--s1); background: var(--s1); }
.c2 { fill: var(--s2); background: var(--s2); }
.c3 { fill: var(--s3); background: var(--s3); }
.c4 { fill: var(--s4); background: var(--s4); }
.c5 { fill: var(--s5); background: var(--s5); }
.c6 { fill: var(--s6); background: var(--s6); }
.c7 { fill: var(--s7); background: var(--s7); }
.c8 { fill: var(--s8); background: var(--s8); }
/* A gray machine's flowing dots, darker than its dot. */
.cg { fill: var(--text-2); opacity: .6; }

/* The map of traffic between devices: a dot per machine, a curved line each
   way, dots flowing from the sender. Machines not in the CPU chart are gray
   and named when pointed at. */
.mock-map-box { position: relative; }
.mock-map { width: 100%; height: 210px; display: block; overflow: visible; }
.mock-map .way { fill: none; stroke: var(--muted); transition: opacity .2s ease, stroke-width .2s ease; }
.mock-map .node { transition: opacity .2s ease; }
.mock-map .node circle { stroke: var(--surface); stroke-width: 1.5; }
.mock-map .node text { font-size: 10px; fill: var(--text-2); }
.mock-map .node:not(.named) text { opacity: 0; transition: opacity .15s; }
.mock-map .node:hover text { opacity: 1; }
.mock-moment {
  position: absolute; left: 0; top: -2px; max-width: 100%; font-size: 11.5px; color: var(--text-2);
  background: var(--surface); padding: 1px 6px 1px 0; border-radius: 4px;
}
.mock-moment[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mock-map .way, .mock-map .node { transition: none; }
}

/* The pinned moment, at the foot of the window as at the foot of the
   dashboard. It keeps its room unpinned, so nothing moves. */
.mock-pin {
  justify-self: center; display: flex; align-items: center; gap: 10px; max-width: 100%; visibility: hidden;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 6px 4px 14px;
  font-size: 12.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); min-height: 32px;
}
.mock-pin.on { visibility: visible; }
.mock-pin .what { color: var(--text-2); white-space: nowrap; }
.mock-pin .what i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.mock-pin .x { cursor: pointer; color: var(--text-2); font-size: 16px; line-height: 1; padding: 3px 8px; border-radius: 999px; }
.mock-pin .x:hover { background: var(--surface-2); color: var(--text); }
.mock-legend { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 8px -6px 0; font-size: 12px; color: var(--text-2); }
.mock-legend span { padding: 2px 6px; border-radius: 5px; cursor: default; transition: background .15s, color .15s; }
.mock-legend span.on { background: var(--accent-wash); color: var(--text); }
.mock-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 12px; max-width: 22em; }
.section-lead { color: var(--text-2); font-size: 17px; margin: 0 0 40px; max-width: 36em; }
.section h3 { font-size: 16px; margin: 0 0 6px; }
.section p { margin: 0; color: var(--text-2); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.features article { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.ficon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-wash); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.ficon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.how { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.how .num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 650; font-size: 15px; margin-bottom: 14px;
}
.how pre { margin-top: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 32px; }
.trust > div { border-top: 2px solid var(--accent); padding-top: 16px; }
.reqs { margin-top: 36px !important; font-size: 14px; }

.cta { padding: 80px 0; text-align: center; background: var(--accent-wash); border-top: 1px solid var(--border); }
.cta h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.015em; margin: 0 0 8px; }
.cta p { color: var(--text-2); margin: 0 0 24px; }

.site-foot { padding: 28px 0; border-top: 1px solid var(--border); font-size: 14px; }
.foot-inner { display: flex; align-items: center; gap: 20px; }
.foot-inner a { margin-left: auto; }

@media (max-width: 960px) {
  .hero { padding: 44px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { grid-template-columns: 1fr; gap: 28px; max-width: 640px; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-links { display: none; }
  .mock-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-inner { gap: 12px; }
  .site-actions .btn { padding: 6px 10px; }
  .row2 { grid-template-columns: 1fr; }
  .signup-card { padding: 22px 18px; }
  .features, .trust { grid-template-columns: 1fr; }
  .mock-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .window-body { padding: 12px; }
  #mock-traffic .mock-svg { height: 160px; }
  .section, .cta { padding: 56px 0; }
}
