:root {
  color-scheme: dark;
  --ink: #f6f7ee;
  --muted: #adb5a7;
  --base: #131615;
  --panel: #202622;
  --line: #39443b;
  --lime: #cef58e;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-family: "Avenir Next", system-ui, sans-serif;
  background: var(--base);
  color: var(--ink);
}

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

body {
  max-width: 83rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}

.skip {
  position: absolute;
  inset: 1rem auto auto 1rem;
  transform: translateY(-200%);
  z-index: 1;
  background: var(--base);
  padding: .75rem 1rem;
}

.skip:focus { transform: none; }

.site-header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  font-size: .81rem;
}

.site-header { border-bottom: 1px solid var(--line); }

.brand, nav {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.7rem);
  font-family: var(--mono);
}

.brand {
  gap: .65rem;
  color: var(--lime);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .12em;
}

.mark {
  width: .92rem;
  height: .92rem;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%, 0 70%, 24% 70%, 24% 30%, 0 30%);
}

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

nav a:hover, footer a:hover, .release-link:hover, .upstream a:hover { color: var(--lime); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 4.5rem);
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(2.75rem, 6vw, 5.25rem);
}

.device-name {
  margin: 0 0 .8rem;
  color: var(--lime);
  font: 500 .83rem/1.3 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8.6vw, 7.7rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .93;
}

.intro {
  margin: 1.65rem 0 1.8rem;
  max-width: 31ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.6;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.15rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 2.9rem;
  padding: .7rem 1rem;
  border: 0;
  border-radius: .28rem;
  color: #161e14;
  background: var(--lime);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}

button.primary-action { cursor: pointer; }

.primary-action:hover { background: #e1ffad; }

.release-link {
  color: var(--muted);
  font: .81rem var(--mono);
  text-underline-offset: .3em;
}

.upstream {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}

.upstream a { text-underline-offset: .23em; }

.hardware {
  margin: 0;
  padding: clamp(.8rem, 1.8vw, 1.55rem);
  border: 1px solid #455448;
  border-radius: 1.05rem;
  background: linear-gradient(145deg, #303a32, #242b26 54%, #1e2420);
  box-shadow: 0 1.5rem 3.5rem #0005, inset 0 1px #e5fce61c;
}

.bezel {
  border: 1px solid #58655a;
  border-radius: .56rem;
  padding: clamp(.45rem, .9vw, .7rem);
  background: #0b100f;
}

.bezel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .18rem;
  image-rendering: pixelated;
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .8rem .16rem 0;
  color: #b6c2b6;
  font: .73rem var(--mono);
}

.listen {
  padding: clamp(1.25rem, 3vw, 2.15rem);
  border: 1px solid #405446;
  border-radius: .6rem;
  background: #202a22;
}

.listen h2 {
  margin: 0 0 .42rem;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  letter-spacing: -.035em;
}

.listen > p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.samples li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .8rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--base);
}

.samples p {
  margin: 0;
  font-size: .91rem;
  line-height: 1.5;
}

.samples audio {
  display: block;
  width: 100%;
  min-width: 0;
}

.install {
  padding: clamp(3rem, 7vw, 5.2rem) 0;
  scroll-margin-top: 1.5rem;
}

.section-intro h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -.055em;
}

.section-intro p, .steps p {
  color: var(--muted);
  line-height: 1.65;
}

.section-intro p { max-width: 55ch; }

.web-installer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.25rem;
  margin-top: 1.25rem;
}

.web-installer span, .installer-fallback {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.installer-fallback { margin: 0; }

esp-web-install-button:not(:defined),
esp-web-install-button:defined + .installer-fallback { display: none; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.1rem 0 0;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  padding: 1.25rem;
  border-top: 1px solid #61735d;
  background: var(--panel);
  counter-increment: step;
}

.steps li::before {
  display: block;
  margin-bottom: .85rem;
  color: var(--lime);
  font: .78rem var(--mono);
  content: counter(step, decimal-leading-zero);
}

.steps h3 { margin: 0 0 .45rem; font-size: 1.1rem; }
.steps p { margin: 0; font-size: .9rem; }
.steps a { color: var(--ink); text-underline-offset: .2em; }

kbd, code {
  color: var(--ink);
  font: .84em var(--mono);
  white-space: nowrap;
}

kbd {
  padding: .06em .28em;
  border: 1px solid #59675b;
  border-radius: .2rem;
}

footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer a { text-underline-offset: .23em; }

@media (max-width: 56rem) {
  .hero { gap: 2rem; }
  .samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: clamp(3rem, 8.6vw, 6rem); }
}

@media (max-width: 44rem) {
  .hero, .samples, .steps { grid-template-columns: 1fr; }
  .intro { margin: 1.2rem 0 1.4rem; }
  .hero { gap: 2.4rem; }
  h1 { font-size: clamp(3.2rem, 13.5vw, 6rem); }
  .steps { gap: .85rem; }
}
