/* Customer page. Colours come from themes.js (set on :root by JS); these are the fallbacks. */
:root {
  --bg: #f5f3ef; --card: #ffffff; --ink: #17181b; --muted: #6c7078; --line: #e7e3dc;
  --accent: #ff8a00; --accent-2: #ffb400; --accent-deep: #e25d00; --accent-soft: #fff3e2;
  --star-off: #e3dfd8; --bad: #d64545; --bad-soft: #fdeceb; --ok: #18a058;
  --hero-1: #23252b; --hero-2: #121316; --hero-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 20, 25, .05), 0 10px 30px -12px rgba(20, 20, 25, .22);
  --radius: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .primary, .steps, .langs { font-family: Poppins, Inter, system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.loading { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.missing { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 16px; }
.missing-ic { font-size: 44px; }
.missing h1 { margin: 8px 0 4px; font-size: 22px; }
.missing p { margin: 0; color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--hero-ink); text-align: center;
  background: linear-gradient(160deg, var(--hero-1), var(--hero-2) 75%); padding: 30px 16px 62px;
}
.hero::before { content: ""; position: absolute; inset: 0; opacity: .05; background: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 14px); }
.glow {
  position: absolute; width: 420px; height: 420px; left: 50%; top: -230px; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent), transparent); opacity: .5; filter: blur(14px);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .32; transform: translateX(-50%) scale(1.08); } }
.hero-in { position: relative; max-width: 520px; margin: 0 auto; }
.badge-logo {
  width: 78px; height: 78px; margin: 0 auto 12px; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep)); color: #fff;
  box-shadow: 0 12px 30px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.badge-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.initials { font: 800 28px/1 Poppins, sans-serif; letter-spacing: .5px; }
.hero h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.tag { margin: 4px 0 0; opacity: .72; font-size: 14px; }
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.soc {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; text-decoration: none;
  color: inherit; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); animation: rise .5s ease both;
}
.light-hero .soc { background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .1); }
.soc.insta .soc-ic { color: #ff5fa2; }
.soc.wa .soc-ic { color: #25d366; }
.soc-ic { display: inline-flex; }

/* ---------- layout ---------- */
main { position: relative; max-width: 520px; margin: -40px auto 0; padding: 0 16px 40px; }
.langs {
  display: flex; gap: 4px; margin: 0 auto 10px; padding: 4px; width: max-content; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.langs button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.langs button.on { background: var(--accent); color: #fff; }
.langs-lbl { align-self: center; padding: 0 6px 0 10px; font: 600 12px Inter, sans-serif; color: var(--muted); }
.steps {
  list-style: none; margin: 0 auto 14px; padding: 6px; display: flex; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.steps li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 4px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .3s, color .3s; }
.steps b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--line); color: var(--muted); }
.steps li.on { color: var(--ink); background: var(--accent-soft); }
.steps li.on b { background: var(--accent); color: #fff; }
.steps li.done b { background: var(--ok); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.reveal.show { opacity: 1; transform: none; }
.eyebrow { margin: 0 0 4px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--accent-deep); }
h2 { margin: 0 0 14px; font-size: 21px; font-weight: 700; text-align: center; letter-spacing: -.2px; }
h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.group + .group, .field-wrap + .group, .group + .field-wrap { margin-top: 18px; }
.split { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ic { font-size: 16px; }

/* ---------- stars ---------- */
.stars { display: flex; justify-content: center; gap: 2px; }
.stars button { border: 0; background: none; padding: 4px; width: 56px; height: 56px; transition: transform .18s cubic-bezier(.2, 1.6, .4, 1); }
.stars svg { width: 100%; height: 100%; fill: var(--star-off); transition: fill .2s, filter .2s; }
.stars button.lit svg { fill: var(--accent-2); filter: drop-shadow(0 4px 10px rgba(255, 170, 0, .45)); }
.stars button.lit { animation: pop .42s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.stars button:active { transform: scale(.86); }
@media (hover: hover) { .stars button:hover { transform: scale(1.12) rotate(-6deg); } }
.star-label { text-align: center; margin: 10px 0 0; min-height: 1.6em; font-weight: 600; font-size: 17px; }
.star-label span { display: inline-block; animation: rise .35s ease both; }
.star-label.idle { color: var(--muted); font-weight: 500; font-size: 15px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px;
  font-size: 14px; font-weight: 500; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; box-shadow: 0 4px 14px -6px var(--accent); }
.chip.on::after {
  content: "✓"; position: absolute; top: -7px; right: -5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; animation: pop .3s ease both;
}
.chips.bad .chip.on { background: var(--bad-soft); border-color: var(--bad); box-shadow: none; }
.chips.bad .chip.on::after { background: var(--bad); }
.chip:active { transform: scale(.95); }
.field-wrap { position: relative; display: block; }
.field-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field {
  width: 100%; padding: 12px 12px 12px 36px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 15px;
}
.field:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- draft ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-between h3 { margin: 0 0 12px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap; }
.quote {
  position: relative; border-radius: 16px; padding: 14px 14px 6px;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--accent-2), var(--accent-deep)) border-box;
  border: 1.5px solid transparent;
}
.quote::before { content: "“"; position: absolute; right: 12px; top: -6px; font: 800 64px/1 Poppins, serif; color: var(--accent); opacity: .18; pointer-events: none; }
.mini-stars { color: var(--accent-2); letter-spacing: 2px; font-size: 15px; min-height: 1.2em; }
.mini-stars .off { color: var(--star-off); }
textarea { width: 100%; min-height: 130px; overflow: hidden; margin: 4px 0 0; padding: 0; border: 0; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; line-height: 1.6; }
textarea:focus { outline: 0; }
.typing::after { content: "▍"; color: var(--accent); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.row { display: flex; gap: 10px; margin-top: 12px; }
.ghost { flex: 1; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 11px 8px; font-size: 14px; font-weight: 600; transition: transform .15s; }
.ghost:active { transform: scale(.97); }
.spin-ic { display: inline-block; transition: transform .5s; }
.ghost.spin .spin-ic { transform: rotate(360deg); }
.primary {
  position: relative; overflow: hidden; width: 100%; margin-top: 16px; border: 0; border-radius: 14px; padding: 16px 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 700; font-size: 16.5px; text-decoration: none;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 12px 28px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .15s;
}
.primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.primary:active { transform: scale(.98); }
.note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.plain-text { margin: 0; text-align: center; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding-top: 6px; }
.foot p { margin: 0; }
.powered a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.powered img { border-radius: 4px; }
.powered { margin-top: 14px !important; font-size: 11.5px; opacity: .7; letter-spacing: .2px; }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 10, 12, .55); backdrop-filter: blur(4px); animation: fade .25s ease both; }
.sheet-card { width: 100%; max-width: 520px; max-height: 100vh; overflow: auto; background: var(--card); border-radius: 26px 26px 0 0; text-align: center; padding: 26px 20px max(22px, env(safe-area-inset-bottom)); animation: up .4s cubic-bezier(.2, 1, .3, 1) both; }
.sheet h2 { margin: 10px 0 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
.tick svg { width: 72px; height: 72px; fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke: var(--ok); stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s ease forwards; }
.tick path { stroke: var(--ok); stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.manual p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.manual-text { text-align: left; padding: 12px; margin-bottom: 12px; border-radius: 12px; border: 1.5px dashed var(--accent); background: var(--accent-soft); font-size: 14.5px; max-height: 30vh; overflow: auto; -webkit-user-select: all; user-select: all; }
.how { list-style: none; margin: 0; padding: 0; text-align: left; }
.how li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: var(--bg); font-size: 15px; animation: rise .4s ease both; }
.how li:nth-child(2) { animation-delay: .1s; }
.how li:nth-child(3) { animation-delay: .2s; }
.how b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; }
.how small { color: var(--muted); font-size: 12.5px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 14px 0 0; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent-deep)); }
.bar i.run { animation: fill var(--wait, 4s) linear forwards; }
@keyframes fill { to { width: 100%; } }
.link { margin-top: 10px; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) { .stars button { width: 48px; height: 48px; } .hero h1 { font-size: 24px; } }

/* ---------- mobile stability (29-Oct): no zoom on focus (inputs >= 16px), no double-tap zoom, no sideways drift ---------- */
html, body { overflow-x: clip; }
html, body { touch-action: pan-x pan-y; } /* no pinch / double-tap zoom (owner: "zoom in out fix") */
.field, textarea, input, select { font-size: 16px; }
.hero { contain: paint; }

/* ---------- demo page (2-Nov) ---------- */
.demo-bar { position: sticky; top: 0; z-index: 9; padding: 9px 14px; text-align: center; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, #ff8a00, #ff4d6d); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5); }
.demo-bar a { color: #fff; text-decoration: underline; white-space: nowrap; }
.demo-sheet { margin: 4px 0 6px; display: grid; gap: 8px; }
.demo-sheet p { margin: 0; padding: 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; }

.legal-links { margin-top: 6px !important; font-size: 11px; opacity: .6; }
.legal-links a { color: inherit; }
