/* NetBlade product page styles. Colours follow the app's dark theme (netblade/ui/theme.py). */

:root {
  --bg: #0a0a0b;
  --sidebar: #0f0f10;
  --page: #141415;
  --card: #19191b;
  --raised: #232325;
  --line: rgba(237, 237, 237, 0.08);
  --line-strong: rgba(237, 237, 237, 0.14);
  --text: #ededed;
  --text-2: #a1a1a6;
  --muted: #85858b;
  --accent: #6b9bff;
  --accent-soft: rgba(107, 155, 255, 0.16);
  --pos: #4cc38a;
  --warn: #e5a00d;
  --neg: #e5484d;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Roboto, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
code { font: 0.9em var(--mono); color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--pos); }
.warn { color: var(--warn); }
.accent { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 32px; }

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  font: 500 12px/18px var(--mono);
  color: var(--text-2);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  font-weight: 500;
  font-size: 15px;
  color: var(--bg);
  background: var(--text);
  border-radius: 10px;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: #d4d4d6; }
.btn:active { transform: scale(0.98); }
.btn-ghost { color: var(--text); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--card); }
.btn-small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav-links a { transition: color 160ms var(--ease); }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding-top: 80px; }
.rings {
  position: absolute;
  top: -220px;
  right: -260px;
  width: 1000px;
  height: 1000px;
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  pointer-events: none;
}
.rings line { stroke: var(--line-strong); }
.hero-text { position: relative; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.16); }
h1 {
  margin-top: 20px;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.lede { margin-top: 24px; max-width: 560px; font-size: 18px; color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.meta { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* App window preview */
.window {
  position: relative;
  margin-top: 64px;
  margin-bottom: -1px;
  background: var(--sidebar);
  border: 1px solid var(--line-strong);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.5);
}
.titlebar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tl { width: 11px; height: 11px; border-radius: 50%; background: var(--raised); }
.titlebar .title { margin: 0 auto; padding-right: 54px; font-size: 12px; color: var(--muted); }
.app { display: grid; grid-template-columns: 216px 1fr; min-height: 560px; }
.sidebar { padding: 16px 12px; border-right: 1px solid var(--line); }
.sb-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 16px; font-size: 14px; font-weight: 600; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { height: 32px; margin-bottom: 2px; padding: 0 10px; font-size: 13px; line-height: 32px; color: var(--text-2); border-radius: 8px; }
.sidebar li.active { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }

.page { padding: 20px 24px 28px; background: var(--page); min-width: 0; }
.toolbar { display: flex; gap: 8px; }
.field, .select, .btn-app { height: 32px; padding: 0 12px; font-size: 13px; line-height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); }
.field { flex: 1; max-width: 360px; background: var(--card); }
.select { color: var(--text-2); background: var(--card); }
.btn-app { color: var(--bg); background: var(--text); border-color: transparent; font-weight: 500; }
.summary { margin-top: 16px; font-size: 13px; color: var(--text-2); }
.summary span:first-child { color: var(--text); }

.chart { position: relative; margin-top: 12px; padding: 12px 12px 8px 44px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.chart-head { display: flex; justify-content: space-between; margin: 0 0 12px -32px; font-size: 12px; color: var(--muted); }
#chart-last { color: var(--accent); }
#chart { display: block; width: 100%; height: 140px; overflow: visible; }
#chart .grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
#chart .line { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#chart .area { fill: var(--accent-soft); opacity: 0.6; }
#chart .loss { stroke: var(--neg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.plot { position: relative; }
.chart-axis { position: absolute; inset: 0 auto 0 -36px; width: 28px; font-size: 11px; color: var(--muted); }
.chart-axis span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; }

.hops { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 12.5px; }
.hops th { padding: 0 8px 8px; font-weight: 400; color: var(--muted); text-align: right; border-bottom: 1px solid var(--line); }
.hops td { height: 34px; padding: 0 8px; text-align: right; color: var(--text-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.hops th:first-child, .hops td:first-child { width: 28px; text-align: right; color: var(--muted); }
.hops .host { text-align: left; width: 40%; }
.hops td.host { color: var(--text); overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.hops td.host .ip { color: var(--muted); margin-left: 8px; }
.hops .noreply td { color: var(--muted); }
.hops .sel td { background: var(--accent-soft); }
.hops .range-h { width: 120px; text-align: left; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 0; }
.pos-bg { background: var(--pos); }
.warn-bg { background: var(--warn); }
.neg-bg { background: var(--neg); }
.off-bg { background: #5c5c61; }
.range { position: relative; display: block; height: 4px; width: 100%; background: var(--raised); border-radius: 2px; }
.range i { position: absolute; top: 0; height: 4px; background: #5c5c61; border-radius: 2px; }
.range b { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--text); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--line); position: relative; }
.principles h3 { font-size: 16px; font-weight: 600; }
.principles p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Sections */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--text-2); }
.section-head kbd { vertical-align: 1px; }

/* Feature panels */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.feature { display: flex; flex-direction: column; gap: 24px; padding: 28px; background: var(--sidebar); border: 1px solid var(--line); border-radius: 16px; }
.feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 320px 1fr; grid-template-rows: auto 1fr; column-gap: 32px; row-gap: 16px; }
.feature-wide .feature-text { grid-row: 1 / 3; }
.features > *, .feature > * { min-width: 0; }
.kicker { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.kicker kbd { font-size: 11px; line-height: 16px; min-width: 20px; padding: 0 5px; }
.kicker kbd + kbd { margin-right: 6px; }
.feature h3 { margin-top: 16px; font-size: 22px; letter-spacing: -0.015em; }
.feature-text > p:last-child { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Multi-ping tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { padding: 12px 14px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); transition: background-color 400ms var(--ease), border-color 400ms var(--ease); }
.tile .t-ms { white-space: nowrap; }
.tile .t-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile .t-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .t-ms { font: 500 13px var(--mono); font-variant-numeric: tabular-nums; }
.tile .t-ip { margin-top: 2px; font: 12px var(--mono); color: var(--muted); }
.tile .t-state { margin-top: 6px; font: 11.5px var(--mono); color: var(--text-2); }
.tile .bars { display: flex; align-items: flex-end; gap: 2px; height: 20px; margin-top: 8px; }
.tile .bars i { flex: 1; min-height: 2px; border-radius: 1px; background: currentColor; opacity: 0.85; }
.tile .bars i.lost { height: 2px !important; opacity: 0.35; }
.tile.up { color: var(--pos); background: rgba(76, 195, 138, 0.07); border-color: rgba(76, 195, 138, 0.22); }
.tile.unstable { color: var(--warn); background: rgba(229, 160, 13, 0.08); border-color: rgba(229, 160, 13, 0.28); }
.tile.down { color: var(--neg); background: rgba(229, 72, 77, 0.08); border-color: rgba(229, 72, 77, 0.28); }
.tile .t-name, .tile .t-ip { color: var(--text); }
.tile .t-ip { color: var(--muted); }
.log { padding: 10px 14px; height: 76px; overflow: hidden; font-size: 12px; line-height: 18px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log b { font-weight: 400; color: var(--text-2); }

/* curl timing */
.curl, .cert { margin-top: auto; }
.cmd { padding: 10px 12px; font-size: 12.5px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { margin-top: 16px; font-size: 13px; color: var(--muted); }
.timing { display: flex; gap: 2px; height: 28px; margin-top: 12px; }
.timing div { position: relative; background: var(--raised); border-radius: 4px; min-width: 6px; }
.timing div.slow { background: var(--accent); }
.timing span { position: absolute; left: 8px; top: 0; font-size: 11.5px; line-height: 28px; color: var(--text-2); white-space: nowrap; }
.timing div:not(.slow) span { display: none; }
.timing div.slow span { color: #0a0a0b; font-weight: 500; }
.timing-values { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* TLS */
.validity { height: 6px; margin-top: 16px; background: var(--raised); border-radius: 3px; overflow: hidden; }
.validity-fill { height: 100%; background: var(--warn); border-radius: 3px; }
.validity-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.versions { margin: 16px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); }
.versions li { height: 28px; line-height: 28px; border-top: 1px solid var(--line); }

/* Tool grid */
.toolgrid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 56px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.toolgrid li { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color 160ms var(--ease); }
.toolgrid li:hover { background: var(--sidebar); }
/* Fills the rest of the last row: 13 tools leave 3 cells at 4 columns, 1 cell at 2 columns. */
.toolgrid .reorder { grid-column: span 3; }
.toolgrid .keys { display: flex; gap: 4px; height: 22px; font-size: 12px; }
.toolgrid h4 { margin-top: 16px; font-size: 16px; }
.toolgrid li > p:last-child { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* Download */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.platform { display: flex; flex-direction: column; padding: 28px; background: var(--sidebar); border: 1px solid var(--line); border-radius: 16px; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.platform:hover { background: var(--card); border-color: var(--line-strong); }
.platform.detected { border-color: rgba(107, 155, 255, 0.5); }
.platform .os { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.platform .arch { margin-top: 4px; font-size: 13px; color: var(--muted); }
.platform .note { margin-top: 20px; font-size: 14px; line-height: 1.5; color: var(--text-2); flex: 1; }
.platform .go { margin-top: 24px; font-size: 14px; color: var(--text); }
.platform.detected .go { color: var(--accent); }
.fineprint { margin-top: 32px; font-size: 14px; color: var(--muted); }
.fineprint a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.fineprint a:hover { color: var(--text); }

/* Footer */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.footer-inner nav { display: flex; gap: 20px; margin-left: auto; color: var(--text-2); }
.footer-inner nav a:hover { color: var(--text); }

/* Load entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .window { animation: rise 600ms var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 60ms; }
  .hero-text > :nth-child(3) { animation-delay: 120ms; }
  .hero-text > :nth-child(4), .hero-text > :nth-child(5) { animation-delay: 180ms; }
  .window { animation-delay: 260ms; animation-duration: 800ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Responsive */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hide-m { display: none; }
  .feature-wide { grid-template-columns: minmax(0, 1fr); }
  .feature-wide .feature-text { grid-row: auto; }
  .toolgrid { grid-template-columns: repeat(2, 1fr); }
  .toolgrid .reorder { grid-column: auto; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .nav-links { display: none; }
  .btn-small { margin-left: auto; }
  .hero { padding-top: 56px; }
  .lede { font-size: 17px; }
  .window { margin-top: 48px; }
  .app { min-height: 0; }
  .page { padding: 16px 12px 20px; }
  .select { display: none; }
  .hide-s { display: none; }
  .hops td.host .ip { display: none; }
  .principles { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
  .section { padding: 72px 0; }
  .features { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .feature { padding: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 10px 10px 8px; }
  .tile .t-state { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toolgrid { grid-template-columns: 1fr; margin-top: 40px; }
  .platforms { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-inner nav { margin-left: 0; }
  .rings { width: 640px; height: 640px; top: -160px; right: -300px; }
}
