:root {
  color-scheme: dark;
  --background: #111313;
  --surface: #1b1e1d;
  --text: #eef3ef;
  --muted: #969e99;
  --subtle: #89928c;
  --border: #2b302e;
  --accent: #c3f977;
  --motion: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  background: var(--background);
  color: var(--text);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; }
body { font-size: 16px; line-height: 1.5; }
h1, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { color: var(--background); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.heading-1 { font-size: 60px; line-height: 1; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 400; }
h1, .tagline { text-wrap: balance; }
.description { text-wrap: pretty; }

.container { width: calc(100% - 96px); max-width: 1120px; margin-inline: auto; }
.site-shell { height: 100svh; min-height: 640px; display: grid; grid-template-rows: 96px minmax(0, 1fr) minmax(64px, auto); }
.site-header { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: #1c2816; border-radius: 8px; }
.brand-mark .icon { width: 24px; height: 24px; }
.header-note { color: var(--subtle); }
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; background: currentColor; mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat; }

.hero { min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding-block: 24px 32px; }
.hero-copy { min-width: 0; padding-bottom: 24px; }
.eyebrow { color: var(--muted); display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.eyebrow > span { width: 24px; height: 2px; background: var(--accent); }
.heading-1 { white-space: nowrap; }
.title-period { color: var(--accent); margin-left: 4px; }
.tagline { margin-top: 24px; white-space: nowrap; }
.tagline > span { color: var(--accent); }
.description { max-width: 420px; color: var(--muted); margin-top: 24px; }
.feature-list { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; row-gap: 12px; margin-top: 40px; }
.feature-list > li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.feature-list .icon { color: var(--accent); width: 18px; height: 18px; }

.hero-visual { width: 100%; height: 100%; max-height: 624px; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 16px; gap: 12px; justify-items: center; align-self: center; }
.device { height: 100%; aspect-ratio: 336 / 624; position: relative; min-height: 0; filter: drop-shadow(0 24px 24px #00000040); }
.product-image { width: 100%; height: 100%; }
.scan-frame { position: absolute; top: 24.0385%; left: 9.5238%; width: 80.9524%; height: 16.0256%; opacity: 0; pointer-events: none; }
.focus-corner { position: absolute; width: 24px; height: 24px; border-color: var(--accent); border-style: solid; }
.focus-tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 8px 0 0; --focus-x: -8px; --focus-y: -8px; }
.focus-tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; --focus-x: 8px; --focus-y: -8px; }
.focus-bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; --focus-x: -8px; --focus-y: 8px; }
.focus-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 8px; --focus-x: 8px; --focus-y: 8px; }
.scan-area { pointer-events: none; position: absolute; overflow: hidden; top: 24.4%; left: 10.2%; width: 79.6%; height: 14.6%; border-radius: 4px; }
.scan-pass { position: absolute; inset: 0; border-bottom: 4px solid var(--accent); opacity: 0; }
.scan-pass::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: #c3f97730; box-shadow: 0 0 16px #c3f97766; }
.scan-confirmation { position: absolute; top: 24.0385%; left: 9.5238%; width: 80.9524%; height: 16.0256%; border-radius: 8px; background: #080b09ed; color: var(--accent); display: grid; place-items: center; opacity: 0; pointer-events: none; }
.scan-confirmation .icon { width: 20%; height: auto; aspect-ratio: 1; }
.result-shield, .result-reveal { position: absolute; left: 2.381%; top: 60.5769%; width: 95.2381%; height: 29.8077%; opacity: 0; pointer-events: none; }
.result-shield { background: var(--background); color: var(--muted); font-size: 12px; }
.result-progress { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.result-shield .icon { color: var(--accent); width: 24px; height: 24px; margin-bottom: 4px; }
.result-hint { color: var(--subtle); font-size: 10px; }
.result-reveal { overflow: hidden; }
/* Match the result region in the single product image before revealing it. */
.result-crop { width: 100%; height: 100%; background: url("assets/product-preview.png") 50% 86.3014% / 105% 335.4839% no-repeat; }
.device[data-scan="running"] .scan-frame { animation: frame-finish 0.4s var(--motion) 1.9s both; }
.device[data-scan="running"] .focus-corner { animation: focus-corner 0.4s var(--motion) both; }
.device[data-scan="running"] .scan-pass { animation: scan-once 1.5s var(--motion) 0.4s both; }
.device[data-scan="running"] .scan-confirmation { animation: confirm-scan 0.5s var(--motion) 1.85s both; }
.device[data-scan="running"] .result-shield, .device[data-scan="running"] .result-reveal { opacity: 1; }
.device[data-scan="running"] .result-progress { animation: fade-progress 0.3s var(--motion) 2s both; }
.device[data-scan="running"] .result-crop { animation: reveal-result 0.7s var(--motion) 2.3s both; }
.hero-visual figcaption { color: var(--subtle); display: flex; align-items: center; justify-content: center; gap: 12px; }
.caption-rule { width: 16px; height: 1px; background: var(--border); }

.site-footer { min-width: 0; border-top: 1px solid var(--border); color: var(--subtle); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 16px; }
.copyright { flex-shrink: 0; }
.footer-details { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 24px; min-width: 0; }
.footer-details > * { overflow-wrap: anywhere; }
.footer-details a { transition: color 0.3s var(--motion); }
.footer-details a:hover { color: var(--accent); }
.footer-details:has(#icp-link:not([hidden])) .footer-tagline { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 16px; padding: 8px 12px; background: var(--accent); color: var(--background); border-radius: 4px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

@keyframes focus-corner {
  from { opacity: 0.25; transform: translate(var(--focus-x), var(--focus-y)); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes frame-finish {
  0% { opacity: 0.7; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes scan-once {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes confirm-scan {
  0% { opacity: 0; transform: scale(0.88); }
  30%, 65% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes fade-progress {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes reveal-result {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 761px) and (max-height: 760px) {
  .site-shell { min-height: 560px; grid-template-rows: 72px minmax(0, 1fr) minmax(56px, auto); }
  .hero { padding-block: 16px 24px; }
  .hero-copy { padding-bottom: 0; }
  .feature-list { margin-top: 32px; }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .container { width: calc(100% - 64px); }
  .hero { gap: 32px; grid-template-columns: 1.2fr 1fr; }
  .heading-1 { font-size: 48px; }
  .tagline { font-size: 24px; line-height: 32px; }
  .feature-list { gap: 12px; }
  .feature-list > li { gap: 4px; }
  .hero-visual { max-height: 540px; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .site-shell { min-height: 568px; grid-template-rows: 64px minmax(0, 1fr) auto; }
  .site-header { justify-content: center; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .brand .title-2 { font-size: 16px; line-height: 24px; }
  .header-note, .eyebrow { display: none; }
  .hero { display: flex; flex-direction: column; gap: 24px; padding-block: 12px 16px; }
  .hero-copy { flex: 0 0 auto; padding: 0; text-align: center; }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .tagline { font-size: 20px; line-height: 28px; margin-top: 8px; }
  .description { max-width: 340px; font-size: 14px; line-height: 20px; margin: 16px auto 0; }
  .feature-list { justify-content: center; margin-top: 16px; column-gap: 16px; row-gap: 8px; font-size: 12px; line-height: 16px; }
  .feature-list > li { gap: 4px; }
  .feature-list .icon { width: 16px; height: 16px; }
  .hero-visual { flex: 1 1 0; min-height: 0; max-height: 464px; gap: 8px; }
  .device { max-width: 100%; }
  .result-shield { font-size: 10px; }
  .result-progress { gap: 4px; }
  .focus-corner { width: 16px; height: 16px; }
  .result-hint { display: none; }
  .result-shield .icon { width: 16px; height: 16px; margin: 0; }
  .site-footer { min-height: 48px; gap: 4px 12px; padding-block: 12px; }
  .footer-details { gap: 4px 12px; }
}

@media (max-width: 760px) and (max-height: 720px) {
  .site-shell { grid-template-rows: 48px minmax(0, 1fr) auto; }
  .hero { gap: 12px; padding-block: 8px 12px; }
  .description { margin-top: 12px; }
  .feature-list { margin-top: 12px; }
  .site-footer { min-height: 40px; padding-block: 8px; }
}

@media (max-width: 359px) {
  .container { width: calc(100% - 32px); }
  .description { max-width: 280px; }
  .feature-list { column-gap: 12px; }
  .footer-tagline { display: none; }
}

@media (orientation: landscape) and (max-width: 950px) and (max-height: 520px) {
  .site-shell { min-height: 320px; grid-template-rows: 40px minmax(0, 1fr) auto; }
  .site-header { justify-content: flex-start; }
  .hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding-block: 8px; }
  .hero-copy { text-align: left; padding-bottom: 0; }
  .header-note, .eyebrow { display: none; }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .tagline { font-size: 20px; line-height: 28px; margin-top: 8px; }
  .description { font-size: 14px; line-height: 20px; margin: 12px 0 0; }
  .feature-list { justify-content: flex-start; margin-top: 12px; gap: 12px; font-size: 12px; line-height: 16px; }
  .feature-list > li { gap: 4px; }
  .feature-list .icon { width: 16px; height: 16px; }
  .hero-visual { max-height: none; gap: 8px; }
  .site-footer { min-height: 32px; padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scan-frame, .scan-pass, .scan-confirmation, .result-shield, .result-reveal { opacity: 0 !important; }
}
