/* Step Planet — Heicy Technology Limited */

:root {
  --cream: #fdf8f2;
  --cream-2: #f8eee2;
  --card: #ffffff;
  --ink: #1c1b26;
  --ink-2: #6a6577;
  --orange: #e8734a;
  --orange-d: #c85a34;
  --orange-soft: #fbe6dc;
  --sage: #5f9b76;
  --sage-soft: #e7f1e9;
  --teal: #2a9e90;
  --line: #eee2d4;

  --pad-x: clamp(1.15rem, 4vw, 3.25rem);
  --r: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Poppins", "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.78;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding-inline: var(--pad-x); }

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.01em; margin-bottom: 0.3em; }

p { margin: 0 0 1.05em; max-width: 60ch; }
a { color: var(--orange-d); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.lede { font-size: clamp(1.02rem, 0.97rem + 0.4vw, 1.2rem); color: var(--ink-2); max-width: 42ch; }
.eyebrow { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; color: var(--orange); margin: 0 0 0.7rem; }

/* ---------- nav ---------- */

.site-head { position: sticky; top: 0; z-index: 40; background: rgba(253,248,242,0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 0.9rem; min-height: 4.4rem; flex-wrap: wrap; }

.mark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.mark .badge { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--orange); display: grid; place-items: center; flex: none; }
.mark b { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.mark i { font-style: normal; font-size: 0.86rem; color: var(--ink-2); font-weight: 500; }

.nav { display: flex; gap: clamp(0.8rem, 1.7vw, 1.7rem); align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--orange); }

.pill {
  display: inline-block; font: inherit; font-weight: 700; font-size: 0.93rem;
  background: var(--orange); color: #fff; border: 2px solid var(--orange);
  border-radius: 999px; padding: 0.58rem 1.35rem; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pill:hover { background: var(--orange-d); border-color: var(--orange-d); color: #fff; transform: translateY(-2px); }
.pill-open { background: transparent; color: var(--ink); border-color: var(--line); }
.pill-open:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-sm { padding: 0.34rem 0.9rem; font-size: 0.82rem; }
.pill-dark { background: var(--ink); border-color: var(--ink); }
.pill-dark:hover { background: #000; border-color: #000; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.7rem; }

/* ---------- language ---------- */

[data-lang] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
html[lang="zh-Hant-HK"] [data-lang="zh"] { display: revert; }

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

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { max-width: 12ch; }

.hero-art { position: relative; }
.hero-art::before {
  content: ""; position: absolute; inset: -6% -4% -10% -6%;
  background: var(--orange-soft); border-radius: 40% 46% 42% 48%;
}
.hero-art img { position: relative; width: 100%; height: auto; border-radius: 26px; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.9rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-2);
}

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

section { padding-block: clamp(3rem, 6vw, 5rem); }

.sec-top { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); max-width: 52ch; }
.sec-top h2 { margin-bottom: 0.35em; }
.sec-top p { margin-bottom: 0; color: var(--ink-2); }

/* ---------- feature grid ---------- */

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.1rem; }

.fcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem 1.5rem 1.7rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fcard:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28,27,38,0.07); }
.fcard .ico { width: 2.9rem; height: 2.9rem; border-radius: 13px; background: var(--orange-soft); display: grid; place-items: center; margin-bottom: 1.1rem; }
.fcard p { margin: 0; font-size: 0.93rem; color: var(--ink-2); max-width: none; }

.fcard-hi { background: var(--sage); border-color: var(--sage); color: #fff; }
.fcard-hi .ico { background: rgba(255,255,255,0.22); }
.fcard-hi p { color: rgba(255,255,255,0.88); }

/* ---------- marquee ---------- */

.marquee { overflow: hidden; background: #1d1a33; color: #fff; padding-block: 0.95rem; }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: slide 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-weight: 700; font-size: 0.98rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 2.5rem; }
.marquee span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- demo ---------- */

.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }

.agebar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.agebar button {
  font: inherit; font-size: 0.88rem; font-weight: 700;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.35rem 1.05rem; cursor: pointer;
}
.agebar button[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }

.phone {
  background: #1d1a33; border: 9px solid #2b2749; border-radius: 34px;
  padding: 1rem 0.9rem 1.2rem; max-width: 21rem; width: 100%;
  box-shadow: 0 24px 50px rgba(28,27,38,0.22);
}
.phone-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0.35rem 0.75rem; border-bottom: 1px dashed rgba(255,255,255,0.2); margin-bottom: 0.75rem; }
.phone-who { font-weight: 700; color: #fff; font-size: 1rem; }
.phone-pts { font-weight: 800; font-size: 1.5rem; color: var(--orange); letter-spacing: -0.02em; }
.phone-pts small { font-size: 0.66rem; font-weight: 600; color: rgba(255,255,255,0.5); margin-left: 0.2rem; }

.habits { list-style: none; margin: 0; padding: 0; }
.habits li { margin-bottom: 0.45rem; }
.habit {
  width: 100%; display: flex; align-items: center; gap: 0.7rem;
  font: inherit; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px; padding: 0.62rem 0.75rem; color: rgba(255,255,255,0.92);
  transition: background 0.18s ease;
}
.habit:hover { background: rgba(255,255,255,0.15); }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.38); display: grid; place-items: center; }
.tick svg { opacity: 0; transform: scale(0.5); transition: opacity 0.2s ease, transform 0.2s ease; }
.habit-name { flex: 1; font-size: 0.92rem; }
.habit-pts { font-size: 0.8rem; color: var(--orange); font-weight: 700; }
.habit[aria-pressed="true"] { background: rgba(95,155,118,0.28); border-color: rgba(122,184,140,0.6); }
.habit[aria-pressed="true"] .tick { background: #7ab88c; border-color: #7ab88c; }
.habit[aria-pressed="true"] .tick svg { opacity: 1; transform: none; }
.habit[aria-pressed="true"] .habit-name { color: rgba(255,255,255,0.5); text-decoration: line-through; }

.phone-trail { margin-top: 0.95rem; padding-top: 0.85rem; border-top: 1px dashed rgba(255,255,255,0.2); display: flex; gap: 0.28rem; align-items: flex-end; min-height: 34px; }
.pawslot { opacity: 0.18; transform: translateY(5px); transition: opacity 0.3s ease, transform 0.3s ease; }
.pawslot.lit { opacity: 1; transform: none; }
.phone-msg { margin: 0.75rem 0 0; font-size: 0.8rem; color: var(--orange); min-height: 1.4em; text-align: center; font-weight: 600; }

.demo-note { font-size: 0.82rem; color: var(--ink-2); max-width: 38ch; }

/* ---------- heatmap ---------- */

.heat-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid; grid-template-columns: minmax(0, 1fr) 14.5rem;
  gap: clamp(1.4rem, 3vw, 2.5rem); align-items: stretch;
}

.heat-main { display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }

.heat-grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
}
.heat-cell { width: 100%; aspect-ratio: 1; border-radius: 5px; border: 0; padding: 0; cursor: pointer; background: #f0eade; }
.heat-cell[data-level="1"] { background: #d5efe9; }
.heat-cell[data-level="2"] { background: #9fdcd2; }
.heat-cell[data-level="3"] { background: #58c0b2; }
.heat-cell[data-level="4"] { background: #2a9e90; }
.heat-cell:hover, .heat-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.heat-legend { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--ink-2); font-weight: 600; }
.heat-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

.heat-side { border-left: 1px solid var(--line); padding-left: clamp(1.2rem, 2.5vw, 2rem); display: flex; flex-direction: column; justify-content: space-between; }
.heat-side .kpi { margin-bottom: 0.4rem; }
.heat-side .kpi b { display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.heat-side .kpi span { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.heat-read { border-top: 1px solid var(--line); padding-top: 1rem; font-size: 0.88rem; color: var(--ink-2); min-height: 4em; }
.heat-read strong { color: var(--ink); }

/* ---------- story ---------- */

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; }
.split svg, .split img { width: 100%; height: auto; border-radius: var(--r); display: block; }

.mv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.1rem; margin-top: 2rem; }
.mv > div { border-radius: var(--r); padding: 1.4rem 1.5rem; }
.mv p { margin: 0; font-size: 0.93rem; max-width: none; }
.mv-a { background: var(--sage-soft); }
.mv-b { background: var(--orange-soft); }

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

.rcard {
  position: relative; overflow: hidden; text-align: left; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.5rem; cursor: pointer; width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rcard:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28,27,38,0.07); }
.rcard .ico { width: 2.9rem; height: 2.9rem; border-radius: 13px; background: var(--orange-soft); display: grid; place-items: center; margin-bottom: 1rem; }
.rcard .hintline { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; color: var(--orange); }
.rcard .body { font-size: 0.92rem; color: var(--ink-2); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.32s ease, opacity 0.25s ease, margin 0.32s ease; margin: 0; }
.rcard:hover .body, .rcard:focus-visible .body, .rcard[aria-expanded="true"] .body { max-height: 14rem; opacity: 1; margin-top: 0.4rem; }
.rcard:hover .hintline, .rcard:focus-visible .hintline, .rcard[aria-expanded="true"] .hintline { display: none; }

/* ---------- subscribe band ---------- */

.subscribe {
  position: relative; overflow: hidden;
  background: var(--orange); color: #fff;
  border-radius: 28px; padding: clamp(2rem, 5vw, 3.5rem);
}
.subscribe::before { content: ""; position: absolute; width: 22rem; height: 22rem; border-radius: 50%; background: rgba(255,255,255,0.12); right: -6rem; top: -8rem; }
.subscribe::after { content: ""; position: absolute; width: 14rem; height: 14rem; border-radius: 50%; background: rgba(0,0,0,0.07); left: -5rem; bottom: -6rem; }
.subscribe > * { position: relative; }
.subscribe h2 { margin-bottom: 0.3em; }
.subscribe p { color: rgba(255,255,255,0.9); margin-bottom: 1.6rem; }

.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 34rem; }
.inline-form input {
  flex: 1 1 15rem; font: inherit; border: 0; border-radius: 999px;
  padding: 0.7rem 1.3rem; background: #fff; color: var(--ink);
}
.inline-form input::placeholder { color: #a9a3b5; }

/* ---------- forms ---------- */

.form-grid { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.5rem); align-items: start; }

.info-list { display: grid; gap: 0.7rem; }
.info-item { display: flex; gap: 0.9rem; align-items: flex-start; background: var(--cream-2); border-radius: 16px; padding: 1rem 1.1rem; }
.info-item .ico { width: 2.5rem; height: 2.5rem; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.info-item .lbl { display: block; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-2); }
.info-item b { font-weight: 600; font-size: 0.96rem; }

.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.3rem, 3vw, 2rem); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.field { display: block; }
.field .lbl { display: block; font-size: 0.84rem; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0.65rem 0.9rem; background: var(--cream); color: var(--ink);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); outline: none; }
.form-note { font-size: 0.8rem; color: var(--ink-2); margin: 0.9rem 0 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- inner pages ---------- */

.page-head { background: var(--cream-2); padding-block: clamp(2.3rem, 5vw, 3.8rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.3rem); margin-bottom: 0.25em; }
.page-head p { margin-bottom: 0; max-width: 48ch; color: var(--ink-2); }

.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.6rem; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem 1.6rem; max-width: 46rem; }
.facts dt { color: var(--ink-2); font-size: 0.88rem; font-weight: 600; }
.facts dd { margin: 0; }

.note { background: var(--orange-soft); border-radius: 16px; padding: 1.1rem 1.3rem; max-width: 46rem; }
.note p:last-child { margin-bottom: 0; }

.legal h2 { font-size: 1.2rem; margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.legal h2:first-of-type { margin-top: 1rem; }
.legal li { margin-bottom: 0.5rem; }
.legal ul, .legal ol, .legal p { max-width: 62ch; }
.stamp { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 0; font-weight: 600; }

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

.site-foot { background: var(--cream-2); border-top: 1px solid var(--line); padding-block: 3rem 2.2rem; font-size: 0.93rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem 3rem; }
.foot-grid h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; color: var(--ink); margin: 0 0 0.9rem; }
.site-foot p { max-width: 32ch; margin-bottom: 0.4em; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--orange); }
.foot-nav { display: flex; flex-direction: column; gap: 0.45rem; }
.copyright { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.83rem; }

/* ---------- motion ---------- */

.rise { opacity: 0; transform: translateY(18px); }
.rise.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

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

@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 32rem; }
  .heat-panel { grid-template-columns: 1fr; }
  .heat-side { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; }
  .heat-side .kpi { margin-bottom: 0; }
  .heat-read { grid-column: 1 / -1; }
  .demo-grid { grid-template-columns: 1fr; }
  .phone { margin-inline: auto; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .head-row { min-height: 0; padding-block: 0.6rem; gap: 0.5rem 0.8rem; }
  .site-head .mark i { display: none; }
  .head-row .pill:not(.pill-sm) { display: none; }
  .nav { order: 3; width: 100%; gap: 0.9rem; flex-wrap: wrap; }
  .nav a { font-size: 0.88rem; }
  .heat-grid { gap: 3px; }
  .heat-cell { border-radius: 3px; }
  .facts { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .facts dd { margin-bottom: 0.8rem; }
}
