/* madehk — site styles
   Palette: Hong Kong tram green on a cool paper white, with seal-red used
   only for stamps. One typeface (Archivo), its width axis doing the work. */

:root {
  --paper: #f2f4f1;
  --paper-2: #e6ebe7;
  --ink: #14211b;
  --ink-2: #4a5a52;
  --tram: #11553a;
  --tram-deep: #0b3f2a;
  --tram-soft: #dce7e0;
  --chop: #c42e2a;
  --line: #c9d3cc;
  --focus: #0a66c2;

  --font: "Archivo", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}

a { color: var(--tram); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tram-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */

.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 21px; letter-spacing: -0.01em;
  font-variation-settings: "wdth" 125;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark svg { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

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

.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap {
  display: grid; gap: clamp(40px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
}
.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 750;
  font-variation-settings: "wdth" 112;
  max-width: 14ch;
}
:lang(zh-Hant) .hero h1 { letter-spacing: 0; line-height: 1.15; max-width: 12em; }
.hero .lede { margin: 0 0 32px; font-size: 19px; color: var(--ink-2); max-width: 46ch; }
.eyebrow {
  display: inline-block; margin: 0 0 18px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--tram-soft); color: var(--tram-deep);
  font-size: 14px; font-weight: 650; letter-spacing: 0.02em;
}
.hero .status { margin: 20px 0 0; font-size: 14px; color: var(--ink-2); }

.button {
  display: inline-block;
  padding: 13px 22px;
  background: var(--tram); color: #fff;
  border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.button:hover { background: var(--tram-deep); color: #fff; }
.button.quiet { background: transparent; color: var(--tram); box-shadow: inset 0 0 0 1.5px var(--tram); }
.button.quiet:hover { background: var(--tram-soft); color: var(--tram-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The wallet card: the one bold element on the page. */
.pass {
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  aspect-ratio: 360 / 456;
  padding: 22px 22px 24px;
  border-radius: 20px;
  background: var(--tram);
  color: #f2f7f3;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 48px -24px rgba(11, 63, 42, 0.55);
  display: flex; flex-direction: column;
}
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pass-brand { font-weight: 800; font-size: 18px; font-variation-settings: "wdth" 125; }
.pass-tier { font-size: 13px; padding: 3px 10px; border: 1px solid rgba(242, 247, 243, 0.45); border-radius: 999px; }
.pass-fields { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.pass-field span { display: block; font-size: 12px; color: rgba(242, 247, 243, 0.7); }
.pass-field strong { display: block; font-size: 22px; font-weight: 650; line-height: 1.2; }
.pass-field.right { text-align: right; }

.stamps {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  list-style: none; padding: 0;
}
.stamps li {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed rgba(242, 247, 243, 0.4);
  position: relative;
}
.stamps li.on::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 46%, var(--chop) 47% 53%, transparent 54% 60%, var(--chop) 61%);
  transform: rotate(var(--r, -8deg));
  opacity: 0.95;
  animation: chop 420ms cubic-bezier(.2, .9, .3, 1.3) both;
  animation-delay: calc(var(--i) * 140ms + 300ms);
}
.stamps li.on::before {
  /* coffee bean in the seal */
  content: "";
  position: absolute; inset: 30% 33%;
  border-radius: 50%;
  background: #f6efe9;
  box-shadow: inset 2px 0 0 0 var(--chop);
  transform: rotate(35deg);
  z-index: 1;
  animation: chop 420ms cubic-bezier(.2, .9, .3, 1.3) both;
  animation-delay: calc(var(--i) * 140ms + 300ms);
}
@keyframes chop {
  from { transform: scale(1.6) rotate(var(--r, -8deg)); opacity: 0; }
  to   { transform: scale(1) rotate(var(--r, -8deg)); opacity: 0.95; }
}
.pass-note { margin-top: 14px; font-size: 13px; color: rgba(242, 247, 243, 0.8); }

.pass-qr {
  margin-top: auto;
  align-self: center;
  width: 88px; height: 88px;
  padding: 8px;
  background: #fff; border-radius: 10px;
}
.pass-qr svg { width: 100%; height: 100%; display: block; }

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

.band { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--paper-2); }

.band h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 720;
  font-variation-settings: "wdth" 112;
}
.band .intro { margin: 0 0 40px; color: var(--ink-2); max-width: 56ch; font-size: 18px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 64px); }
.split h3 {
  margin: 0 0 14px; font-size: 21px; font-weight: 680;
  font-variation-settings: "wdth" 108;
}
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-top: 1px solid var(--line);
}
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before {
  content: "";
  position: absolute; left: 2px; top: 19px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--tram);
}

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.facts h3 { margin: 0 0 8px; font-size: 17px; font-weight: 680; }
.facts p { margin: 0; color: var(--ink-2); font-size: 16px; }

.company { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.company dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; font-size: 16px; }
.company dt { color: var(--ink-2); }
.company dd { margin: 0; }

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

.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: var(--ink-2); }

/* ---------- legal pages ---------- */

.legal { padding: clamp(40px, 6vw, 72px) 0 80px; }
.legal article { max-width: var(--measure); }
.legal h1 {
  margin: 0 0 8px; font-size: clamp(32px, 4vw, 44px); line-height: 1.1;
  letter-spacing: -0.015em; font-weight: 740; font-variation-settings: "wdth" 112;
}
.legal .meta { margin: 0 0 32px; color: var(--ink-2); font-size: 15px; }
.legal h2 { margin: 40px 0 10px; font-size: 22px; font-weight: 680; font-variation-settings: "wdth" 106; }
.legal h3 { margin: 24px 0 8px; font-size: 18px; font-weight: 650; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 650; }
.legal .summary { background: var(--tram-soft); border-radius: 12px; padding: 18px 22px; margin: 0 0 32px; }
.legal .summary p { margin: 0 0 8px; }
.legal .summary ul { margin: 0; }
.table-scroll { overflow-x: auto; }

/* ---------- how it works: numbered steps, stamped like the card ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--tram); padding-top: 18px; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 50%; border: 2px solid var(--chop); color: var(--chop);
  font-weight: 750; font-size: 15px; transform: rotate(-8deg);
}
.steps h3 { margin: 0 0 6px; font-size: 19px; font-weight: 680; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

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

.faq { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 40px 18px 0; position: relative;
  font-weight: 650; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 14px;
  font-size: 24px; font-weight: 400; color: var(--tram);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 62ch; }

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

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .pass { justify-self: start; }
  .split, .company { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-nav { gap: 14px; font-size: 14px; }
  .site-nav .hide-sm { display: none; }
  .company dl { grid-template-columns: 1fr; gap: 2px; }
  .company dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .stamps li.on::after, .stamps li.on::before { animation: none; }
}

/* ---------- private preview sign-in (built by tools/protect.py) ---------- */

.gate { padding: clamp(48px, 9vw, 104px) 0 80px; }
.gate h1 {
  margin: 0 0 16px; font-size: clamp(36px, 5vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em; font-weight: 750; font-variation-settings: "wdth" 112;
}
.gate .lede { margin: 0 0 32px; font-size: 19px; color: var(--ink-2); max-width: 46ch; }
.gate form { max-width: 460px; display: grid; gap: 10px; }
.gate label { font-weight: 600; font-size: 15px; }
.gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gate-row input {
  flex: 1 1 220px; min-width: 0;
  font: inherit; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.gate-row input:focus { border-color: var(--tram); outline: none; box-shadow: 0 0 0 3px var(--tram-soft); }
.gate-row .button { border: 0; cursor: pointer; font-family: inherit; }
.gate-row .button:disabled { opacity: 0.6; cursor: progress; }
.gate-check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--ink-2); }
.gate-check input { width: 18px; height: 18px; accent-color: var(--tram); }
.gate-error { margin: 4px 0 0; color: var(--chop); font-weight: 600; }
.gate-company { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.gate-company p { margin: 0 0 10px; }

/* ---------- cookie notice ---------- */

.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 14px 18px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 12px 32px rgba(20, 33, 27, .25);
  font-size: 15px; line-height: 1.45;
}
.cookie-bar p { margin: 0; flex: 1 1 300px; }
.cookie-bar a { color: var(--paper); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--paper);
  background: var(--paper); color: var(--ink);
}
.cookie-btn.ghost { background: transparent; color: var(--paper); }
