/* ---------- Fonts (self-hosted: Google Fonts is blocked in mainland China) ---------- */
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/JetBrainsMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg:        #0a0a0a;
  --surface:   #131313;
  --surface-2: #1a1a1a;
  --border:    #262626;
  --border-2:  #333;
  --text:      #f5f5f5;
  --muted:     #a1a1a1;
  --faint:     #737373;
  --accent:    #ff7a1f;   /* jacket orange */
  --wa:        #25d366;
  --wa-ink:    #06240f;

  --font-head: "Space Grotesk", "PingFang SC", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 32px);
  --section: clamp(72px, 9vw, 120px);
  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #111; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* soft colour glows, like light leaking into a dark room */
.glows { position: absolute; inset: 0 0 auto 0; height: 1400px; overflow: hidden; pointer-events: none; z-index: 0; }
.glow { position: absolute; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(40px); }
.glow-a { top: -180px; right: -160px; width: 620px; height: 620px; background: radial-gradient(closest-side, rgb(255 122 31 / 0.20), transparent); }
.glow-b { top: 640px; left: -260px; width: 560px; height: 560px; background: radial-gradient(closest-side, rgb(37 211 102 / 0.10), transparent); }
main, .footer { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) clamp(16px, 3vw, 32px) 16px;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 240ms, border-color 240ms, padding 240ms;
}
.topbar.scrolled {
  padding-block: calc(10px + env(safe-area-inset-top, 0px)) 10px;
  background: rgb(10 10 10 / 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: #1c1c1c;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 17px;
}
.brand img { border-radius: 5px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 160ms; }
.nav a:hover { color: var(--text); }
.pill {
  padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 14px; text-decoration: none;
  transition: color 160ms, border-color 160ms;
}
.pill:hover { color: var(--text); border-color: var(--border-2); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font: 600 15px/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform 180ms var(--ease-out), background-color 180ms, border-color 180ms, box-shadow 180ms;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 6px 24px rgb(37 211 102 / 0.22); }
.btn-wa:hover { background: #2fe072; box-shadow: 0 8px 28px rgb(37 211 102 / 0.32); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--surface); border-color: #444; }

/* ---------- Hero ---------- */
.hero {
  min-height: min(100svh, 960px);
  display: grid; align-items: center;
  padding: 110px 0 80px;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.hero-art { margin-right: clamp(-80px, -4vw, 0px); }
.hero-art img { width: 100%; filter: drop-shadow(0 30px 60px rgb(0 0 0 / 0.5)); }
.hero-id { display: flex; align-items: flex-end; gap: 4px; }
.avatar {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid #2a2a2a;
  box-shadow: 0 0 0 6px rgb(255 122 31 / 0.08), 0 0 60px rgb(255 122 31 / 0.28);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 4px -10px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 3px rgb(37 211 102 / 0.18); }

.hero h1 {
  font-weight: 700;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hl { color: var(--accent); }
.lede { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 36rem; }
.hero .actions { margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); border-top: 1px solid #161616; scroll-margin-top: 40px; }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.section h2 { font-weight: 700; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.015em; }
.sub { color: var(--muted); font-size: 16px; max-width: 34rem; margin-top: 14px; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 18px; margin-top: 40px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid; gap: 12px; align-content: start;
  transition: border-color 200ms, background-color 200ms;
}
.card:hover { border-color: rgb(255 122 31 / 0.35); background: #151515; }
.icon { width: 72px; height: 72px; margin: -6px 0 4px -6px; transition: transform 300ms var(--ease-out); }
.card:hover .icon { transform: translateY(-3px) rotate(-3deg); }
.card h3 { font-weight: 700; font-size: 19px; line-height: 1.3; }
.card p { color: var(--muted); font-size: 15px; }
.bullets { display: grid; gap: 9px; margin-top: 8px; }
.bullets li { position: relative; padding-left: 18px; font-size: 14.5px; color: #d4d4d4; }
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.step { text-align: center; justify-items: center; padding: 32px 24px; }
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 40px; line-height: 1;
  color: var(--accent);
}
.step h3 { font-size: 17px; }
.step p { font-size: 14.5px; max-width: 24ch; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chips li {
  padding: 9px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; color: #d4d4d4;
}
.chips-mono li { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 6px; }

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px; margin-top: 36px; align-items: start;
}
.about-text { display: grid; gap: 18px; color: var(--muted); }
.facts { margin: 0; }
.facts > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.facts > div:first-child { padding-top: 0; }
.facts dt { font-weight: 600; font-size: 15px; color: var(--text); }
.facts dd { margin: 2px 0 0; font-size: 13px; color: var(--faint); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; margin-top: 36px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 200ms;
}
.faq-item[open], .faq-item:hover { border-color: var(--border-2); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none;
  font: 500 22px/1 var(--font-head); color: var(--accent);
  transition: transform 240ms var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item h3 { font-weight: 500; font-size: 16.5px; line-height: 1.4; }
.faq-item p { padding: 0 22px 20px; color: var(--muted); font-size: 15px; max-width: 46rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding-bottom: calc(var(--section) - 20px); }
.contact .wrap { display: grid; justify-items: center; }
.contact h2 { font-size: clamp(34px, 4.6vw, 44px); }
.contact-mark { width: 56px; height: 56px; margin-bottom: 14px; filter: drop-shadow(0 0 24px rgb(255 122 31 / 0.35)); }
.contact .sub { margin-inline: auto; max-width: 28rem; }
.contact .actions { justify-content: center; margin-top: 30px; }
.contact-line { margin-top: 26px; font-size: 14px; color: var(--faint); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.contact-line a { color: var(--text); text-decoration: none; }
.contact-line a:hover { color: var(--accent); }
.copy {
  font: 500 12px/1 var(--font-body); color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 10px; cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--border-2); }
.copied { color: var(--wa); font-size: 13px; min-width: 1px; }

.qrs { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 34px; }
.qr { margin: 0; display: grid; gap: 10px; justify-items: center; }
.qr img {
  width: 160px; height: 160px; padding: 12px;
  background: #fff; border-radius: 12px;
}
.qr figcaption { font-size: 13px; color: var(--faint); }

/* ---------- Footer ---------- */
.footer {
  text-align: center; color: var(--faint); font-size: 13px;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #161616;
}

.footer { display: grid; gap: 6px; }
.icp a { color: var(--faint); text-decoration: none; font-size: 12px; }
.icp a:hover { color: var(--muted); }

/* ---------- Floating WhatsApp (phones) ---------- */
.fab {
  display: none;
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%;
  place-items: center;
  background: var(--wa); color: var(--wa-ink);
  box-shadow: 0 8px 26px rgb(37 211 102 / 0.35);
  z-index: 30;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
  /* hero plays on load, independent of the scroll observer */
  .js .hero .reveal { opacity: 1; transform: none; transition: none; animation: rise 800ms var(--ease-out) both; }
  .js .hero .reveal:nth-child(2) { animation-delay: 80ms; }
  .js .hero .reveal:nth-child(3) { animation-delay: 160ms; }
  .js .hero .reveal:nth-child(4) { animation-delay: 240ms; }
  .cards .reveal:nth-child(2) { transition-delay: 70ms; }
  .cards .reveal:nth-child(3) { transition-delay: 140ms; }
  .cards .reveal:nth-child(4) { transition-delay: 210ms; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-art { animation: rise 1000ms var(--ease-out) 200ms both; }
  .js .hero-art img { animation: bob 7s ease-in-out 1.2s infinite; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin: 8px auto 0; max-width: 560px; }
}

@media (max-width: 760px) {
  .cards-2, .cards-3 { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .hero { min-height: auto; padding-top: 96px; }
  .avatar { width: 96px; height: 96px; }
  .lede { font-size: 16.5px; }
  .card { padding: 24px; }
  .btn { padding: 13px 22px; }
  .fab { display: grid; }
  .nav { display: none; }
}
