:root {
  --ink: #172033;
  --muted: #607284;
  --line: #dce6ef;
  --page: #f6f8fb;
  --panel: #ffffff;
  --navy: #071d32;
  --blue: #123d66;
  --gold: #c99a3c;
  --green: #0f8f67;
  --red: #c73737;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.home-page {
  scroll-padding-top: calc(var(--home-header-height, 160px) + 12px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(220, 230, 239, 0.8);
  background: rgba(246, 248, 251, 0.94);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 118px;
}

.home-page .brand img {
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

nav a {
  padding: 10px 12px;
  border-radius: 8px;
}

nav a:hover,
.portal-link {
  color: var(--blue);
  background: #fff;
}

.language-toggle {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.language-toggle button {
  min-width: 44px;
  min-height: 38px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.language-toggle button.active {
  background: var(--blue);
  color: #fff;
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 68px) clamp(18px, 6vw, 84px);
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.03;
}

h2 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.14;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: 18px;
}

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

.primary-button,
.secondary-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  border: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.hero-media {
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy);
  box-shadow: 0 24px 70px rgba(7, 29, 50, 0.22);
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
}

.hero-media picture {
  display: block;
}

.hero-media img {
  object-fit: cover;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(18px, 6vw, 84px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.trust-strip div,
.steps article,
.feature-list div,
.product-card,
.order-form {
  background: #fff;
}

.trust-strip div {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.trust-strip strong {
  color: var(--blue);
  font-size: 20px;
}

.trust-strip span,
.feature-list span {
  color: var(--muted);
}

.section {
  padding: clamp(52px, 7vw, 92px) clamp(18px, 6vw, 84px);
}

.section-head {
  max-width: 820px;
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

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

.steps article {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 154, 60, 0.16);
  color: var(--gold);
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  gap: 30px;
  align-items: start;
  background: #fff;
}

.split > div:first-child {
  display: grid;
  gap: 14px;
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-list div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product {
  background: var(--navy);
}

.product-card {
  max-width: 980px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 8px;
}

.product-card img {
  width: 120px;
}

.product-card div {
  display: grid;
  gap: 10px;
}

.download-cta-section {
  padding-top: 0;
}

.download-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.download-cta div {
  display: grid;
  gap: 10px;
}

.download-cta h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.wide {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-status {
  align-self: center;
}

.form-status.good {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

.download-page {
  padding: clamp(32px, 6vw, 76px) clamp(18px, 6vw, 84px);
}

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.download-copy {
  display: grid;
  gap: 18px;
}

.download-copy h1 {
  max-width: 760px;
  font-size: clamp(40px, 6vw, 70px);
}

.download-copy > p:not(.eyebrow) {
  max-width: 680px;
  font-size: 18px;
}

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

.download-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.qr-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7, 29, 50, 0.1);
  text-align: center;
}

.qr-code-image {
  width: 260px;
  height: 260px;
  border-radius: 8px;
}

.qr-panel strong {
  font-size: 20px;
}

.qr-panel span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 6vw, 72px);
}

.download-grid article,
.download-note {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.download-grid span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.download-note {
  margin-top: 16px;
  border-color: rgba(201, 154, 60, 0.45);
  background: #fffaf0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 6vw, 84px);
  background: #fff;
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 112px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--blue);
  font-weight: 900;
}

.legal-page {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0;
}

.legal-hero {
  display: grid;
  gap: 12px;
  padding: 28px 0 34px;
}

.legal-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.legal-card {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legal-card h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.legal-card ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.legal-card a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  html.home-page {
    scroll-padding-top: calc(var(--home-header-height, 246px) + 12px);
  }

  .site-header,
  .site-footer,
  .download-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .split,
  .product-card,
  .order-form,
  .download-hero,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 420px;
  }

  .trust-strip,
  .steps {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    width: min(100%, 340px);
    justify-self: center;
  }
}
