@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #050505;
  --panel: #0b0b0b;
  --panel-2: #101010;
  --text: #f5f5f5;
  --muted: #777;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.20);
  --green: #baffc8;
  --mono: "Space Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, #1c1c1c 0, #050505 42%),
    var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .08;
  pointer-events: none;
}

.glow-one {
  background: white;
  top: -300px;
  left: -200px;
}

.glow-two {
  background: #8cffaa;
  right: -350px;
  top: 35%;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 74px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(5,5,5,.78);
  backdrop-filter: blur(20px);
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: -.3px;
}

.brand b {
  opacity: .45;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 7px;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 34px;
  color: #777;
  font-size: 12px;
}

.nav-links a {
  transition: color .2s;
}

.nav-links a:hover {
  color: white;
}

.nav-button {
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 11px;
  font-family: var(--mono);
  transition: .25s;
}

.nav-button:hover {
  background: white;
  color: black;
}

.hero {
  max-width: 1200px;
  min-height: 720px;
  margin: auto;
  padding: 110px 5vw 80px;
  display: grid;
  grid-template-columns: 1fr .8fr;
  align-items: center;
  gap: 70px;
}

.eyebrow,
.section-heading > span,
.section-kicker,
.card-label,
.oled-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: #777;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot,
.status-badge span,
.footer-status span,
.oled-caption span {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.hero h1 {
  margin: 25px 0 22px;
  max-width: 700px;
  font-size: clamp(58px, 8vw, 100px);
  line-height: .91;
  letter-spacing: -6px;
}

.hero h1 span,
.section-heading em,
.final-cta em {
  color: #6d6d6d;
  font-style: normal;
}

.hero-text {
  max-width: 520px;
  color: #777;
  font-size: 15px;
  line-height: 1.8;
}

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

.primary-button,
.secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 11px;
  font-family: var(--mono);
  transition: .3s;
}

.primary-button {
  background: white;
  color: black;
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 45px rgba(255,255,255,.12);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: #aaa;
}

.secondary-button:hover {
  color: white;
  border-color: #555;
}

.hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  color: #555;
  font: 9px var(--mono);
  text-transform: uppercase;
}

.hero-device {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
}

.device-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: white;
  filter: blur(100px);
  opacity: .08;
}

.mini-device {
  position: relative;
  width: 250px;
  height: 390px;
  padding: 35px 20px;
  border: 1px solid #2c2c2c;
  border-radius: 32px;
  background: linear-gradient(145deg,#171717,#070707);
  box-shadow:
    0 50px 100px rgba(0,0,0,.8),
    inset 0 1px rgba(255,255,255,.08);
  transform: rotate(4deg);
  animation: deviceFloat 5s ease-in-out infinite;
}

.mini-screen {
  width: 210px;
  height: 210px;
  padding: 15px;
  border: 5px solid #111;
  border-radius: 13px;
  background: #020202;
  box-shadow: inset 0 0 25px rgba(255,255,255,.04);
  font: 10px var(--mono);
}

.screen-brand {
  font-weight: bold;
}

.screen-line {
  height: 1px;
  background: #ddd;
  margin: 8px 0;
}

.screen-item {
  padding: 6px;
  color: #777;
}

.screen-item.active {
  background: white;
  color: black;
}

.device-button {
  position: absolute;
  bottom: 28px;
  width: 20px;
  height: 20px;
  border: 1px solid #444;
  border-radius: 50%;
}

.device-button.left { left: 35px; }
.device-button.center { left: 50%; transform: translateX(-50%); }
.device-button.right { right: 35px; }

.floating-tag {
  position: absolute;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10,10,10,.8);
  backdrop-filter: blur(10px);
  font: 9px var(--mono);
  color: #777;
}

.tag-top {
  top: 75px;
  right: 0;
}

.tag-bottom {
  bottom: 75px;
  left: 0;
}

.stats {
  max-width: 1100px;
  margin: auto;
  padding: 35px 5vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3,1fr);
}

.stats div {
  padding: 5px 30px;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border: 0;
}

.stats strong {
  display: block;
  font: 24px var(--mono);
}

.stats span {
  color: #555;
  font-size: 11px;
}

.section,
.install-section,
.wiring-section,
.how-section,
.faq-section {
  max-width: 1100px;
  margin: auto;
  padding: 130px 5vw;
}

.section-heading h2 {
  margin: 18px 0 55px;
  font-size: clamp(42px,6vw,72px);
  line-height: .95;
  letter-spacing: -4px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.feature-card {
  position: relative;
  min-height: 260px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.01));
  overflow: hidden;
  transition: .35s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: #333;
}

.feature-number {
  color: #444;
  font: 10px var(--mono);
}

.feature-icon {
  margin: 35px 0 25px;
  font-size: 32px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.feature-card p {
  max-width: 350px;
  color: #666;
  line-height: 1.6;
  font-size: 12px;
}

.install-section {
  max-width: 1200px;
}

.flasher-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.flasher-card,
.oled-showcase {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #090909;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.flasher-card h3 {
  margin: 10px 0;
  font-size: 28px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #777;
  font: 9px var(--mono);
}

.flasher-card > p {
  max-width: 500px;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}

.flash-info {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin: 30px 0;
  border: 1px solid var(--line);
}

.flash-info div {
  padding: 15px;
  border-right: 1px solid var(--line);
}

.flash-info div:last-child {
  border: 0;
}

.flash-info span {
  display: block;
  color: #555;
  font: 8px var(--mono);
  margin-bottom: 7px;
}

.flash-info strong {
  font: 10px var(--mono);
}

.flash-button {
  width: 100%;
  min-height: 55px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  background: white;
  color: black;
  cursor: pointer;
  font: 11px var(--mono);
  transition: .25s;
}

.flash-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255,255,255,.1);
}

.flash-status {
  padding: 15px 0 0;
  color: #555;
  font: 9px var(--mono);
}

.progress-container {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: #222;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: white;
}

#progress-text {
  color: #666;
  font: 9px var(--mono);
}

.oled-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.oled-frame {
  margin: 25px 0;
  padding: 17px;
  border-radius: 20px;
  background: #161616;
  border: 1px solid #292929;
  box-shadow: 0 25px 60px rgba(0,0,0,.6);
}

.oled-screen {
  width: 230px;
  height: 150px;
  padding: 12px;
  background: #000;
  border: 2px solid #303030;
  font: 9px var(--mono);
  box-shadow: inset 0 0 20px rgba(255,255,255,.04);
}

.oled-top,
.oled-footer {
  display: flex;
  justify-content: space-between;
}

.oled-divider {
  height: 1px;
  background: white;
  margin: 7px 0;
}

.oled-menu div {
  padding: 5px;
}

.oled-menu div:first-child {
  background: white;
  color: black;
}

.oled-footer {
  margin-top: 7px;
  color: #555;
}

.oled-caption {
  color: #555;
  font: 8px var(--mono);
}

.steps,
.how-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-top: 18px;
}

.step,
.how-grid article {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.015);
}

.step > span,
.how-grid article > span {
  color: #555;
  font: 10px var(--mono);
}

.step strong,
.how-grid h3 {
  display: block;
  margin-top: 30px;
}

.step p,
.how-grid p {
  color: #555;
  font-size: 11px;
  line-height: 1.6;
}

.wiring-board {
  position: relative;
  min-height: 690px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    #080808;
  background-size: 30px 30px;
  overflow: hidden;
}

.esp-board {
  position: absolute;
  width: 230px;
  height: 310px;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  padding: 20px;
  border: 1px solid #333;
  border-radius: 22px;
  background: linear-gradient(145deg,#151515,#080808);
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
  z-index: 3;
}

.board-header {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
}

.board-header small {
  color: #555;
}

.board-chip {
  width: 85px;
  height: 125px;
  margin: 45px auto 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #050505;
}

.board-chip strong {
  font-size: 18px;
}

.board-chip span,
.board-name {
  color: #555;
  font: 8px var(--mono);
}

.board-name {
  display: block;
  text-align: center;
}

.board-led {
  position: absolute;
  right: 20px;
  top: 55px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 15px var(--green);
  animation: blink 1.5s infinite;
}

.board-pins {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 35px;
  top: 80px;
}

.board-pins i {
  width: 30px;
  height: 12px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: #777;
  color: black;
  font: 6px var(--mono);
  font-style: normal;
}

.left-pins { left: -17px; }
.right-pins { right: -17px; }

.hardware-card {
  position: absolute;
  z-index: 4;
  width: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8,8,8,.9);
  backdrop-filter: blur(15px);
  transition: .3s;
}

.hardware-card:hover {
  transform: translateY(-5px);
  border-color: #444;
}

.hardware-icon {
  font-size: 25px;
  margin-bottom: 12px;
}

.hardware-card strong,
.hardware-card span,
.hardware-card code {
  display: block;
}

.hardware-card strong {
  font-size: 13px;
}

.hardware-card span {
  color: #555;
  font-size: 9px;
  margin: 4px 0 12px;
}

.hardware-card code {
  color: #888;
  font: 8px var(--mono);
  margin-top: 4px;
}

.hardware-oled { left: 30px; top: 70px; }
.hardware-ir { right: 30px; top: 70px; }
.hardware-buttons { left: 30px; bottom: 70px; }
.hardware-buzzer { right: 30px; bottom: 70px; }

.connection {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: #555;
  transform-origin: left center;
}

.connection::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 15px white;
  top: -3px;
  animation: travel 2.5s linear infinite;
}

.connection-oled {
  width: 290px;
  left: 220px;
  top: 190px;
  transform: rotate(20deg);
}

.connection-ir {
  width: 290px;
  right: 220px;
  top: 190px;
  transform: rotate(160deg);
}

.connection-buttons {
  width: 290px;
  left: 220px;
  bottom: 190px;
  transform: rotate(-20deg);
}

.connection-buzzer {
  width: 290px;
  right: 220px;
  bottom: 190px;
  transform: rotate(-160deg);
}

.pin-summary {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  margin-top: 12px;
  border: 1px solid var(--line);
}

.pin-summary div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.pin-summary div:last-child {
  border: 0;
}

.pin-summary span {
  display: block;
  color: #555;
  font: 8px var(--mono);
  margin-bottom: 6px;
}

.pin-summary strong {
  font: 9px var(--mono);
}

.faq-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 25px 5px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

summary::-webkit-details-marker {
  display: none;
}

summary span {
  color: #555;
  font: 18px var(--mono);
}

details p {
  max-width: 650px;
  padding: 0 5px 25px;
  color: #666;
  font-size: 11px;
  line-height: 1.7;
}

.final-cta {
  position: relative;
  max-width: 1100px;
  margin: 30px auto 120px;
  padding: 100px 5vw;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 25px;
  overflow: hidden;
  background: #090909;
}

.final-cta h2 {
  position: relative;
  margin: 20px 0 35px;
  font-size: clamp(45px,7vw,80px);
  line-height: .9;
  letter-spacing: -4px;
}

.cta-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  background: white;
  filter: blur(150px);
  opacity: .06;
}

footer {
  max-width: 1100px;
  margin: auto;
  padding: 35px 5vw 50px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-info,
.footer-status {
  color: #444;
  font: 8px var(--mono);
}

.footer-status {
  display: flex;
  gap: 7px;
  align-items: center;
}

@keyframes deviceFloat {
  0%,100% { transform: rotate(4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-12px); }
}

@keyframes blink {
  50% { opacity: .25; }
}

@keyframes travel {
  from { left: 0; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  to { left: 100%; opacity: 0; }
}

@media (max-width: 800px) {

  .nav-links {
    display: none;
  }

  .nav-button {
    display: none;
  }

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

  .hero h1 {
    letter-spacing: -4px;
  }

  .hero-device {
    min-height: 430px;
  }

  .stats,
  .feature-grid,
  .flasher-layout,
  .steps,
  .how-grid,
  .pin-summary {
    grid-template-columns: 1fr;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }

  .feature-card {
    min-height: 220px;
  }

  .flash-info {
    grid-template-columns: 1fr;
  }

  .flash-info div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flash-info div:last-child {
    border-bottom: 0;
  }

  .wiring-board {
    min-height: 1050px;
  }

  .esp-board {
    top: 50%;
  }

  .hardware-card {
    width: 165px;
  }

  .hardware-oled {
    left: 15px;
    top: 35px;
  }

  .hardware-ir {
    right: 15px;
    top: 35px;
  }

  .hardware-buttons {
    left: 15px;
    bottom: 35px;
  }

  .hardware-buzzer {
    right: 15px;
    bottom: 35px;
  }

  .connection {
    display: none;
  }

  footer {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {

  .navbar {
    padding: 0 20px;
  }

  .hero,
  .section,
  .install-section,
  .wiring-section,
  .how-section,
  .faq-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h1 {
    font-size: 55px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .mini-device {
    transform: scale(.88) rotate(4deg);
  }

  .hardware-card {
    width: 145px;
    padding: 14px;
  }

  .hardware-card code {
    font-size: 7px;
  }

  .esp-board {
    transform: translate(-50%,-50%) scale(.9);
  }

  .final-cta {
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* Separate firmware flash action */
.flash-action {
  margin-top: 18px;
  width: 100%;
}

.flash-install {
  width: 100%;
  min-height: 58px;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(120, 255, 180, 0.35);
}

.flash-install span {
  letter-spacing: 0.08em;
}

.flash-install strong {
  font-size: 1.15rem;
}

.flash-install:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
