:root {
  color-scheme: light dark;
  --page: #f4f7f2;
  --surface: #e8efe7;
  --surface-strong: #dce8dc;
  --ink: #18201b;
  --muted: #576159;
  --line: #cbd7ca;
  --accent: #246b3c;
  --accent-hover: #1d5832;
  --accent-text: #f7fbf7;
  --focus: #d78a17;
  --radius-card: 18px;
  --radius-button: 12px;
  --shadow: 0 24px 70px rgba(47, 77, 55, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans Thai", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111713;
    --surface: #19221c;
    --surface-strong: #202d24;
    --ink: #edf4ee;
    --muted: #abb8ae;
    --line: #344439;
    --accent: #59a96f;
    --accent-hover: #70bb84;
    --accent-text: #0f1711;
    --focus: #f0aa3a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  min-height: min(760px, 88dvh);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  padding: clamp(64px, 10vh, 96px) 0;
}

.hero-copy {
  max-width: 620px;
}

.brand-name {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(48px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-description {
  max-width: 34em;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.download-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border-radius: var(--radius-button);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.download-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateY(-2px);
}

.download-button:active {
  transform: scale(0.98);
}

.download-button:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.download-button.is-downloading {
  pointer-events: none;
  opacity: 0.82;
}

.device-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.brand-visual {
  justify-self: end;
  width: min(100%, 430px);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.image-field {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 5px);
  background: color-mix(in srgb, var(--page) 76%, var(--surface));
}

.image-field img {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.release-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 26px 0 0;
}

.release-facts div {
  min-width: 0;
}

.release-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.release-facts dd {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 720;
}

.install-guide {
  padding: clamp(72px, 10vw, 120px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 620px;
}

.section-heading h2,
.security-note h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-heading p,
.security-note p {
  color: var(--muted);
  line-height: 1.7;
}

.section-heading p {
  margin: 18px 0 0;
  font-size: 17px;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: flex;
  gap: 18px;
  padding: 26px 0;
  border-top: 2px solid var(--accent);
}

.step-number {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.install-steps h3 {
  margin: 3px 0 10px;
  font-size: 19px;
}

.install-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.security-note {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
  gap: clamp(36px, 7vw, 92px);
  align-items: end;
  padding: clamp(42px, 7vw, 72px);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
}

.security-note p {
  margin: 18px 0 0;
}

.security-note strong {
  color: var(--ink);
}

.checksum {
  min-width: 0;
  font-size: 13px;
}

.checksum code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.7;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 max(40px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 4px;
}

@media (max-width: 767px) {
  main,
  footer {
    width: min(100% - 32px, 620px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 64px 0 72px;
  }

  h1 {
    max-width: 9ch;
    font-size: clamp(44px, 14vw, 62px);
  }

  .hero-description {
    margin-top: 22px;
  }

  .download-button {
    width: 100%;
  }

  .brand-visual {
    justify-self: stretch;
    width: 100%;
  }

  .install-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .security-note {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }

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

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

  .download-button {
    transition: none;
  }

  .download-button:hover,
  .download-button:active {
    transform: none;
  }
}
