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

:root {
  --ink: #171b16;
  --muted: #687066;
  --paper: #f1f0e8;
  --paper-deep: #e5e4da;
  --acid: #d9ff43;
  --teal: #0d8d82;
  --orange: #f26a3d;
  --line: rgba(23, 27, 22, 0.15);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 23%, rgba(217, 255, 67, 0.17), transparent 30rem),
    var(--paper);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.035;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, currentColor 0 0.45px, transparent 0.6px),
    radial-gradient(circle at 70% 65%, currentColor 0 0.4px, transparent 0.55px);
  background-size: 7px 9px, 11px 13px;
}

.site-header {
  min-height: 86px;
  padding: 0 clamp(24px, 5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand b { color: var(--teal); }

.brand-mark {
  width: 34px;
  height: 22px;
  padding: 4px;
  display: flex;
  gap: 4px;
  border: 1px solid currentColor;
  border-radius: 5px;
  transform: rotate(-2deg);
}

.brand-mark span {
  flex: 1;
  border-radius: 2px;
  background: var(--teal);
}

.version,
.browser-status,
.label,
.eyebrow,
.section-index,
.visual-note,
.footer-state {
  font-family: "DM Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.version {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.language-switcher {
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 10px "DM Mono", ui-monospace, monospace;
  color: var(--muted);
}

.language-switcher button {
  padding: 3px 5px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.language-switcher button.active {
  color: var(--paper);
  background: var(--ink);
}

.language-switcher button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.version i,
.footer-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #63b341;
  box-shadow: 0 0 0 4px rgba(99, 179, 65, 0.12);
}

main { overflow: hidden; }

.hero {
  min-height: 690px;
  padding: clamp(58px, 8vw, 112px) clamp(24px, 5vw, 78px) 90px;
  display: grid;
  grid-template-columns: minmax(460px, 0.92fr) minmax(570px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 4vw, 70px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 24px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 500;
}

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

h1 {
  margin-bottom: 26px;
  max-width: 720px;
  font-size: clamp(52px, 7.2vw, 102px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  font-weight: 800;
}

h1 em {
  color: var(--teal);
  font-style: normal;
}

.lede {
  max-width: 610px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
}

.installer-card {
  max-width: 610px;
  padding: 22px;
  background: #faf9f1;
  border: 1px solid rgba(23, 27, 22, 0.2);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(23, 27, 22, 0.08);
}

.installer-heading {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.installer-heading strong {
  font-size: 17px;
}

.browser-status {
  max-width: 190px;
  padding-left: 14px;
  position: relative;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.browser-status::before {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: 3px;
  left: 0;
  border-radius: 50%;
  background: #b7b9ae;
}

.browser-status[data-state="ready"]::before { background: #63b341; }
.browser-status[data-state="blocked"]::before { background: var(--orange); }

esp-web-install-button { display: block; }

.install-button {
  width: 100%;
  min-height: 62px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.install-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.install-button:active {
  transform: translate(5px, 5px);
  box-shadow: none;
}

.install-button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.usb-icon {
  font-size: 25px;
  transform: rotate(90deg);
}

.arrow {
  margin-left: auto;
  font-size: 23px;
}

.unsupported-message {
  display: block;
  padding: 15px;
  color: #7a321e;
  background: #ffe0d5;
  border: 1px solid rgba(122, 50, 30, 0.25);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.55;
}

.fine-print {
  margin: 16px 3px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.hero-showcase {
  width: min(100%, 680px);
  height: 520px;
  position: relative;
  justify-self: center;
}

.robot-visual {
  width: 440px;
  aspect-ratio: 1;
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
}

.real-photo-stack {
  position: absolute;
  top: 78px;
  left: 0;
  z-index: 4;
}

.hero-photo {
  width: 174px;
  aspect-ratio: 1;
  margin: 0;
  position: absolute;
  overflow: hidden;
  background: #faf9f1;
  border: 6px solid #faf9f1;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(23, 27, 22, 0.18),
    10px 17px 34px rgba(23, 27, 22, 0.2);
  transition: transform 240ms ease, z-index 0s;
}

.hero-photo-one {
  top: 0;
  left: 0;
  transform: rotate(-4deg);
}

.hero-photo-two {
  top: 48px;
  left: 130px;
  transform: rotate(3deg);
}

.hero-photo:hover {
  z-index: 5;
  transform: rotate(0) translateY(-5px);
}

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

.hero-photo-one img { object-position: 30% 52%; }
.hero-photo-two img { object-position: 16% 50%; }

.youtube-compact {
  width: 350px;
  min-height: 76px;
  padding: 10px 16px 10px 10px;
  position: absolute;
  bottom: 24px;
  left: 4px;
  z-index: 6;
  display: grid;
  grid-template-columns: 56px 38px 1fr;
  align-items: center;
  gap: 10px;
  background: rgba(250, 249, 241, 0.94);
  border: 1px solid rgba(23, 27, 22, 0.2);
  border-radius: 999px;
  box-shadow: 6px 8px 22px rgba(23, 27, 22, 0.14);
  backdrop-filter: blur(12px);
}

.channel-avatar {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(23, 27, 22, 0.18);
}

.youtube-mini-logo {
  width: 38px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #ff0033;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
  text-indent: 2px;
}

.channel-names {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.channel-names a {
  width: fit-content;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.channel-names a:hover {
  color: #e0002a;
}

.channel-names a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 3px;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(13, 141, 130, 0.28);
  border-radius: 50%;
}

.orbit-one { width: 100%; height: 100%; }
.orbit-two { width: 75%; height: 75%; border-style: dashed; transform: rotate(14deg); }

.face {
  width: 66%;
  aspect-ratio: 0.92;
  padding: 17px;
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, #c8bfa1, #8f876f);
  border: 2px solid #595443;
  border-radius: 26px 26px 17px 17px;
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,0.24),
    18px 25px 0 rgba(23, 27, 22, 0.08),
    0 40px 70px rgba(23, 27, 22, 0.22);
  transform: rotate(-2deg);
}

.face-top {
  height: 29px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bolt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4e4a3c;
  box-shadow: 240px 0 0 #4e4a3c;
}

.camera-dot {
  width: 10px;
  height: 10px;
  border: 3px solid #4e4a3c;
  border-radius: 50%;
}

.screen {
  height: 58%;
  padding: 0 14%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15%;
  overflow: hidden;
  background:
    linear-gradient(rgba(13, 141, 130, 0.03) 50%, transparent 50%),
    #111815;
  background-size: 100% 5px;
  border: 4px solid #4c493c;
  border-radius: 13px;
  box-shadow: inset 0 0 22px rgba(29, 255, 226, 0.09);
}

.eye {
  width: 44%;
  aspect-ratio: 1.08;
  position: relative;
  overflow: hidden;
  background: var(--teal);
  border-radius: 42% 42% 34% 34%;
  box-shadow: 0 0 18px rgba(35, 235, 218, 0.28);
  animation: blink 5.5s infinite;
}

.eye span {
  width: 34%;
  height: 48%;
  position: absolute;
  top: 23%;
  left: 45%;
  border-radius: 50%;
  background: #c3fff8;
  opacity: 0.7;
}

.scanline {
  height: 2px;
  position: absolute;
  inset-inline: 0;
  top: 18%;
  background: rgba(217, 255, 67, 0.35);
  animation: scan 4s linear infinite;
}

.face-label {
  padding: 16px 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: "DM Mono", monospace;
}

.face-label span {
  font-size: 18px;
  font-weight: 500;
}

.face-label small {
  color: #4e4a3c;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.visual-note {
  padding: 7px 10px;
  position: absolute;
  z-index: 3;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 8px;
}

.note-top { top: 12%; right: -2%; }
.note-bottom { bottom: 8%; left: 43%; }

.steps {
  padding: 88px clamp(24px, 5vw, 78px) 100px;
}

.section-heading {
  margin-bottom: 44px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: end;
  gap: 25px;
}

.section-index {
  color: var(--teal);
  font-size: 11px;
}

.section-heading h2,
.details h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 300px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.step-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.step-grid li {
  min-height: 290px;
  padding: 25px;
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.step-number {
  position: absolute;
  top: 20px;
  right: 22px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.step-icon {
  width: 58px;
  height: 58px;
  margin: 29px 0 51px;
  position: relative;
}

.step-icon.cable {
  border: 2px solid var(--teal);
  border-top-color: transparent;
  border-radius: 50%;
}

.step-icon.cable::after {
  content: "";
  width: 15px;
  height: 24px;
  position: absolute;
  top: -8px;
  right: -2px;
  border: 2px solid var(--teal);
  border-radius: 4px;
}

.step-icon.port {
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: inset 0 0 0 8px var(--acid);
}

.step-icon.port::after {
  content: "USB";
  position: absolute;
  right: 5px;
  bottom: -21px;
  font: 8px "DM Mono", monospace;
  letter-spacing: 0.12em;
}

.step-icon.spark {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 54px;
  line-height: 1;
}

.step-grid h3 {
  margin-bottom: 11px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.step-grid p {
  max-width: 320px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.details {
  padding: 88px clamp(24px, 5vw, 78px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 70px 8vw;
  color: #edf0e7;
  background:
    linear-gradient(120deg, rgba(13,141,130,0.08), transparent 38%),
    var(--ink);
}

.details .label { color: var(--acid); }

.spec-list {
  border-top: 1px solid rgba(255,255,255,0.17);
}

.spec-list div {
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.17);
  font-size: 12px;
}

.spec-list span { color: #9fa69b; }
.spec-list strong { text-align: right; font-weight: 600; }

.notice {
  grid-column: 1 / -1;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  color: var(--ink);
  background: var(--acid);
  border-radius: 12px;
}

.notice-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: "DM Mono", monospace;
}

.notice strong { font-size: 14px; }

.notice p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

footer {
  min-height: 108px;
  padding: 0 clamp(24px, 5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid rgba(255,255,255,0.09);
  color: #b7beb2;
  background: var(--ink);
  font-size: 10px;
}

.footer-brand { color: #edf0e7; }

.footer-state {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
}

@keyframes blink {
  0%, 44%, 48%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(0.08); }
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(135px); }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-showcase {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .robot-visual {
    width: 440px;
  }

  .section-heading {
    grid-template-columns: auto 1fr;
  }

  .section-heading p {
    grid-column: 2;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .notice { grid-column: 1; }
}

@media (max-width: 650px) {
  .site-header { min-height: 72px; }
  .version { display: none; }
  .header-actions { gap: 0; }
  .hero { padding-top: 42px; }
  h1 { font-size: clamp(48px, 16vw, 70px); }
  .hero-showcase {
    width: 100%;
    height: 400px;
  }
  .robot-visual {
    width: min(82vw, 330px);
    right: -24px;
  }
  .face { width: 70%; padding: 12px; }
  .bolt { box-shadow: none; }

  .real-photo-stack {
    top: 60px;
  }

  .hero-photo {
    width: 124px;
    border-width: 4px;
    border-radius: 12px;
  }

  .hero-photo-two {
    top: 36px;
    left: 92px;
  }

  .youtube-compact {
    width: min(310px, calc(100% - 14px));
    min-height: 66px;
    bottom: 17px;
    left: 0;
    grid-template-columns: 48px 34px 1fr;
    gap: 8px;
  }

  .channel-avatar {
    width: 48px;
    height: 48px;
  }

  .youtube-mini-logo {
    width: 34px;
    height: 24px;
    font-size: 10px;
  }

  .installer-heading {
    display: block;
  }

  .browser-status {
    max-width: none;
    margin-top: 12px;
    text-align: left;
  }

  .section-heading {
    display: block;
  }

  .section-index {
    display: block;
    margin-bottom: 13px;
  }

  .section-heading p { margin-top: 14px; }

  .step-grid {
    grid-template-columns: 1fr;
  }

  .step-grid li {
    min-height: 250px;
  }

  .details {
    padding-block: 70px;
  }

  footer {
    padding-block: 28px;
    flex-wrap: wrap;
  }

  footer > p {
    width: 100%;
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
