/*
 * mac.nepselytics.app — shares the Nepselytics dashboard's design system:
 * slate/zinc neutrals, teal primary, Plus Jakarta headings, Inter body,
 * JetBrains Mono for numbers and commands. Light by default, .dark on <html>.
 */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-fg: #ffffff;
  --primary-soft: rgba(13, 148, 136, 0.1);
  --success: #10b981;
  --destructive: #ef4444;

  /* The desk and terminal are dark objects in both themes, like the app's own dark UI. */
  --desk: #070b0a;
  --term: #0b0f0e;
  --term-text: #e5e7eb;
  --term-muted: #7c8a86;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-lg: 0 24px 48px -24px rgb(15 23 42 / 0.28), 0 2px 6px rgb(15 23 42 / 0.06);
  --shadow-xl: 0 40px 80px -32px rgb(15 23 42 / 0.45);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading: "Plus Jakarta Sans", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.dark {
  --bg: #0a0a0a;
  --surface: #171717;
  --surface-2: #121212;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --line: #262626;
  --line-strong: #3a3a3a;
  --primary: #14b8a6;
  --primary-hover: #2dd4bf;
  --primary-fg: #0a0a0a;
  --primary-soft: rgba(20, 184, 166, 0.13);
  --success: #22c55e;
  --destructive: #f87171;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 24px 48px -24px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 40px 80px -32px rgb(0 0 0 / 0.85);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: light;
}

.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--primary-soft);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.container {
  width: min(1152px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--heading);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.brand small {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85em;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.version-pill {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.icon-btn:hover {
  background: var(--line);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.icon-moon {
  display: none;
}

.dark .icon-sun {
  display: none;
}

.dark .icon-moon {
  display: inline;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-lg {
  height: 50px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Command line ---------- */

.command-line,
.term-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.command-line {
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.command-line code,
.term-line code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13.5px;
  scrollbar-width: none;
}

.prompt {
  font-family: var(--mono);
  color: var(--primary);
  font-weight: 600;
}

.copy-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: 500 12.5px/1 var(--sans);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.copy-btn[data-copied="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.copy-btn[data-copied="false"] {
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 104px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-sub {
  max-width: 34rem;
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-command {
  max-width: 34rem;
  margin-top: 20px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

.hero-meta > span:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 10px 2px -12px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: middle;
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
}

.hero-stat:hover {
  color: var(--primary);
}

.hero-stat[data-hidden="true"] {
  display: none;
}

.hero-stat svg {
  width: 14px;
  height: 14px;
}

.hero-stat strong {
  font-family: var(--mono);
  color: var(--text);
}

/* The Mac desk: shader wallpaper, menu bar, popover and widget. */
.desk {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 5 / 4.4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--desk);
  box-shadow: var(--shadow-xl);
  --mx: 0;
  --my: 0;
  --sy: 0;
}

.desk-wallpaper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.desk-menubar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  font-size: 1.55cqw;
}

.desk-popover,
.desk-widget {
  position: absolute;
  will-change: transform;
  transform: translate3d(calc(var(--mx) * var(--depth) * 1px), calc((var(--my) + var(--sy)) * var(--depth) * 1px), 0);
}

.desk-popover {
  --depth: 6;
  z-index: 1;
  top: 5.2cqw;
  right: 5cqw;
  width: 24em;
  font-size: 2.05cqw;
}

.desk-widget {
  --depth: 14;
  z-index: 3;
  left: 4cqw;
  bottom: 5cqw;
  width: 22.5em;
  font-size: 2.05cqw;
  animation: float 7s ease-in-out infinite;
}

.desk-caption {
  position: absolute;
  right: 3cqw;
  bottom: 2.4cqw;
  z-index: 3;
  font-size: 11px;
  color: rgb(255 255 255 / 0.45);
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -0.7em;
  }
}

/* ---------- Recreated macOS surfaces (sized in em) ---------- */

.mac-menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.1em;
  padding: 0 1em;
  background: rgb(10 10 12 / 0.55);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  color: rgb(255 255 255 / 0.9);
  font-family: var(--sans);
  font-weight: 500;
  white-space: nowrap;
}

.mb-left,
.mb-right {
  display: flex;
  align-items: center;
  gap: 1.1em;
}

.mb-app {
  font-weight: 700;
}

.mb-item {
  padding: 0.18em 0.6em;
  border-radius: 0.45em;
  font-variant-numeric: tabular-nums;
}

.mb-item.is-down {
  background: rgb(255 69 58 / 0.28);
}

.mb-item.is-up {
  background: rgb(48 209 88 / 0.26);
}

.mb-item b {
  margin-left: 0.35em;
  font-weight: 600;
}

.mb-item.is-down b {
  color: #ff8a82;
}

.mb-item.is-up b {
  color: #7ee29a;
}

.mb-icon {
  width: 1.15em;
  height: 1.15em;
}

.mb-battery {
  width: 1.6em;
}

.mac-panel {
  color: #f2f2f7;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  background: rgb(30 30 32 / 0.8);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.6), 0 1.6em 3.2em -1em rgb(0 0 0 / 0.75);
}

.mac-panel p {
  margin: 0;
}

.mac-panel .is-up {
  color: #30d158;
}

.mac-panel .is-down {
  color: #ff453a;
}

.tri {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  vertical-align: 0;
}

.chart-area {
  opacity: 0.18;
}

.is-down .chart-area,
.is-down.chart-area {
  fill: #ff453a;
}

.is-up .chart-area {
  fill: #30d158;
}

.chart-line {
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.is-down .chart-line {
  stroke: #ff453a;
}

.is-up .chart-line {
  stroke: #30d158;
}

.chart-grid {
  stroke: rgb(255 255 255 / 0.07);
  stroke-width: 1;
}

.chart-ref {
  stroke: rgb(255 255 255 / 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.js [data-reveal].is-visible .chart-line,
.js .rise .chart-line {
  animation: draw 1.8s var(--ease) 0.5s both;
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
}

/* Popover */
.mac-popover {
  padding: 1em 1.15em 0.8em;
  border-radius: 1em;
}

.pop-head,
.pop-status,
.pop-foot {
  display: flex;
  align-items: center;
}

.pop-head {
  justify-content: space-between;
  font-size: 0.78em;
}

.pop-title {
  font-weight: 700;
  color: rgb(235 235 245 / 0.6);
  letter-spacing: 0.02em;
}

.pop-status {
  gap: 0.6em;
  color: rgb(235 235 245 / 0.45);
}

.pop-badge {
  padding: 0.15em 0.55em;
  border-radius: 0.4em;
  background: rgb(255 255 255 / 0.1);
  color: rgb(235 235 245 / 0.75);
  font-weight: 700;
  font-size: 0.92em;
}

.pop-picker {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin-top: 0.8em;
  font-size: 0.82em;
  color: rgb(235 235 245 / 0.65);
}

.pop-picker svg {
  width: 0.9em;
  height: 0.9em;
}

.pop-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-top: 0.1em;
  padding-bottom: 0.9em;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.pop-value {
  font-size: 2.35em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pop-change {
  font-size: 0.9em;
  font-weight: 500;
}

.pop-chart {
  flex: 1;
  max-width: 9em;
  height: 3em;
}

.pop-breadth {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.8em 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  text-align: center;
}

.pop-breadth strong {
  display: block;
  font-size: 1.15em;
  font-weight: 600;
}

.pop-breadth span {
  font-size: 0.72em;
  color: rgb(235 235 245 / 0.55);
}

.pop-tabs {
  display: flex;
  gap: 0.35em;
  margin: 0.8em 0 0.3em;
  font-size: 0.8em;
  color: rgb(235 235 245 / 0.55);
}

.pop-tabs span {
  padding: 0.3em 0.65em;
  border-radius: 0.5em;
}

.pop-tabs .is-active {
  background: rgb(255 255 255 / 0.1);
  color: #f2f2f7;
  font-weight: 600;
}

.pop-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pop-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 4em 4.2em;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  font-size: 0.82em;
}

.pop-name {
  min-width: 0;
}

.pop-name strong {
  display: block;
  font-weight: 600;
}

.pop-name span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.82em;
  color: rgb(235 235 245 / 0.45);
}

.pop-ltp,
.pop-num {
  font-family: var(--mono);
  font-size: 0.95em;
  text-align: right;
}

.pop-foot {
  justify-content: space-between;
  padding-top: 0.7em;
  font-size: 0.8em;
  color: rgb(235 235 245 / 0.6);
}

.pop-foot span {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.pop-foot svg {
  width: 1.05em;
  height: 1.05em;
}

/* Widget */
.mac-widget {
  padding: 1em 1.15em 0.9em;
  border-radius: 1.35em;
}

.wid-head {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

.wid-title {
  font-weight: 700;
  font-size: 1em;
}

.wid-sub {
  font-size: 0.75em;
  color: rgb(235 235 245 / 0.5);
}

.wid-change {
  text-align: right;
  font-weight: 600;
  font-size: 0.9em;
}

.wid-change p + p {
  font-size: 0.85em;
  font-weight: 500;
}

.wid-body {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 1em;
  margin-top: 0.5em;
}

.wid-stats dl {
  display: grid;
  gap: 0.15em;
  margin: 0;
  font-size: 0.78em;
}

.wid-stats dl div {
  display: flex;
  justify-content: space-between;
}

.wid-stats dt {
  color: rgb(235 235 245 / 0.6);
}

.wid-stats dd {
  margin: 0;
}

.wid-value {
  margin-top: 0.45em !important;
  font-size: 1.95em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wid-chart-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.wid-chart {
  width: 100%;
  height: 5.2em;
}

.wid-times {
  display: flex;
  justify-content: space-around;
  margin-top: 0.25em;
  font-size: 0.65em;
  color: rgb(235 235 245 / 0.4);
}

/* ---------- Sections ---------- */

.section {
  padding: 112px 0;
  border-top: 1px solid var(--line);
}

.section-alt {
  background: color-mix(in srgb, var(--surface-2) 55%, var(--bg));
}

.section-head {
  max-width: 40rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.6rem);
  line-height: 1.12;
}

.section-head p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--muted);
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Video ---------- */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 960px;
  margin: 48px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0b0d10;
  box-shadow: var(--shadow-xl);
}

.video-frame iframe,
.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-play {
  padding: 0;
  cursor: pointer;
  background: none;
}

.video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease), filter 300ms ease;
}

.video-play:hover img {
  transform: scale(1.02);
  filter: brightness(0.9);
}

.video-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 22%, transparent), 0 18px 40px -12px rgb(0 0 0 / 0.6);
  transform: translate(-50%, -50%);
  transition: transform 200ms var(--ease);
}

.video-play:hover .video-btn {
  transform: translate(-50%, -50%) scale(1.06);
}

.video-btn svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
}

/* ---------- Product bento ---------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 48px;
}

.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.tile:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: var(--shadow-lg);
}

.tile-popover {
  grid-row: span 2;
}

.tile-media {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.tile-media-dark {
  background: var(--desk);
}

.tile-popover-ui {
  width: 24em;
  font-size: clamp(11px, 1.15vw, 14px);
  transition: transform 700ms var(--ease);
}

.tile-widget-ui {
  width: 22.5em;
  font-size: clamp(11px, 1.3vw, 16px);
  transition: transform 700ms var(--ease);
}

.tile-menubar-ui .mb-left {
  display: none;
}

.tile-menubar-ui {
  width: auto;
  max-width: 100%;
  font-size: clamp(12px, 1.5vw, 17px);
  border-radius: 0.6em;
  border: 1px solid rgb(255 255 255 / 0.08);
  transition: transform 700ms var(--ease);
}

.tile:hover .tile-popover-ui,
.tile:hover .tile-widget-ui,
.tile:hover .tile-menubar-ui {
  transform: translateY(-4px);
}

.tile-media-strip {
  padding: 48px 28px;
}

.sample-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.tile-copy {
  padding: 22px 24px 26px;
}

.tile-copy h3 {
  font-size: 18px;
}

.tile-copy p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Install ---------- */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
}

.install-footnote {
  font-size: 14px;
}

.install-footnote a {
  color: var(--primary);
  font-weight: 500;
  text-underline-offset: 3px;
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--term);
  color: var(--term-text);
  box-shadow: var(--shadow-xl);
}

.dark .terminal {
  border-color: #2a2a2a;
}

.terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  background: rgb(255 255 255 / 0.03);
  font-size: 12.5px;
  color: var(--term-muted);
}

.dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 7px;
}

.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.14);
}

.terminal-body {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 24px 22px 26px;
  list-style: none;
}

.term-comment {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--term-muted);
}

.term-line code {
  color: var(--term-text);
}

.term-line code.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: #14b8a6;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.terminal .prompt {
  color: #14b8a6;
}

.terminal .copy-btn {
  border-color: rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.05);
  color: var(--term-text);
}

.terminal .copy-btn:hover,
.terminal .copy-btn[data-copied="true"] {
  border-color: #14b8a6;
  background: rgb(20 184 166 / 0.14);
  color: #5eead4;
}

/* ---------- Details ---------- */

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 880px;
  margin: 48px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.spec {
  padding: 26px 28px;
}

.spec + .spec {
  border-left: 1px solid var(--line);
}

.spec dt {
  font-size: 13px;
  color: var(--muted);
}

.spec dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.web-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 880px;
  margin: 20px auto 0;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.web-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: var(--shadow-lg);
}

.web-card-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}

.web-card-copy {
  display: grid;
  gap: 4px;
}

.web-card-copy strong {
  font-family: var(--heading);
  font-size: 18px;
  font-weight: 600;
}

.web-card-copy span {
  color: var(--muted);
  font-size: 15px;
}

.web-card .btn {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */

.footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner .brand {
  color: var(--text);
}

.footer-inner p {
  margin-top: 10px;
}

.footer-inner p a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--primary);
  text-decoration: none;
}

.footer-inner p a svg {
  width: 13px;
  height: 13px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.theme-toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.theme-toggle-text:hover {
  color: var(--text);
}

.theme-toggle-text svg {
  width: 14px;
  height: 14px;
}

/* ---------- Motion ---------- */

.rise {
  animation: rise 900ms var(--ease) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(3px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rise,
  .desk-widget,
  .chart-line,
  .js [data-reveal].is-visible .chart-line,
  .js .rise .chart-line,
  .term-line code.is-typing::after {
    animation: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid,
  .install-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero {
    padding-top: 48px;
  }

  .desk {
    max-width: 640px;
  }
}

@media (max-width: 800px) {
  .nav-links,
  .version-pill {
    display: none;
  }

  .section {
    padding: 80px 0;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile-popover {
    grid-row: auto;
  }

  .spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec + .spec {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .web-card,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .nav-actions .btn-sm {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-command code,
  .term-line code {
    font-size: 12px;
  }

  .terminal-body {
    padding: 20px 16px;
  }
}
