/* HeyAban website. Cream and lavender, matching the app; values follow the landing page design scale. */

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --cream: #fffaf5;
  --paper: #fffdfb;
  --lav-50: #f7f2fc;
  --lav-100: #efe6f9;
  --lav-200: #e2d5f3;
  --purple: #8570bc;
  --purple-600: #7055a8;
  --ink: #45325f;
  --text: #5c4f70;
  --muted: #8f86a3;
  --border: #ece3f4;
  --peach: #fde7dc;
  --peach-ink: #b8654a;
  --sage: #e7efe2;
  --sage-ink: #5e7f57;
  --gold: #f3c76b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 48px rgba(112, 85, 168, 0.12);
  font-family: "Poppins", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  overflow-x: hidden;
}
body.menu-open,
body.modal-open {
  overflow: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--purple-600);
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
p,
li,
dd {
  text-wrap: pretty;
}
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}
.icon.big {
  width: 40px;
  height: 40px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
  transition: transform 300ms var(--ease);
}
.skip-link:focus {
  transform: none;
}
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: 8px;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}
.container.narrow {
  width: min(760px, 100% - 48px);
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.center {
  text-align: center;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(112, 85, 168, 0.24);
  transition:
    transform 500ms var(--ease),
    background-color 300ms var(--ease),
    opacity 300ms var(--ease);
}
.button:hover {
  background: var(--purple-600);
  transform: translateY(-2px);
}
.button:active {
  transform: scale(0.98);
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}
.button.small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.button.soft {
  background: var(--lav-100);
  color: var(--purple-600);
  box-shadow: none;
}
.button.soft:hover {
  background: var(--lav-200);
}
.button.ghost {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.button.ghost:hover {
  background: var(--lav-50);
  color: var(--purple-600);
}
.button.wide {
  width: 100%;
}
.button.loading .icon {
  animation: pulse 1200ms var(--ease) infinite;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: var(--lav-100);
  color: var(--purple-600);
  cursor: pointer;
  transition: transform 500ms var(--ease);
}
.icon-button:hover {
  transform: rotate(90deg);
}

/* ---------- navigation ---------- */

.nav-wrap {
  position: fixed;
  inset: 16px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: rgba(255, 250, 245, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(112, 85, 168, 0.1);
  position: relative;
  z-index: 2;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.75rem;
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 12px;
  border-radius: 9999px;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current] {
  background: var(--lav-100);
  color: var(--purple-600);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 9999px;
  background: var(--lav-100);
}
.lang-switch button {
  min-width: 44px;
  padding: 4px 12px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--purple-600);
  box-shadow: 0 2px 8px rgba(112, 85, 168, 0.12);
}
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
  padding: 4px 12px 4px 4px;
  border-radius: 9999px;
  background: var(--lav-100);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.account-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--purple);
  color: #fff;
}
.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: var(--lav-100);
  cursor: pointer;
}
.menu-line {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 500ms var(--ease);
}
.menu-line:first-of-type {
  transform: translateY(-4px);
}
.menu-line:last-of-type {
  transform: translateY(4px);
}
.menu-toggle[aria-expanded="true"] .menu-line:first-of-type {
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-line:last-of-type {
  transform: rotate(-45deg);
}
.mobile-menu {
  pointer-events: auto;
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 96px 24px 32px;
  background: rgba(255, 250, 245, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.mobile-menu.open {
  opacity: 1;
}
.mobile-menu a {
  padding: 12px 16px;
  border-radius: 16px;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}
.mobile-menu.open a {
  opacity: 1;
  transform: none;
}
.mobile-menu a:nth-child(2) {
  transition-delay: 60ms;
}
.mobile-menu a:nth-child(3) {
  transition-delay: 120ms;
}
.mobile-menu a:nth-child(4) {
  transition-delay: 180ms;
}
.mobile-menu a:nth-child(5) {
  transition-delay: 240ms;
  color: var(--purple-600);
}

/* ---------- hero ---------- */

.hero {
  padding: 128px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--purple);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
:lang(zh-Hans) .eyebrow {
  letter-spacing: 0.08em;
}
.hero-title {
  max-width: 680px;
  font-size: 3.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #45325f, #9077c9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 8px;
}
:lang(zh-Hans) .hero-title {
  letter-spacing: 0;
  line-height: 1.1;
}
.hero-sub {
  max-width: 680px;
  margin-top: 24px;
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.hero-cta {
  margin-top: 32px;
}
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.proof .icon {
  color: var(--purple);
}
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
}
.halo {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 9999px;
  background: var(--lav-100);
}
.halo::after {
  content: "";
  position: absolute;
  inset: 48px;
  border-radius: 9999px;
  background: var(--lav-50);
}

/* phone frame */
.phone {
  position: relative;
  margin: 0;
  width: 300px;
  padding: 8px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.phone img {
  border-radius: 16px;
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  background: var(--lav-50);
}
.phone.small {
  width: 240px;
}
.phone-hero {
  width: 290px;
  transform: rotate(-3deg);
}
.mascot-float {
  position: absolute;
  right: -8px;
  bottom: 40px;
  width: 200px;
  filter: drop-shadow(0 16px 24px rgba(112, 85, 168, 0.2));
  animation: float 6000ms var(--ease) infinite;
}
.chip {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(112, 85, 168, 0.12);
  color: #d27f9c;
  animation: float 7000ms var(--ease) infinite;
}
.chip .icon {
  width: 24px;
  height: 24px;
}
.chip-a {
  left: 24px;
  top: 120px;
}
.chip-b {
  right: 48px;
  top: 64px;
  color: var(--purple);
  animation-delay: -2000ms;
}
.bubble {
  position: absolute;
  left: 0;
  bottom: 96px;
  max-width: 220px;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(112, 85, 168, 0.12);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  animation: float 8000ms var(--ease) infinite;
  animation-delay: -4000ms;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ---------- sections ---------- */

.section {
  padding: 96px 0;
}
.section-head {
  max-width: 680px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head.left {
  margin: 0 0 40px;
  text-align: left;
}
.section-head h2 {
  font-size: 2.25rem;
  line-height: 2.5rem;
  letter-spacing: -0.01em;
}
.section-head p:not(.eyebrow) {
  margin-top: 16px;
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.section-head strong {
  color: var(--purple-600);
}

.feature-list {
  display: grid;
  gap: 32px;
}
.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
  padding: 48px 64px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  overflow: hidden;
}
.feature.flip {
  grid-template-columns: auto 1fr;
}
.feature.flip .feature-copy {
  order: 2;
}
.feature .phone {
  width: 260px;
  margin-bottom: -96px;
  box-shadow: none;
  background: var(--lav-50);
}
.feature-copy h3 {
  margin-top: 24px;
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.feature-copy p {
  margin-top: 16px;
  max-width: 480px;
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--lav-100);
  color: var(--purple-600);
}
.feature-icon .icon {
  width: 24px;
  height: 24px;
}
.feature-icon.peach {
  background: var(--peach);
  color: var(--peach-ink);
}
.feature-icon.sage {
  background: var(--sage);
  color: var(--sage-ink);
}
.ticks {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 32px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: var(--lav-100)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%237055a8'%3E%3Cpath d='M229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* tagline reveal */
.tagline {
  padding: 128px 0;
  background: var(--lav-50);
}
.tagline-text {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
  font-size: 3.75rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
:lang(zh-Hans) .tagline-text {
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.word {
  opacity: 0.28;
  transition: opacity 600ms var(--ease);
}
.word.on {
  opacity: 1;
}

/* how it works */
.how-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 80px;
}
.steps {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
}
.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--lav-100);
  color: var(--purple-600);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}
.step h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.step p {
  margin-top: 4px;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.platform {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--lav-100);
  color: var(--purple-600);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

/* ---------- energy / top up ---------- */

.energy {
  background: var(--lav-50);
}
.energy-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}
.energy-side {
  display: grid;
  gap: 32px;
  justify-items: center;
}
.where {
  width: 100%;
  padding: 24px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
}
.where h3 {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.where ul {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.where li {
  display: flex;
  gap: 12px;
}
.where .icon {
  color: var(--purple);
}
.card {
  padding: 40px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topup-view[data-view="login"] {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 32px 0;
  text-align: center;
}
.topup-view[data-view="login"] h3 {
  font-size: 1.5rem;
  line-height: 2rem;
}
.topup-view[data-view="login"] p {
  max-width: 440px;
}
.topup-mascot {
  width: 132px;
  animation: float 6000ms var(--ease) infinite;
}
.shop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.shop-name {
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
}
.balance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.balance div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: var(--lav-50);
}
.balance div:nth-child(2) {
  background: #fff6e3;
}
.balance div:nth-child(3) {
  background: var(--sage);
}
.balance strong {
  color: var(--ink);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
}
.status-banner {
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--lav-100);
  color: var(--ink);
  font-weight: 500;
}
.status-banner[data-kind="ok"] {
  background: var(--sage);
  color: #3f5f39;
}
.status-banner[data-kind="warn"] {
  background: var(--peach);
  color: #8a4430;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 32px;
  border-radius: 16px;
  background: var(--lav-50);
  text-align: center;
  color: var(--text);
}
.empty .icon {
  color: var(--purple);
}
.empty h4 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
fieldset {
  margin: 32px 0 0;
  padding: 0;
  border: 0;
}
legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 600;
}
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pack {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--paper);
  cursor: pointer;
  transition:
    border-color 300ms var(--ease),
    background-color 300ms var(--ease),
    transform 500ms var(--ease);
}
.pack:hover {
  transform: translateY(-2px);
  border-color: var(--lav-200);
}
.pack:has(input:checked) {
  border-color: var(--purple);
  background: var(--lav-50);
}
.pack:has(input:focus-visible),
.method:has(input:focus-visible) {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}
.pack input,
.method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pack-energy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.pack-energy b {
  font-weight: 600;
}
.pack-energy .icon {
  width: 20px;
  height: 20px;
  color: var(--gold);
}
.pack-unit,
.pack-name {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.pack-price {
  margin-top: 8px;
  color: var(--purple-600);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
}
.method-list {
  display: grid;
  gap: 12px;
}
.method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.method:hover {
  border-color: var(--lav-200);
}
.method:has(input:checked) {
  border-color: var(--purple);
  background: var(--lav-50);
}
.method-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--lav-100);
  color: var(--purple-600);
}
.method-copy {
  display: grid;
}
.method-copy b {
  color: var(--ink);
  font-weight: 600;
}
.method-copy small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.breakdown {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--lav-50);
}
.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.breakdown dt {
  color: var(--muted);
}
.breakdown dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.breakdown .total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--lav-200);
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.breakdown .total dt,
.breakdown .total dd {
  color: var(--ink);
  font-weight: 600;
}
.consent {
  display: flex;
  gap: 12px;
  margin: 24px 0 16px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--purple);
}
.field-error {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--peach);
  color: #8a4430;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
form .button.wide + .muted {
  margin-top: 12px;
}
.orders {
  margin-top: 40px;
}
.orders h4 {
  font-size: 1rem;
  line-height: 1.5rem;
}
.orders ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.order {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.order > div {
  display: grid;
  flex: 1;
  min-width: 0;
}
.order b {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.order small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill {
  flex: none;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--lav-100);
  color: var(--purple-600);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}
.pill[data-state="paid"] {
  background: var(--sage);
  color: var(--sage-ink);
}
.pill[data-state="unknown"] {
  background: var(--peach);
  color: var(--peach-ink);
}

/* skeletons */
.skeleton {
  border-radius: 12px;
  background: var(--lav-100);
  animation: pulse 1600ms var(--ease) infinite;
}
.skeleton.line {
  height: 20px;
  margin-bottom: 12px;
}
.skeleton.w40 {
  width: 40%;
  height: 32px;
}
.skeleton.w70 {
  width: 70%;
}
.skeleton.pack {
  height: 128px;
  border-radius: 16px;
}
.topup-view[data-view="loading"] .pack-grid {
  margin-top: 32px;
}
.skeleton.code {
  height: 64px;
  margin: 24px 0 16px;
  border-radius: 16px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
}
.faq-item {
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  transition: background-color 300ms var(--ease);
}
.faq-item[open] {
  background: var(--lav-50);
}
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .icon {
  color: var(--purple);
  transition: transform 500ms var(--ease);
}
.faq-item[open] summary .icon {
  transform: rotate(180deg);
}
.faq-item p {
  padding: 0 24px 24px;
}

/* ---------- final CTA ---------- */

.final {
  padding: 0 0 96px;
}
.final-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.final-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.final-copy {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: 48px;
}
.final-copy h2 {
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
:lang(zh-Hans) .final-copy h2 {
  line-height: 1.2;
}
.final-copy p {
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin-bottom: 8px;
}

/* ---------- footer ---------- */

.footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer nav a {
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-decoration: none;
}
.footer nav a:hover {
  color: var(--purple-600);
  text-decoration: underline;
}

/* ---------- login modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(69, 50, 95, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 300ms var(--ease);
}
.modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 40px 32px 32px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise 500ms var(--ease);
}
.modal-card .feature-icon {
  margin-bottom: 16px;
}
.modal-card h3 {
  font-size: 1.5rem;
  line-height: 2rem;
  margin-bottom: 12px;
}
.modal-card .close {
  position: absolute;
  top: 16px;
  right: 16px;
}
.code {
  margin: 24px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--lav-50);
  color: var(--ink);
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
.waiting {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.pulse {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 9999px;
  background: var(--purple);
  animation: pulse 1200ms var(--ease) infinite;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}
.lost img {
  width: 200px;
  margin: 0 auto 24px;
  animation: float 6000ms var(--ease) infinite;
}
.lost h1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.lost p {
  margin: 12px 0 24px;
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-block;
  }
  .hero-grid,
  .how-grid,
  .energy-grid,
  .final-card {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-title,
  .hero-sub {
    margin-inline: auto;
  }
  .hero-title {
    font-size: 3rem;
  }
  .proof {
    justify-content: center;
  }
  .hero-visual {
    min-height: 560px;
  }
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 32px 0;
    justify-items: center;
    text-align: center;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .feature-copy p {
    margin-inline: auto;
  }
  .ticks {
    justify-items: center;
  }
  .feature .phone {
    margin-bottom: -64px;
  }
  .how-grid > .phone {
    justify-self: center;
  }
  .energy-side {
    order: 2;
  }
  .tagline-text {
    font-size: 3rem;
  }
}

@media (max-width: 640px) {
  .nav {
    gap: 8px;
    padding-left: 12px;
  }
  .brand span {
    display: none;
  }
  .nav-actions .button.small span {
    display: none;
  }
  .nav-actions .button.small {
    width: 40px;
    padding: 0;
  }
  .account-chip span:last-child {
    display: none;
  }
  .account-chip {
    padding: 4px;
  }
  .hero {
    padding-top: 112px;
  }
  .hero-title {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .hero-sub {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  .hero-visual {
    min-height: 480px;
  }
  .halo {
    width: 340px;
    height: 340px;
  }
  .phone-hero {
    width: 230px;
  }
  .mascot-float {
    width: 140px;
    right: 0;
    bottom: 16px;
  }
  .bubble {
    bottom: 40px;
    max-width: 160px;
  }
  .chip-a {
    left: 8px;
  }
  .chip-b {
    right: 16px;
  }
  .section {
    padding: 64px 0;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .section-head h2 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .feature,
  .feature.flip {
    padding: 32px 24px 0;
  }
  .feature-copy h3 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .feature .phone {
    width: 220px;
  }
  .tagline {
    padding: 80px 0;
  }
  .tagline-text {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .card {
    padding: 24px;
  }
  .pack-grid {
    grid-template-columns: 1fr;
  }
  .pack {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 4px 12px;
  }
  .pack-energy {
    grid-row: span 2;
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .pack-price {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .balance strong {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .balance div {
    padding: 12px;
  }
  .final-copy {
    padding: 32px 24px;
  }
  .final-copy h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
  }
  .reveal {
    transform: none;
    transition: opacity 300ms var(--ease);
  }
  .mobile-menu a {
    transform: none;
  }
  .button:hover,
  .pack:hover {
    transform: none;
  }
}
