:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.075);
  --accent: #ff6b00;
  --accent-dark: #e85f00;
  --accent-ink: #b84c00;
  --accent-soft: #fff2e8;
  --radius: 24px;
  --shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.28);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 245, 247, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav .btn {
  height: 38px;
  padding: 0 18px;
  font-size: 13.5px;
}

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(255, 107, 0, 0.55);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-ghost:hover {
  background: #fafafa;
}

.btn-light {
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.4);
}

.btn-light:hover {
  transform: translateY(-1px);
}

.btn-lg {
  height: 52px;
  padding: 0 30px;
  font-size: 16px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.14), transparent 66%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12);
}

h1 {
  margin: 22px 0 20px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.09;
  letter-spacing: -0.035em;
  font-weight: 700;
}

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

.lede {
  max-width: 31em;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats b {
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.hero-stats span {
  font-size: 12.5px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-card {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 12.5px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.3);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* ---------- section ---------- */

.section {
  padding: 76px 0;
  scroll-margin-top: 80px;
}

.section-head {
  max-width: 660px;
  margin-bottom: 36px;
}

.kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

h2 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.028em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* ---------- flash ---------- */

.flash-card {
  background: var(--surface);
  border-radius: 32px;
  padding: 38px;
  box-shadow: var(--shadow);
}

.flash-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.flash-top h3 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.flash-top .muted {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #eefaf0;
  color: #1f7a3c;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fb45a;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0 30px;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
}

.step .n {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.step b {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.step p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.fw-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fw-card {
  position: relative;
  display: block;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
}

.fw-card:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.14);
}

.fw-card:focus-within {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.fw-card.is-selected {
  background: #fff8f3;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 12px 30px -22px rgba(255, 107, 0, 0.6);
}

.fw-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fw-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fw-title b {
  font-size: 16.5px;
  letter-spacing: -0.015em;
}

.fw-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fw-check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.16);
  position: relative;
}

.fw-card.is-selected .fw-check {
  background: var(--accent);
  box-shadow: none;
}

.fw-card.is-selected .fw-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(42deg);
}

.fw-card > p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.fw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.fw-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fw-meta span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
}

.fw-sha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
}

.fw-sha code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy {
  flex: none;
  margin-left: auto;
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.copy:hover {
  background: rgba(0, 0, 0, 0.09);
  color: var(--text);
}

.copy.copied {
  background: #eefaf0;
  color: #1f7a3c;
}

.flash-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.install-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
}

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

.install-msg {
  display: block;
  max-width: 460px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff6e6;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.6;
}

.flash-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.flash-hint b {
  color: var(--text);
  font-weight: 600;
}

.fine-print {
  margin: 22px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- gallery ---------- */

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

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #e8e8ed;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-item.tall img {
  object-position: top;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 46px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
  color: #fff;
  pointer-events: none;
}

.gallery-item figcaption b {
  font-size: 14px;
  font-weight: 600;
}

.gallery-item figcaption span {
  font-size: 11.5px;
  opacity: 0.8;
}

/* ---------- features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 26px 24px;
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.4);
}

.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.feature .icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin: 16px 0 8px;
  font-size: 16.5px;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- hardware ---------- */

.hardware-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.hardware-visual {
  padding: 18px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hardware-visual img {
  width: 100%;
  border-radius: 16px;
}

.hardware-specs h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.hardware-specs > p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.spec-table {
  border-top: 1px solid var(--line);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.spec-row span:first-child {
  flex: none;
  color: var(--muted);
}

.spec-row span:last-child {
  text-align: right;
  font-weight: 550;
}

.pin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pin-chips span {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.pin-chips b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- cta band ---------- */

.cta-band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  border-radius: 32px;
  overflow: hidden;
  background: url("../assets/img/clock-desk.jpg") center 62% / cover no-repeat;
  text-align: center;
  color: #fff;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, 0.45), rgba(10, 8, 6, 0.72));
}

.cta-content {
  position: relative;
  z-index: 1;
  padding: 48px 24px;
}

.cta-content h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
}

.cta-content p {
  margin: 0 auto 26px;
  max-width: 40em;
  font-size: 14.5px;
  line-height: 1.75;
  text-wrap: pretty;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- faq ---------- */

.faq {
  max-width: 820px;
}

.faq details {
  margin-bottom: 10px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.25s;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details[open] summary {
  padding-bottom: 8px;
}

.faq .answer {
  padding: 0 24px 20px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.faq .answer code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.05);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 24px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner .brand {
  font-size: 13.5px;
  color: var(--text);
}

.footer-inner .brand svg {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.footer-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 32px;
  background: rgba(10, 10, 12, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.lightbox.open {
  display: grid;
}

.lightbox img {
  max-width: min(1080px, 100%);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

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

  .hero {
    padding: 52px 0 48px;
  }

  .hero-visual {
    max-width: 640px;
  }

  .hero-stats {
    gap: 28px;
  }

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

  .hardware-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav-links a:not(.btn) {
    display: none;
  }
}

@media (max-width: 680px) {
  .container {
    width: calc(100% - 32px);
  }

  .section {
    padding: 54px 0;
  }

  .flash-card {
    padding: 22px;
    border-radius: 24px;
  }

  .steps,
  .fw-options,
  .gallery,
  .features {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    aspect-ratio: 4 / 3;
  }

  .flash-action {
    align-items: stretch;
    gap: 16px;
  }

  .flash-hint {
    text-align: left;
  }

  .hero-stats {
    gap: 26px 30px;
  }

  .cta-band {
    border-radius: 24px;
    min-height: 300px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .gallery-item img {
    transition: none;
  }
}
