/* The look of every page of the site, the landing page and the docs pages alike. The light values are the base; the
   dark ones are the product's own (src/app/globals.css). The page runs no script, so the scheme follows the reader's
   system alone. */

/* The product's three families, served from the site with their licences beside them, latin letters only. They are
   the files of the @fontsource packages package.json pins; e2e/site/fonts.spec.ts fails when the two differ. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/space-grotesk/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Until a font has loaded, and wherever one is blocked, the system's own takes its place. */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --bg: #f6f8fb;
  --band: #edf1f6;
  --surface: #ffffff;
  --raised: #eef2f7;
  --line: #d6dde7;
  --line-strong: #b4c0d0;
  --text: #0e1420;
  --muted: #3b475c;
  --subtle: #56637a;
  --accent: #0b5fb8;
  --accent-hover: #084a8f;
  --accent-tint: #e3eefb;
  --apply: #b5690a;
  --frame-line: #c9d3e0;
  --frame-shadow: 0 1px 2px rgb(14 20 32 / 6%), 0 28px 56px -28px rgb(14 20 32 / 38%);
  --topbar-bg: rgb(246 248 251 / 88%);

  /* Terminal blocks and picture frames stay dark in both looks, as the product is. */
  --term-bg: #0b111b;
  --term-line: #2c3a52;
  --term-text: #d5deeb;
  --term-dim: #8d9db6;
  --term-accent: #6cb6ff;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1420;
    --band: #0b111b;
    --surface: #121a28;
    --raised: #1b2537;
    --line: #2c3a52;
    --line-strong: #3a4b69;
    --text: #e8edf5;
    --muted: #c3cfe0;
    --subtle: #9aabc4;
    --accent: #6cb6ff;
    --accent-hover: #9ccbff;
    --accent-tint: #16253d;
    --apply: #ffb454;
    --frame-line: #3a4b69;
    --frame-shadow: 0 28px 56px -28px rgb(0 0 0 / 70%);
    --topbar-bg: rgb(14 20 32 / 88%);
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure, pre, blockquote { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, pre { font-family: var(--font-mono); }
/* What the page scrolls to stops below the top bar, not under it: a heading the address names, and an element that
   takes focus, which the browser scrolls to the top edge when focus moves back up the page. */
html { scroll-padding-top: 80px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 40; padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
.skip:focus { left: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text);
  font: 500 15px/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--raised); color: var(--text); }
.btn svg { flex: none; }
.star { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

/* Top bar. Its links stay in the bar at every width, so a phone reaches them with no menu and no script. */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); background: var(--topbar-bg); border-bottom: 1px solid var(--line); }
/* On a short screen, such as a laptop's at 400% zoom, a bar that stays would take a third of it: there it scrolls away
   with the page, and nothing is drawn under it, so what the page scrolls to needs no room for it. */
@media (max-height: 480px) {
  .topbar { position: static; }
  html { scroll-padding-top: 0; }
}
@supports (backdrop-filter: blur(1px)) { .topbar { backdrop-filter: saturate(140%) blur(12px); } }
.topbar__inner { display: flex; align-items: center; gap: 8px; height: 64px; }
.brand { font: 600 22px/1 var(--font-display); letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.topnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.topnav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.topnav a:hover { color: var(--text); background: var(--raised); }
.topbar__star { flex: none; }
/* Below 600 px the star button shows its star alone, and keeps its words for a screen reader: with the text spacing a
   reader may set, its words would push the bar wider than the screen up to there. Below 360 px the top links sit
   closer, for the same reason. */
@media (max-width: 599.98px) {
  .topbar__star { width: 44px; padding: 0; }
  .topbar__star-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 359.98px) { .topnav a { padding: 0 6px; } }
@media (min-width: 480px) {
  .topbar__inner { gap: 16px; }
  .topnav { gap: 4px; }
  .topnav a { padding: 0 12px; }
}

/* Sections of the landing page */
.section { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.section--band { background: var(--band); }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.75rem, 1.15rem + 2.2vw, 2.625rem); line-height: 1.12; letter-spacing: -0.02em; }
.lead { margin-top: 16px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; color: var(--muted); }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 104px); }
.hero h1 {
  max-width: 17.5em;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.hero__sub { margin-top: 20px; font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; }
.hero__actions .cmd { flex: 1 1 520px; max-width: 920px; }
.hero__note { margin-top: 12px; font-size: 15px; color: var(--subtle); }

/* A command. One click selects all of it, without the prompt, ready to copy. */
.cmd { min-width: 0; padding: 8px 16px; border: 1px solid var(--term-line); border-radius: 10px; background: var(--term-bg); }
.cmd pre { padding: 8px 0; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--term-text); white-space: pre-wrap; }
@media (min-width: 640px) { .cmd pre { font-size: 13.5px; } }
.cmd code { -webkit-user-select: all; user-select: all; }
/* A command breaks only between its parts, never inside a flag such as --create-namespace. */
.nb { white-space: nowrap; }
.cmd__prompt { color: var(--term-dim); -webkit-user-select: none; user-select: none; }

/* The demo video on the first screen, and the steps it shows under it. */
.hero-shot { margin-top: clamp(40px, 5vw, 56px); }
.hero-shot__frame {
  aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--frame-line); border-radius: 14px; background: var(--term-bg); box-shadow: var(--frame-shadow);
}
.hero-shot__frame video { display: block; width: 100%; height: auto; }
/* The frame cuts off what is drawn outside the video, the focus mark too, so the frame draws it. */
.hero-shot__frame:has(video:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero-shot__steps { max-width: 46rem; margin-top: 20px; font-size: 15px; color: var(--muted); }
.hero-shot__steps ol { margin-top: 8px; padding-left: 1.4em; }
.hero-shot__steps li + li { margin-top: 4px; }

/* The views */
.views { display: grid; gap: clamp(56px, 8vw, 104px); }
.view h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; }
.view__text p { margin-top: 10px; color: var(--muted); max-width: 34rem; }
.view__text p + p { margin-top: 6px; }
.shot {
  margin-top: 24px; overflow: hidden;
  border: 1px solid var(--frame-line); border-radius: 12px; background: var(--bg); box-shadow: var(--frame-shadow);
}
.shot img { width: 100%; }
/* Close crops: the app's views column is cut, so a map reads at half the page's width. Each crop is set for today's
   pictures and needs a look when they are taken again. */
.shot--map, .shot--traffic { aspect-ratio: 1 / 1; }
.shot--map img { width: 160%; max-width: none; margin-left: -25.5%; }
.shot--traffic img { width: 119%; max-width: none; margin-left: -19%; }
.shot--outbound, .shot--findings { aspect-ratio: 16 / 10; }
.shot--outbound img, .shot--findings img { width: 120%; max-width: none; margin-left: -19.8%; }
.view--wide { display: grid; gap: 0 56px; }
@media (min-width: 960px) {
  .view--wide { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; }
  .view--wide .shot { margin-top: 0; }
}
.views__pair { display: grid; gap: 64px 40px; }
@media (min-width: 860px) {
  /* The two cards of a pair share their rows, so both pictures start at the same height. */
  .views__pair { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; row-gap: 0; }
  .views__pair .view { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
}

/* What it reads */
.trust { display: grid; gap: 48px 56px; }
@media (min-width: 1000px) { .trust { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.promises { display: grid; gap: 32px; list-style: none; padding: 0; }
@media (min-width: 600px) and (max-width: 999px) { .promises { grid-template-columns: 1fr 1fr; } }
.promise { padding-top: 18px; border-top: 1px solid var(--line-strong); }
.promise h3 { font-size: 1.1875rem; line-height: 1.3; }
.promise p { margin-top: 8px; font-size: 16px; color: var(--muted); }
.role { min-width: 0; overflow: hidden; border: 1px solid var(--term-line); border-radius: 12px; background: var(--term-bg); }
.role figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--term-line); color: var(--term-dim); font-size: 13px; }
.role figcaption b { color: var(--term-text); font-weight: 500; }
.role figcaption code { font-size: 12px; overflow-wrap: anywhere; }
.role pre { padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--term-text); }
.role pre:focus-visible { outline-color: var(--term-accent); outline-offset: -2px; }
.y-key { color: var(--term-dim); }
.y-verbs { color: var(--term-accent); }

/* How it works */
.diagram__stage { padding: clamp(16px, 3vw, 40px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
/* One drawing for each width: the stage shows the tall one up to 1200 px and the wide one from there. Below 1200 px the
   wide one would draw its smallest labels smaller than the tall one does on a phone (7.7 px at 820). */
.diagram__wide, .diagram__tall { width: 100%; height: auto; }
.diagram__tall { display: block; max-width: 420px; margin-inline: auto; }
.diagram__wide { display: none; }
@media (min-width: 1200px) { .diagram__wide { display: block; } .diagram__tall { display: none; } }
/* The front cluster's outline shows what sits inside each cluster, so it stands out 3:1 from the stage at least. It is
   1.5 screen pixels wide at every size: a narrow screen shows the tall drawing smaller than its own size, and a thinner
   line falls between pixels and is blended into the stage (2.3:1 at 414 px); at 1.5 one pixel is always three
   quarters covered (3.7:1 at least, measured from 320 to 1440 px). */
.d-cluster { fill: var(--bg); stroke: var(--subtle); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.d-cluster--back { fill: var(--surface); stroke: var(--line); }
.d-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.d-node--you { fill: transparent; stroke: var(--subtle); stroke-dasharray: 5 4; }
.d-node--atlas { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 2; }
.d-name { font: 600 17px var(--font-display); fill: var(--text); }
.d-name--atlas { font-size: 21px; }
.d-label { font: 500 15px var(--font-sans); fill: var(--text); }
.d-sub { font: 400 12px var(--font-mono); fill: var(--subtle); }
.d-edge { font: 400 12px var(--font-mono); fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 6px; stroke-linejoin: round; }
.d-read { fill: none; stroke: var(--accent); stroke-width: 2; }
.d-write { fill: none; stroke: var(--apply); stroke-width: 3.5; }
.d-store { fill: none; stroke: var(--subtle); stroke-width: 1.5; }
.d-you { fill: none; stroke: var(--subtle); stroke-width: 1.5; }
.mk-read { fill: var(--accent); }
.mk-write { fill: var(--apply); }
.mk-store { fill: var(--subtle); }
.legend { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 24px; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend svg { flex: none; }
.how-note { max-width: 46rem; margin-top: 32px; color: var(--muted); }

/* Install */
.steps { display: grid; gap: 40px; padding: 0; list-style: none; counter-reset: step; }
.step { display: grid; gap: 16px 48px; counter-increment: step; }
@media (min-width: 900px) { .step { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; } }
.step h3 { display: flex; align-items: center; gap: 14px; font-size: 1.25rem; line-height: 1.3; }
.step h3::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line-strong); border-radius: 50%; font: 500 14px/1 var(--font-mono); color: var(--muted);
}
.step p { margin-top: 8px; padding-left: 46px; color: var(--muted); font-size: 16px; }
.after-install { max-width: 46rem; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }

/* Questions */
.faq { display: grid; max-width: 1040px; }
.faq__item { display: grid; gap: 8px 56px; padding-block: 28px; border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .faq__item { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.faq h3 { font-size: 1.1875rem; line-height: 1.35; }
.faq p { color: var(--muted); }

/* A docs page: one column of text, short enough to read without losing the line. Code blocks and tables scroll inside
   their own box rather than widen the page. */
.doc { padding-block: clamp(32px, 5vw, 56px) clamp(64px, 9vw, 104px); }
.prose { max-width: 46rem; overflow-wrap: break-word; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
.prose h2 { margin-top: 56px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem); line-height: 1.2; letter-spacing: -0.015em; }
.prose h3 { margin-top: 36px; font-size: 1.25rem; line-height: 1.3; }
.prose h4 { margin-top: 28px; font-family: var(--font-sans); font-size: 1.0625rem; }
.prose :is(p, ul, ol, pre, table, blockquote, nav) { margin-top: 16px; }
.prose h1 + * { margin-top: 20px; }
.prose :is(h2, h3, h4) + * { margin-top: 12px; }
.prose :is(ul, ol) { padding-left: 1.4em; }
.prose li + li, .prose li > :is(ul, ol, p) { margin-top: 6px; }
.prose :is(strong, b, th) { font-weight: 600; }
.prose blockquote { padding-left: 16px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.prose code { padding: .12em .36em; border-radius: 5px; background: var(--raised); font-size: .875em; }
.prose pre {
  padding: 14px 16px; overflow-x: auto; overflow-wrap: normal;
  border: 1px solid var(--term-line); border-radius: 10px; background: var(--term-bg); color: var(--term-text);
  font-size: 13.5px; line-height: 1.6;
}
.prose pre:focus-visible { outline-offset: 2px; }
.prose pre code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose :is(th, td) { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--raised); }
/* The list of a long page's sections, under its title. */
#TableOfContents { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 15px; }
#TableOfContents ul { margin: 0; padding-left: 1.1em; list-style: none; }
#TableOfContents > ul { padding-left: 0; }
#TableOfContents li { margin-top: 4px; }
#TableOfContents a { text-decoration: none; }
#TableOfContents a:hover { text-decoration: underline; }

/* Footer */
.footer { padding-block: 48px; border-top: 1px solid var(--line); background: var(--band); font-size: 15px; }
/* On a phone the credit and the two lists are stacked, each as wide as the screen, so the longest page name, What
   netatlas does not do yet, fits one line; from 860 px they sit side by side, with room for it still. */
.footer__inner { display: grid; gap: 32px 48px; }
@media (min-width: 860px) {
  .footer__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); }
}
.footer__about p { margin-top: 12px; max-width: 30rem; color: var(--muted); }
.footer__label { color: var(--text); font-weight: 600; }
.footer__links { display: grid; margin-top: 6px; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; align-items: center; min-height: 40px; padding-block: 8px; line-height: 1.35; color: var(--muted); text-decoration: none; font-weight: 500; }
.footer__links a:hover { color: var(--text); text-decoration: underline; }

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