:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #647082;
  --line: #dbe4e7;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #2563eb;
  --amber: #d97706;
  --soft-green: #e8f6f2;
  --soft-blue: #eaf0ff;
  --radius: 8px;
  --shadow: 0 18px 40px rgba(15, 35, 50, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 7vw;
  border-bottom: 1px solid rgba(219, 228, 231, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border-radius: var(--radius);
  background: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #314055;
  font-size: 15px;
  white-space: nowrap;
}

.nav a:hover,
.site-footer a:hover {
  color: var(--primary);
}

.auth-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.auth-guest,
.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user {
  min-height: 38px;
  padding: 4px 6px 4px 12px;
  border: 1px solid rgba(189, 203, 208, 0.8);
  border-radius: var(--radius);
  background: #fff;
  color: #2e3c51;
  font-size: 14px;
  font-weight: 800;
}

.auth-link {
  padding: 0;
  border: 0;
  color: #314055;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-link:hover {
  color: var(--primary);
}

.auth-register {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero {
  min-height: 78svh;
  display: flex;
  align-items: center;
  padding: 72px 7vw;
  background:
    linear-gradient(90deg, rgba(247, 250, 249, 0.97) 0%, rgba(247, 250, 249, 0.88) 42%, rgba(247, 250, 249, 0.35) 100%),
    url("../images/vending-pay-scene.png") center right / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-content {
  width: min(660px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.06;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
}

p {
  color: var(--muted);
}

.hero-copy {
  max-width: 600px;
  margin-bottom: 28px;
  font-size: 18px;
  color: #344155;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

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

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  color: var(--ink);
  border-color: #bdcbd0;
  background: rgba(255, 255, 255, 0.84);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(189, 203, 208, 0.8);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: #445064;
}

.hero-metrics strong {
  color: var(--primary);
  font-size: 22px;
}

.section {
  padding: 84px 7vw;
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 34px;
}

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

.section-band {
  background: #eef5f3;
}

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

.process-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(15, 35, 50, 0.06);
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  color: var(--primary);
  background: var(--soft-green);
  font-weight: 900;
}

.platform-section {
  background: #fff;
}

.platform-lead {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
}

.platform-lead .section-heading {
  margin-bottom: 0;
}

.platform-reason {
  padding: 28px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #f2f8f6;
}

.platform-reason h3 {
  margin-bottom: 14px;
  font-size: clamp(22px, 3vw, 32px);
}

.platform-reason p:last-child {
  margin-bottom: 0;
}

.capability-header {
  margin: 50px 0 20px;
}

.capability-header h3 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
}

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

.capability-card {
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(15, 35, 50, 0.06);
}

.capability-card:nth-child(2) .step {
  color: var(--blue);
  background: var(--soft-blue);
}

.capability-card p {
  margin-bottom: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.split-layout > div:first-child p {
  font-size: 17px;
}

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

.feature-list > div {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(164, 183, 190, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.feature-list > div:nth-child(2) {
  background: var(--soft-blue);
}

.feature-list > div:nth-child(3) {
  background: #fff7ed;
}

.merchant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.merchant-form,
.merchant-note,
.settlement-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.merchant-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 26px;
}

.merchant-form label {
  display: grid;
  gap: 8px;
  color: #2e3c51;
  font-weight: 800;
}

.merchant-form .label-full,
.merchant-form button,
.form-message {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c8d5da;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--primary);
}

.form-message {
  min-height: 26px;
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

.auth-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 35, 50, 0.24);
}

.auth-dialog::backdrop {
  background: rgba(23, 32, 51, 0.48);
  backdrop-filter: blur(5px);
}

.auth-panel {
  padding: 28px;
}

.auth-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.auth-panel-header h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.auth-panel-header p {
  margin-bottom: 0;
}

.auth-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover {
  color: var(--ink);
  border-color: #bdcbd0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f8f7;
}

.auth-tab {
  min-height: 38px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  color: #fff;
  background: var(--primary);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #2e3c51;
  font-weight: 800;
}

.auth-form .button {
  width: 100%;
  margin-top: 4px;
}

.auth-message {
  min-height: 24px;
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

.auth-message.is-error {
  color: #b42318;
}

.merchant-note {
  padding: 28px;
}

.merchant-note h3 + p {
  margin-bottom: 22px;
}

.settlement-panel {
  padding: 18px;
}

.settlement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.settlement-row:last-child {
  border-bottom: 0;
}

.settlement-row span {
  color: var(--muted);
}

.settlement-row strong {
  color: var(--ink);
  text-align: right;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  background: #fff;
}

.contact-list {
  display: grid;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.contact-list p {
  margin: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 24px;
  padding: 36px 7vw;
  color: #d5dde3;
  background: #172033;
}

.site-footer p {
  color: #aeb9c5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: flex-end;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
}

.policy-main {
  padding: 56px 7vw 84px;
  background: #fff;
}

.policy-article {
  width: min(920px, 100%);
  margin: 0 auto;
}

.policy-article h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 52px);
}

.policy-article section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.policy-article section:last-child {
  border-bottom: 0;
}

.policy-article ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--primary);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 16px 5vw;
  }

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

  .auth-actions,
  .auth-guest,
  .auth-user {
    width: 100%;
  }

  .auth-guest {
    justify-content: flex-start;
  }

  .auth-user {
    justify-content: space-between;
  }

  .hero {
    min-height: 72svh;
    padding: 56px 5vw;
    background:
      linear-gradient(180deg, rgba(247, 250, 249, 0.98) 0%, rgba(247, 250, 249, 0.9) 50%, rgba(247, 250, 249, 0.64) 100%),
      url("../images/vending-pay-scene.png") center bottom / cover no-repeat;
  }

  .section,
  .policy-main {
    padding-left: 5vw;
    padding-right: 5vw;
  }

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

  .platform-lead,
  .split-layout,
  .merchant-layout,
  .contact-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .brand {
    font-size: 17px;
  }

  .nav {
    gap: 16px;
    font-size: 14px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-copy,
  .section-heading p,
  .split-layout > div:first-child p {
    font-size: 16px;
  }

  .hero-actions,
  .hero-metrics {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .hero-metrics span {
    width: 100%;
  }

  .process-grid,
  .capability-grid,
  .feature-list,
  .merchant-form {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .merchant-form,
  .merchant-note,
  .contact-list {
    padding: 20px;
  }

  .settlement-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .settlement-row strong {
    text-align: left;
  }
}
