:root {
  color-scheme: dark;
  --desk: #171914;
  --panel: #20231b;
  --ink: #f4f2e6;
  --muted: #c0c2b2;
  --faint: #a4a793;
  --rule: #393e30;
  --signal: #e0f583;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

body {
  background: var(--desk);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}

:is(a, button, summary):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.glass-nav {
  background: #151711;
  border-bottom: 1px solid var(--rule);
}

.brand-wordmark {
  color: var(--ink);
  font: 700 clamp(1.4rem, 2.4vw, 1.8rem)/1 var(--display);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-wordmark span {
  color: var(--signal);
}

.glass-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  transition: border-color 180ms ease;
}

.glass-card:hover {
  border-color: #626c4d;
}

:is(button, a).btn-primary {
  background: var(--signal);
  color: #171b10;
  border-radius: 4px;
  transition: background-color 180ms ease;
}

:is(button, a).btn-primary:hover {
  background: #eefbb2;
}

.btn-secondary {
  background: rgb(244 242 230 / 4%);
  border: 1px solid var(--rule);
  transition: border-color 180ms ease;
}

.btn-secondary:hover {
  border-color: #7d8762;
}

.edit-hero {
  background-color: #1a1d16;
  background-image: linear-gradient(90deg, #181b15 8%, transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 47px, rgb(224 245 131 / 6%) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgb(224 245 131 / 6%) 47px 48px);
  border-bottom: 1px solid var(--rule);
  padding-block: 1.5rem 0;
}

.desk-label {
  font: 500 0.6875rem/1.5 var(--mono);
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.hero-index {
  color: var(--faint);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.875rem;
}

.index-number {
  color: var(--signal);
  border: 1px solid #565f3f;
  padding: 0.1rem 0.3rem;
  margin-right: 0.4rem;
}

.index-arrow {
  color: var(--signal);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(2.5rem, 5.5vw, 5rem);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.hero-kicker span, .console-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background: var(--signal);
}

.hero-title {
  margin-block: 1.125rem 1.375rem;
  font: 800 clamp(3.65rem, 7vw, 6.5rem)/0.86 var(--display);
  letter-spacing: -0.012em;
  text-transform: uppercase;
}

.hero-title em {
  color: var(--signal);
  font-style: normal;
}

.hero-description {
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.55;
  max-width: 39ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  margin-top: 1.75rem;
}

.hero-install, .hero-workflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  font-weight: 600;
}

.hero-install {
  padding-inline: 1.05rem;
}

.hero-workflow {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #626c4d;
  text-underline-offset: 4px;
}

.hero-workflow:hover, .hero-workflow svg {
  color: var(--signal);
}

.edit-console {
  border: 1px solid #515744;
  border-radius: 6px;
  background: #141611;
  box-shadow: 0 18px 44px rgb(0 0 0 / 24%), 6px 6px 0 #24271e;
  overflow: hidden;
}

.console-bar, .monitor-label, .timeline-labels {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
}

.console-bar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: #23271d;
}

.console-bar > :first-child {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.console-monitors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.365fr);
  align-items: end;
  gap: clamp(0.625rem, 2.4vw, 1.3rem);
  padding: clamp(0.75rem, 2.5vw, 1.5rem);
}

.monitor-label {
  padding-bottom: 0.375rem;
  letter-spacing: 0.05em;
}

.monitor-output .monitor-label {
  color: var(--signal);
}

.monitor-screen {
  position: relative;
  overflow: hidden;
  outline: 1px solid var(--rule);
  background: #33372b;
}

.monitor-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-screen {
  aspect-ratio: 16 / 9;
}

.crop-guide {
  position: absolute;
  inset: 0 34.18%;
  border-inline: 1px solid var(--signal);
  box-shadow: 0 0 0 40vw rgb(19 21 15 / 38%);
}

.output-screen {
  aspect-ratio: 9 / 16;
  outline-color: #aebe5d;
  background: #e0ed9d;
}

.output-screen img {
  filter: grayscale(1) contrast(1.03);
  mix-blend-mode: multiply;
}

.output-caption {
  position: absolute;
  inset: auto 0 10%;
  color: var(--signal);
  font: 800 clamp(1.2rem, 3vw, 3rem)/0.82 var(--display);
  text-align: center;
  text-transform: uppercase;
  paint-order: stroke fill;
  -webkit-text-stroke: 3px #222718;
}

.console-timeline {
  margin-inline: clamp(0.75rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--rule);
  padding-block: 0.5rem 0.875rem;
}

.timeline-labels {
  font-size: 0.625rem;
  letter-spacing: 0;
}

.timeline-track {
  position: relative;
  height: 1.125rem;
  margin-top: 0.3rem;
  background: repeating-linear-gradient(90deg, #414437 0 1px, transparent 1px 12.5%), #25281e;
}

.timeline-track span {
  position: absolute;
  inset: 0 30% 0 37%;
  border-inline: 2px solid var(--signal);
  background: repeating-linear-gradient(90deg, #b5c96c 0 2px, #82924a 2px 4px);
}

.timeline-track span::after {
  content: '';
  position: absolute;
  top: -0.2rem;
  bottom: -0.2rem;
  left: 49%;
  width: 1px;
  background: var(--ink);
}

.console-caption {
  color: var(--faint);
  border-top: 1px solid var(--rule);
  padding: 0.55rem 1rem;
  font-size: 0.625rem;
  letter-spacing: 0.045em;
}

.hero-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.hero-specs li {
  display: flex;
  gap: 0.625rem;
  align-items: baseline;
  padding: 1rem;
  border-left: 1px solid var(--rule);
}

.hero-specs li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-specs li span {
  color: var(--signal);
}

#view-home section[id] {
  scroll-margin-top: 4.5rem;
}

@media (max-width: 51.99rem) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-title {
    font-size: clamp(3.05rem, 12.8vw, 5.75rem);
  }

  .edit-console {
    width: 100%;
    max-width: 38rem;
  }

  .output-caption {
    font-size: clamp(1.45rem, 5.6vw, 2.85rem);
  }
}

@media (max-width: 32rem) {
  .hero-index, .hero-kicker, .hero-specs {
    font-size: 0.625rem;
    letter-spacing: 0.04em;
  }

  .hero-specs li {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.5rem;
  }
}

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

  .glass-card, .btn-primary, .btn-secondary {
    transition: none;
  }
}
