:root {
  --bg: #0c0e11;
  --panel: #14171c;
  --panel-2: #1b1f26;
  --line: #2b3039;
  --text: #e9ebee;
  --muted: #a0a8b3;
  --green: #3ecf5e;
  --amber: #ffb300;
  --red: #ff5a52;
  --plum: #5a4160;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 70rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration-color: var(--green);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--green);
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  font: 700 clamp(1.6rem, 3.2vw, 2.25rem) / 1.15 var(--mono);
  letter-spacing: -0.02em;
}

h3 {
  font: 700 1.125rem / 1.3 var(--mono);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.95em;
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--green);
  color: #06140a;
}

.skip:focus {
  left: 0.5rem;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--pad);
  background: rgb(12 14 17 / 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 1.05rem / 1 var(--mono);
  text-decoration: none;
}

.led {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0.6rem rgb(62 207 94 / 0.8);
}

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  font-size: 0.9375rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.top nav .nav-cta {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--green);
  border-radius: 3px;
  color: var(--green);
}

.top nav .nav-cta:hover {
  background: var(--green);
  color: #06140a;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--text);
  font: 600 1rem / 1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

.btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: #06140a;
}

.btn.primary:hover {
  background: #5fe07b;
  color: #06140a;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.fine {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  min-height: min(46rem, 88vh);
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 40%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(12 14 17 / 0.94) 0%, rgb(12 14 17 / 0.78) 38%, rgb(12 14 17 / 0) 70%),
    linear-gradient(0deg, rgb(12 14 17 / 0.85) 0%, rgb(12 14 17 / 0) 35%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 7rem var(--pad) clamp(2.5rem, 7vh, 5rem);
}

.hero-copy > * {
  max-width: 34rem;
}

.hero h1 {
  font: 700 clamp(2.25rem, 5.6vw, 4rem) / 1.04 var(--mono);
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: #d3d8de;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero .fine {
  margin-top: 1rem;
}

/* Sections */

main > section:not(.hero) {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad) 0;
}

.why {
  display: grid;
  gap: 1.25rem;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  color: var(--muted);
}

.why p {
  max-width: 46rem;
}

.why-punch {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.what h2 {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.shot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.shot.flip .shot-text {
  order: 2;
}

.shot img {
  border: 1px solid var(--line);
  border-top: 3px solid var(--plum);
  border-radius: 3px;
  background: var(--panel);
}

.shot-text p,
.points p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.points li {
  padding: 1.5rem;
  background: var(--panel);
}

.limits {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-left: 1.25rem;
  border-left: 3px solid var(--amber);
}

.limits ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.limits li + li {
  margin-top: 0.4rem;
}

.try p {
  max-width: 44rem;
  margin-top: 1rem;
  color: var(--muted);
}

.try pre {
  max-width: 44rem;
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 3px;
  color: var(--text);
  line-height: 1.7;
}

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

/* Feedback */

.feedback {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.feedback-intro p {
  margin-top: 1rem;
  color: var(--muted);
}

form,
.thanks {
  grid-column: 2;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--plum);
  border-radius: 3px;
}

form {
  display: grid;
  gap: 1.75rem;
}

form[hidden] {
  display: none;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.field > label {
  display: block;
  padding: 0;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.hint {
  margin: -0.35rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.error {
  margin-top: 0.5rem;
  color: #ff8d87;
  font-size: 0.9375rem;
}

textarea,
input[type="email"],
input[type="text"] {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

textarea:focus-visible,
input[type="email"]:focus-visible {
  outline-offset: 0;
  border-color: var(--green);
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

/* The verdict: three 1U faceplates in a rack. The LED lights when one is chosen. */

.verdict {
  display: grid;
  gap: 3px;
}

.unit {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem auto minmax(1rem, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1rem 0 0.6rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.unit input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.u {
  color: var(--muted);
  font: 0.8125rem / 1 var(--mono);
  text-align: right;
}

.unit-label {
  font: 700 1rem / 1.2 var(--mono);
}

.vents {
  height: 1.1rem;
  background: repeating-linear-gradient(90deg, #0b0d10 0 3px, transparent 3px 7px);
  opacity: 0.9;
}

.unit-led {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: #313741;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.5);
  transition:
    background-color 0.15s,
    box-shadow 0.15s;
}

.unit[data-tone="green"] {
  --tone: var(--green);
  --glow: rgb(62 207 94 / 0.75);
}

.unit[data-tone="amber"] {
  --tone: var(--amber);
  --glow: rgb(255 179 0 / 0.75);
}

.unit[data-tone="red"] {
  --tone: var(--red);
  --glow: rgb(255 90 82 / 0.75);
}

.unit:hover {
  border-color: var(--muted);
}

.unit:has(input:checked) {
  border-color: var(--tone);
  background: #20252d;
}

.unit:has(input:checked) .unit-led,
.unit-led.on {
  background: var(--tone, var(--green));
  box-shadow: 0 0 0.75rem var(--glow, rgb(62 207 94 / 0.75));
}

.unit:has(input:focus-visible) {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Checkbox and radio chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips legend {
  float: left;
  width: 100%;
}

.chips label {
  position: relative;
}

.chips input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chips span {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.chips label:hover span {
  border-color: var(--muted);
  color: var(--text);
}

.chips input:checked + span {
  border-color: var(--green);
  background: rgb(62 207 94 / 0.12);
  color: var(--text);
}

.chips input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.25rem 0 0;
  accent-color: var(--green);
}

.trap {
  position: absolute;
  left: -999rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.send {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.status {
  color: #ff8d87;
  font-size: 0.9375rem;
}

.thanks {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  border-top-color: var(--green);
}

.thanks[hidden] {
  display: none;
}

.thanks p {
  color: var(--muted);
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  max-width: var(--wrap);
  margin: clamp(4rem, 9vw, 6.5rem) auto 0;
  padding: 1.5rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.foot-link {
  color: var(--muted);
}

/* Narrow screens */

@media (max-width: 52rem) {
  .shot,
  .feedback,
  .points {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot.flip .shot-text {
    order: 0;
  }

  form,
  .thanks {
    grid-column: 1;
  }

  .hero {
    min-height: 0;
    align-items: start;
  }

  .hero-img {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 10;
    order: 2;
  }

  .hero::after {
    display: none;
  }

  .hero-copy {
    padding-top: 2.5rem;
  }
}

@media (max-width: 36rem) {
  .top nav a:not(.nav-cta) {
    display: none;
  }

  .unit {
    grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  }

  .vents {
    display: none;
  }
}

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

  .unit-led {
    transition: none;
  }
}
