/* Landy Money — product site
   Palette and surfaces follow the app's own theme tokens (constants/theme.ts).
   Motif: the 電子發票 receipt slip — mono type, torn edge, dotted flow line. */

:root {
  --paper: #f7f8fa;
  --card: #ffffff;
  --sunk: #eef1f5;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --hair: #e3e8ef;
  --blue: #0366c7;
  --blue-ink: #0366c7;
  --blue-soft: #e8f1fc;
  --green: #00960e;
  --amber: #fece4c;
  --shadow-s: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .05);
  --shadow-l: 0 2px 6px rgba(15, 23, 42, .06), 0 30px 60px rgba(15, 23, 42, .12);
  --band: #0b1b33;
  --radius: 16px;
  --sans: "IBM Plex Sans", "IBM Plex Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans CJK TC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="dark"] {
  --paper: #000814;
  --card: #001533;
  --sunk: #00204d;
  --ink: #ffffff;
  --muted: #8d99b2;
  --faint: #597caa;
  --hair: #10294f;
  --blue: #1c6cff;
  --blue-ink: #78aeff;
  --blue-soft: #00204d;
  --green: #00cc4b;
  --shadow-s: 0 1px 0 rgba(255, 255, 255, .02);
  --shadow-l: 0 30px 60px rgba(0, 0, 0, .5);
  --band: #001533;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-ink); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── language switching ─────────────────────────────────────────────── */
:root[data-lang="zh"] [data-l="en"],
:root[data-lang="en"] [data-l="zh"] { display: none !important; }

/* ── shared bits ────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.25; margin: 0; font-weight: 600; }

h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: 18px; }

p { margin: 0; }

.lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); }

section { padding: clamp(56px, 9vw, 104px) 0; }

/* torn receipt edge, used as a section rule */
.perf {
  height: 12px;
  background:
    linear-gradient(45deg, transparent 50%, var(--paper) 50%) 0 0 / 14px 12px repeat-x,
    linear-gradient(-45deg, transparent 50%, var(--paper) 50%) 7px 0 / 14px 12px repeat-x,
    var(--hair);
  background-repeat: repeat-x;
  opacity: .9;
}

/* ── header ─────────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}

.top.scrolled { border-bottom-color: var(--hair); }

.top .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  letter-spacing: -.02em;
  margin-right: auto;
}

.brand img { width: 30px; height: 30px; border-radius: 8px; }

.brand .sub { color: var(--faint); font-weight: 400; font-size: 14px; }

.top nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  margin-right: 6px;
}

.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

.toggle {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hair);
  border-radius: 999px;
  height: 32px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggle:hover { color: var(--ink); border-color: var(--blue); }

.toggle svg { width: 15px; height: 15px; }

.toggle .i-sun { display: none; }
:root[data-theme="dark"] .toggle .i-moon { display: none; }
:root[data-theme="dark"] .toggle .i-sun { display: block; }

.top .cta-sm {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 6vw, 76px); position: relative; }

.hero::before {
  content: "";
  position: absolute;
  inset: -200px 0 auto;
  height: 620px;
  background: radial-gradient(60% 55% at 22% 20%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(6%, 3%, 0) scale(1.08); }
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 6.2vw, 62px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.hero .lede { margin-top: 20px; max-width: 30em; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stores a {
  display: inline-flex;
  border-radius: 10px;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}

.stores a:hover { transform: translateY(-2px); }

.stores img { height: 52px; width: auto; display: block; }

.stores .play img { height: 64px; margin: -6px -9px; }

.stores .on-dark { display: none; }
:root[data-theme="dark"] .stores .on-light { display: none; }
:root[data-theme="dark"] .stores .on-dark { display: block; }

.fineprint {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 16px;
  letter-spacing: .02em;
}

/* hero stage: receipt → dotted flow → phone */
.stage { display: flex; justify-content: center; }

/* everything in the hero visual is positioned against this fixed-width rig,
   so the receipt keeps the same relationship to the phone at any width */
.rig { position: relative; width: min(262px, 72vw); }

.phone {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(160deg, #26364b, #0b121d);
  box-shadow: var(--shadow-l);
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 32px;
  background: var(--card);
}

.phone .shot-dark { display: none; }
:root[data-theme="dark"] .phone .shot-light { display: none; }
:root[data-theme="dark"] .phone .shot-dark { display: block; }

.slip {
  position: absolute;
  left: -108px;
  top: 22px;
  width: 196px;
  z-index: 4;
  background: var(--card);
  border-radius: 6px 6px 0 0;
  box-shadow: var(--shadow-l);
  padding: 14px 16px 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
  transform: rotate(-4deg);
  animation: float 7s ease-in-out infinite;
}

:root[data-theme="dark"] .slip { box-shadow: 0 0 0 1px var(--hair), var(--shadow-l); }

.slip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 10px;
  background:
    linear-gradient(45deg, transparent 50%, var(--card) 50%) 0 0 / 12px 10px repeat-x,
    linear-gradient(-45deg, transparent 50%, var(--card) 50%) 6px 0 / 12px 10px repeat-x;
}

.slip .head {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .04em;
  border-bottom: 1px dashed var(--hair);
  padding-bottom: 6px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.slip .row { display: flex; justify-content: space-between; }
.slip .total { color: var(--ink); border-top: 1px dashed var(--hair); margin-top: 6px; padding-top: 6px; font-weight: 500; }

@keyframes float {
  50% { transform: rotate(-4deg) translateY(-9px); }
}

.flow {
  position: absolute;
  left: -120px;
  top: 128px;
  width: 150px;
  height: 170px;
  z-index: 1;
  overflow: visible;
}

.flow path { fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 3 7; opacity: .55; }
.flow circle { fill: var(--blue); }

.landed {
  position: absolute;
  right: -42px;
  bottom: 78px;
  z-index: 5;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-l);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: landing 7s ease-in-out infinite;
}

:root[data-theme="dark"] .landed { box-shadow: 0 0 0 1px var(--hair), var(--shadow-l); }

.landed .dot {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  font-size: 15px;
}

.landed .t1 { font-size: 14px; font-weight: 600; line-height: 1.3; }
.landed .t2 { font-family: var(--mono); font-size: 11px; color: var(--green); letter-spacing: .03em; }
.landed .amt { font-family: var(--mono); font-size: 14px; font-weight: 500; margin-left: 6px; }

@keyframes landing {
  0%, 22% { opacity: 0; transform: translateY(10px) scale(.96); }
  34%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(10px) scale(.96); }
}

/* ── facts ticker ───────────────────────────────────────────────────── */
.facts { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }

.facts .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}

.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* ── split feature blocks ───────────────────────────────────────────── */
.split .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.split.flip .art { order: -1; }

.split h2 + .lede { margin-top: 16px; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  margin-bottom: 14px;
}

.tag.new { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }

.bullets { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }

.bullets li { display: flex; gap: 10px; color: var(--muted); font-size: 16px; }

.bullets li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 11px;
  border-radius: 2px;
  background: var(--blue);
  transform: rotate(45deg);
}

/* voice demo card */
.demo {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 22px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-s);
  max-width: 420px;
  margin: 0 auto;
}

.demo .mic {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
  margin: 2px auto 0;
  position: relative;
  color: #fff;
}

.demo .mic::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--blue);
  opacity: 0;
}

.demo.playing .mic::after { animation: ring 1.6s ease-out infinite; }

@keyframes ring {
  from { opacity: .55; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}

.demo .wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 26px; margin: 16px 0 6px; }

.demo .wave i {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--faint);
  display: block;
}

.demo.playing .wave i { animation: bar .9s ease-in-out infinite; background: var(--blue); }

@keyframes bar {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.demo .said {
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  min-height: 1.6em;
  letter-spacing: -.01em;
}

.demo .said .caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--blue);
  vertical-align: -2px;
  animation: blink .9s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.demo .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.demo .f {
  background: var(--sunk);
  border-radius: 10px;
  padding: 9px 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: .45s cubic-bezier(.2, .7, .2, 1);
}

.demo .f.on { opacity: 1; transform: none; }

.demo .f .k { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--faint); display: block; }
.demo .f .v { font-size: 15px; font-weight: 600; }

.demo .replay {
  display: block;
  margin: 16px auto 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.demo .replay:hover { color: var(--blue-ink); }

/* ── feature grid ───────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.f-card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-s);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s ease;
}

.f-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--blue) 45%, var(--hair)); }

.f-card .ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.f-card .ico svg { width: 20px; height: 20px; }

.f-card p { color: var(--muted); font-size: 15.5px; margin-top: 8px; }

/* ── screens rail ───────────────────────────────────────────────────── */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 32px 20px 12px;
  margin: 0 calc(50% - 50vw);
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.rail::before, .rail::after { content: ""; flex: 0 0 max(0px, calc(50vw - 560px)); }

.rail figure { margin: 0; flex: none; scroll-snap-align: center; width: 186px; }

.rail .phone { width: 186px; padding: 6px; border-radius: 28px; }
.rail .phone img { border-radius: 23px; }

.rail figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.hint {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  letter-spacing: .05em;
}

/* ── privacy band ───────────────────────────────────────────────────── */
.band {
  background: var(--band);
  color: #fff;
  border-radius: 28px;
  padding: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}

.band h2 { color: #fff; }
.band .lede { color: #9fb0cb; }
.band .eyebrow { color: #78aeff; }

.band .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.band .pills span {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 6px 13px;
  color: #cfdcef;
}

.band .note { font-size: 13.5px; color: #7f8ba4; margin-top: 18px; }

/* ── pricing + demo ─────────────────────────────────────────────────── */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-s);
}

.panel .price { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.panel p { color: var(--muted); font-size: 15.5px; margin-top: 10px; }

/* ── faq ────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 40px auto 0; }

.faq details {
  border-bottom: 1px solid var(--hair);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--faint);
  font-size: 20px;
  transition: transform .25s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p { color: var(--muted); font-size: 15.5px; margin-top: 10px; }

/* ── closing cta ────────────────────────────────────────────────────── */
.close { text-align: center; }
.close h2 { font-size: clamp(30px, 4.6vw, 44px); }
.close .lede { margin: 18px auto 0; max-width: 34em; }
.close .stores { justify-content: center; }
.close .fineprint { text-align: center; }
.close .icon-lg { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow-l); margin-bottom: 26px; }

/* ── footer ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--hair);
  padding: 30px 0 46px;
  color: var(--faint);
  font-size: 14px;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--blue-ink); }

footer .meta { margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }

/* ── reveal on scroll ───────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); }

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) and (min-width: 901px) {
  .slip { left: -74px; width: 176px; font-size: 11.5px; }
  .flow { left: -92px; }
  .landed { right: -24px; }
}

@media (max-width: 900px) {
  .hero .wrap, .split .wrap, .band, .two { grid-template-columns: 1fr; }
  .split.flip .art { order: 0; }
  .hero .wrap { gap: 52px; }
  .stage { margin-top: 8px; }
  .rig { display: flex; flex-direction: column; align-items: center; width: min(262px, 72vw); }
  .flow { display: none; }
  /* the slip stacks above the phone instead of covering the screen */
  .slip { position: relative; left: auto; top: auto; width: 190px; margin: 0 86px -20px 0; font-size: 11.5px; }
  .landed { right: max(0px, calc(50% - 168px)); bottom: 52px; }
  .top nav { display: none; }
  .rail::before, .rail::after { flex-basis: 4px; }
}

@media (max-width: 460px) {
  body { font-size: 16px; }
  .brand .sub { display: none; }
  .stores img, .stores .play img { height: 46px; }
  .demo .fields { grid-template-columns: 1fr; }
  .band { border-radius: 20px; padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .landed { opacity: 1; }
}
