@font-face {
  font-family: "Pixel";
  src: url("fonts/webfonts/pixel-thin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "PixelTitle";
  src: url("fonts/webfonts/pixel-semibold.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #070a0f;
  --bg-soft: #0c1118;
  --panel: #111823;
  --panel-raised: #17212e;
  --line: #334155;
  --line-soft: #223040;
  --text: #e8edf2;
  --muted: #93a4b7;
  --dim: #64748b;
  --blue: #56a8ff;
  --green: #55d187;
  --amber: #f5b84b;
  --red: #ff6b6b;
  --cyan: #67e8f9;
  --purple: #c084fc;
  --orange: #ff9f43;
  --magenta: #f472b6;
  --shadow: #020406;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 126px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(86, 168, 255, 0.11), transparent 28rem),
    radial-gradient(circle at 82% 4%, rgba(85, 209, 135, 0.08), transparent 24rem),
    linear-gradient(rgba(51, 65, 85, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 65, 85, 0.12) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
}

::selection {
  color: #07111c;
  background: var(--cyan);
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--amber);
  border: 2px solid var(--text);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 11, 16, 0.96);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(12px);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: "PixelTitle", monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 6px);
  gap: 3px;
}

.brand-mark i {
  width: 6px;
  height: 6px;
  background: var(--blue);
}

.brand-mark i:nth-child(2) { background: var(--green); }
.brand-mark i:nth-child(3) { background: var(--amber); }
.brand-mark i:nth-child(4) { background: var(--red); }
.brand-mark i:nth-child(5) { background: var(--purple); }
.brand-mark i:nth-child(6) { background: var(--cyan); }

.top-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-led {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(85, 209, 135, 0.8);
}

.console-tabs {
  display: flex;
  min-height: 62px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--bg);
}

.console-tabs a {
  display: grid;
  place-items: center;
  flex: 1 0 auto;
  min-width: 128px;
  padding: 0 18px;
  color: var(--muted);
  background: var(--panel);
  border-right: 1px solid var(--line);
  font-family: "PixelTitle", monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.console-tabs a:first-child {
  color: var(--blue);
  box-shadow: inset 0 -3px var(--blue);
}

.console-tabs a:nth-child(2) { color: var(--purple); }
.console-tabs a:nth-child(3) { color: var(--green); }
.console-tabs a:nth-child(4) { color: var(--cyan); }
.console-tabs a:nth-child(5) { color: var(--orange); }
.console-tabs a:nth-child(6) { color: var(--amber); }
.console-tabs a:nth-child(7) { color: var(--red); }
.console-tabs a:nth-child(8) { color: var(--cyan); }
.console-tabs a:nth-child(9) { color: var(--blue); }
.console-tabs a:nth-child(10) { color: var(--magenta); }

.console-tabs a:hover,
.console-tabs a:focus-visible,
.console-tabs a.active {
  color: var(--text);
  background: var(--panel-raised);
  box-shadow: inset 0 -3px currentColor;
  outline: none;
}

main {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(26px, 4vw, 64px);
  align-items: center;
  min-height: calc(100vh - 112px);
  padding: 52px 0 64px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--amber);
  font-family: "PixelTitle", monospace;
  font-size: 15px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "> ";
  color: var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-family: "PixelTitle", monospace;
  font-size: clamp(42px, 5.3vw, 76px);
  line-height: 0.93;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 rgba(86, 168, 255, 0.16);
}

h1 span {
  color: var(--blue);
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 18px;
  color: var(--text);
  background: var(--panel-raised);
  border: 2px solid var(--line);
  font-family: "PixelTitle", monospace;
  font-size: 15px;
  text-decoration: none;
  text-transform: uppercase;
}

.button::after {
  content: ">";
  color: var(--blue);
}

.button.primary {
  color: #07111c;
  background: var(--amber);
  border-color: var(--amber);
}

.button.primary::after {
  color: #07111c;
}

.button:hover,
.button:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
  outline: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 94px;
  padding: 16px;
  background: rgba(17, 24, 35, 0.84);
  border: 1px solid var(--line);
  box-shadow: inset 3px 0 var(--accent, var(--blue));
}

.metric strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent, var(--blue));
  font-family: "PixelTitle", monospace;
  font-size: 24px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.console-device {
  position: relative;
  padding: 14px;
  background: #0b1017;
  border: 3px solid var(--line);
  box-shadow:
    14px 14px 0 rgba(4, 7, 11, 0.85),
    0 0 80px rgba(86, 168, 255, 0.1);
}

.console-device::before,
.console-device::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  pointer-events: none;
}

.console-device::before {
  top: -3px;
  left: -3px;
  border-top: 3px solid var(--cyan);
  border-left: 3px solid var(--cyan);
}

.console-device::after {
  right: -3px;
  bottom: -3px;
  border-right: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
}

.device-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.device-bar strong {
  color: var(--text);
  font-family: "PixelTitle", monospace;
  font-weight: normal;
}

.device-clock {
  color: var(--green);
}

.console-device img {
  width: 100%;
  height: auto;
  border: 1px solid #000;
  background: #000;
}

.capture-note {
  margin: 11px 4px 0;
  color: var(--dim);
  font-size: 12px;
  text-align: right;
  text-transform: uppercase;
}

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

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 34px;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--green);
  font-family: "PixelTitle", monospace;
  font-size: 15px;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-family: "PixelTitle", monospace;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.console-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature,
.hardware-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(23, 33, 46, 0.95), rgba(12, 17, 24, 0.95));
  border: 1px solid var(--line);
}

.feature-code {
  color: var(--accent, var(--blue));
  font-family: "PixelTitle", monospace;
  font-size: 14px;
}

.feature h3,
.hardware-card h3 {
  margin: 11px 0 10px;
  color: var(--text);
  font-family: "PixelTitle", monospace;
  font-size: 20px;
  font-weight: normal;
  text-transform: uppercase;
}

.feature p,
.hardware-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px var(--accent);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 16px;
}

.app-index {
  margin-bottom: 7px;
  color: var(--accent);
  font-family: "Pixel", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.app-card h3 {
  margin: 0;
  color: var(--text);
  font-family: "PixelTitle", monospace;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: normal;
  line-height: 1;
  text-transform: uppercase;
}

.version {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: "Pixel", monospace;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.app-shot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin: 0 22px;
  overflow: hidden;
  background:
    linear-gradient(rgba(51, 65, 85, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 65, 85, 0.12) 1px, transparent 1px),
    #05080c;
  background-size: 20px 20px;
  border: 1px solid var(--line-soft);
}

.app-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coming-soon {
  min-height: 540px;
}

.teaser-card {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 42px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(85, 209, 135, 0.16), transparent 38%),
    linear-gradient(rgba(85, 209, 135, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 209, 135, 0.08) 1px, transparent 1px),
    #05080c;
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.teaser-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.22) 3px 4px);
}

.lobster-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: min(280px, 78%);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(255, 107, 107, 0.22));
}

.teaser-label {
  position: relative;
  z-index: 1;
  padding: 7px 12px;
  color: var(--green);
  border: 1px solid var(--green);
  font-family: "PixelTitle", monospace;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.app-body p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 4px 7px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  font-family: "Pixel", monospace;
  font-size: 11px;
  line-height: 1.25;
  text-transform: uppercase;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--accent);
  font-family: "PixelTitle", monospace;
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
}

.project-link:after {
  content: "↗";
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--text);
  outline: none;
}

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hardware-card strong {
  color: var(--accent, var(--blue));
  font-family: "PixelTitle", monospace;
  font-size: 14px;
  font-weight: normal;
}

.m5stack-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 4px 0 var(--amber);
}

.m5stack-section .m5stack-panel {
  margin-top: 0;
}

.m5stack-copy h3 {
  margin: 0 0 12px;
  font-family: "PixelTitle", monospace;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: normal;
  line-height: 1.1;
  text-transform: uppercase;
}

.m5stack-copy p:not(.section-kicker) {
  margin-bottom: 20px;
  color: var(--muted);
}

.m5stack-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.m5stack-links .button {
  min-height: 42px;
  padding: 0 13px;
  font-size: 12px;
}

.m5stack-video {
  margin: 0;
  padding: 10px;
  background: #05080c;
  border: 1px solid var(--line);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

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

.m5stack-video figcaption {
  margin: 9px 4px 0;
  color: var(--dim);
  font-size: 12px;
}

.partition-map {
  margin-top: 14px;
  padding: 18px;
  background: #05080c;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  white-space: pre-wrap;
}

.partition-map b {
  color: var(--green);
  font-weight: normal;
}

footer {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 46px;
  border-top: 2px solid var(--line);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.footer-brand {
  color: var(--text);
  font-family: "PixelTitle", monospace;
  font-size: 18px;
  text-transform: uppercase;
}

.footer-copy {
  max-width: 780px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.footer-copy a {
  color: var(--amber);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
}

.legal {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0;
}

.legal h1 {
  font-size: clamp(40px, 6vw, 72px);
}

.license-box {
  padding: 26px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  white-space: pre-wrap;
}

@media (max-width: 1080px) {
  .hero {
    min-height: auto;
    gap: 24px;
  }

  .console-device {
    max-width: none;
  }

  .console-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }

  .topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
  }

  .top-status {
    font-size: 11px;
  }

  .console-tabs {
    min-height: 54px;
  }

  .console-tabs a {
    min-width: 110px;
    font-size: 13px;
  }

  main,
  footer {
    width: min(100% - 28px, 1480px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .console-device {
    max-width: 760px;
  }

  .metrics,
  .console-features,
  .app-grid,
  .hardware-grid,
  .m5stack-panel,
  .section-head {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .app-card-head,
  .app-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-shot {
    margin-left: 16px;
    margin-right: 16px;
  }

  .coming-soon {
    min-height: 380px;
  }

  .teaser-card {
    padding: 28px;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer-copy,
  .footer-links {
    text-align: left;
    justify-content: flex-start;
  }
}

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

  .button {
    transition: none;
  }
}
