:root {
  --bg: #ffffff;
  --subtle: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue: #0f62fe;
  --blue-dark: #111827;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
  --focus: 0 0 0 3px rgba(15, 98, 254, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--text);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: 13px;
  height: 2px;
  content: "";
  background: #ffffff;
}

.brand-mark::before {
  left: 6px;
  width: 16px;
}

.brand-mark::after {
  left: 9px;
  width: 10px;
  box-shadow:
    -6px 0 0 #ffffff,
    6px 0 0 #ffffff;
}

.nav {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.header-action,
.primary-action,
.secondary-action {
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

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

.nav a:focus-visible,
.header-action:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.code-button:focus-visible,
.dialog-close:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.header-action {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.header-action:hover {
  border-color: #cbd5e1;
}

.hero,
.section,
.qrcode-section,
.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  gap: 56px;
  min-height: calc(100vh - 68px);
  padding: 56px 0 80px;
}

.hero-content {
  max-width: 680px;
}

.hero-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 22px;
  font-size: clamp(40px, 4.8vw, 64px);
  font-weight: 650;
  line-height: 1.04;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 620;
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.3;
}

.hero-copy {
  max-width: 610px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
}

.primary-action {
  border: 1px solid var(--text);
  background: var(--text);
  color: #ffffff;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #1f2937;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary-action:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.scan-card {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.scan-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.scan-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.mini-program-code {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
}

.code-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}

.code-button img {
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.code-button:hover img {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.1);
}

.section,
.qrcode-section,
#scan-panel {
  scroll-margin-top: 88px;
}

.section {
  padding: 96px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-heading.narrow {
  max-width: 680px;
}

.section-heading p:not(.eyebrow),
.audience-list p,
.feature-grid p,
.loop p {
  color: var(--muted);
  line-height: 1.75;
}

.loop {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0;
  list-style: none;
}

.loop li,
.feature-grid article {
  min-height: 230px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.loop li:last-child,
.feature-grid article:last-child {
  border-right: 0;
}

.loop span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid article {
  min-height: 210px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.audience-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.audience-list p {
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.qrcode-section {
  padding: 96px 0;
}

.qr-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.reward-card {
  max-width: 360px;
}

.qr-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.reward-code-button {
  margin-bottom: 22px;
}

.reward-code {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.code-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.code-dialog::backdrop {
  background: rgba(17, 24, 39, 0.54);
  backdrop-filter: blur(6px);
}

.code-dialog img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.dialog-close {
  display: block;
  margin: 0 0 12px auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .hero-showcase {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 180px;
  }

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

  .scan-card {
    padding: 16px;
  }
}

@media (max-width: 920px) {
  .scan-card {
    width: 100%;
  }

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

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

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .hero-showcase {
    grid-template-columns: 1fr;
  }

  .scan-card {
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
  }
}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
  }

  .header-action {
    display: none;
  }

  h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .hero {
    gap: 36px;
    padding-bottom: 56px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .loop,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .scan-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .loop li,
  .feature-grid article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 68px 0;
  }

  .qrcode-section {
    padding: 68px 0;
  }

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