:root {
  --ink: #2c2233;
  --ink-2: #5a4b5f;
  --berry: #a93a6c;
  --berry-deep: #8a2c58;
  --pink: #f3a3c6;
  --pink-soft: #fbe3ee;
  --lav: #b9a6ee;
  --blue: #a9c4ee;
  --mint: #a8dcc8;
  --mint-soft: #e2f4ec;
  --line: rgba(44, 34, 51, .1);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 26px;
}

* { box-sizing: border-box; }
html { background: #fffaf7; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); overflow-x: hidden;
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--berry-deep); text-underline-offset: 3px; }

/* painting: fixed behind everything; fades back while reading further down */
.paint { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--paint, 1); }
.bg { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; }
.bg.ready { opacity: 1; }

main { width: min(1120px, 100% - 2 * clamp(18px, 5vw, 64px)); margin: 0 auto; }

/* ---------- cards: quiet, readable over the painting ---------- */
.card {
  position: relative;
  border-radius: var(--r);
  background:
    linear-gradient(150deg, var(--tint, rgba(185, 166, 238, .14)), transparent 42%),
    rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 1px 2px rgba(60, 30, 60, .05),
    0 22px 60px -18px rgba(70, 40, 80, .18);
}
.tint-pink { --tint: rgba(243, 163, 198, .2); }
.tint-mint { --tint: rgba(168, 220, 200, .26); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  max-width: 34rem; padding: 48px 0 64px;
}
h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.16; letter-spacing: .01em; font-weight: 700;
  margin: 0 0 28px; color: var(--ink);
}
.hero-card { padding: 26px 28px 28px; }
.hero-card p { margin: 0 0 22px; color: var(--ink-2); font-size: 1.02rem; }
.duo { display: flex; margin-bottom: 14px; }
.duo img { width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 12px -4px rgba(70, 40, 80, .25); }
.duo img + img { margin-left: -12px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons: their own material only ---------- */
.btn {
  --mx: 50%; --my: 0%;
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; letter-spacing: .02em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s var(--ease);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
/* sheen under the pointer: a white reflection on the surface, not light around it */
.btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(90px 60px at var(--mx) var(--my), rgba(255, 255, 255, .32), transparent 70%);
  transition: opacity .3s;
}
.btn:hover::after, .btn.pressing::after { opacity: 1; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #b84879 0%, var(--berry-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -2px 0 rgba(70, 10, 40, .28), 0 3px 0 #6e2146, 0 10px 18px -10px rgba(110, 33, 70, .55);
}
.btn-quiet {
  color: var(--berry-deep);
  background: linear-gradient(180deg, #fff 0%, #fbf3f7 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(169, 58, 108, .22), 0 3px 0 rgba(169, 58, 108, .18), 0 10px 18px -12px rgba(70, 40, 80, .3);
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active, .btn.pressing { transform: translateY(1px); }
.btn-primary:active, .btn-primary.pressing { box-shadow: inset 0 2px 4px rgba(60, 10, 35, .35), 0 1px 0 #6e2146; }
.btn-quiet:active, .btn-quiet.pressing { box-shadow: inset 0 2px 4px rgba(110, 40, 80, .14), inset 0 0 0 1px rgba(169, 58, 108, .25), 0 1px 0 rgba(169, 58, 108, .18); }
.btn:focus-visible, a:focus-visible { outline: 2.5px solid var(--berry); outline-offset: 3px; }

/* ---------- sections ---------- */
.block { margin: 0 0 clamp(64px, 9vw, 112px); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.3; margin: 0 0 22px; letter-spacing: .01em; }
.block > h2 {
  display: inline-block; padding: 4px 14px; margin-left: -4px; border-radius: 12px;
  background: rgba(255, 250, 247, .82);
}
h3 { margin: 0; font-size: 1.25rem; line-height: 1.35; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }

.bot-card { padding: 26px 28px 24px; }
.bot-card header { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.bot-card header img { width: 88px; height: 88px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 6px 16px -6px rgba(70, 40, 80, .3); flex: none; }
.role { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; }
.bot-card ul, .plain { margin: 0; padding: 0; list-style: none; }
.bot-card li, .plain li { position: relative; padding-left: 22px; margin: 8px 0; color: var(--ink); }
.bot-card li::before, .plain li::before {
  content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, var(--berry)); opacity: .75;
}
.tint-mint li { --dot: #3f8f74; }
.bot-card a { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- chat mockups ---------- */
.chat-card { margin: 0; padding: 20px 18px 22px; background: linear-gradient(150deg, rgba(169, 196, 238, .16), transparent 45%), rgba(255, 255, 255, .9); }
.mode {
  display: inline-block; margin: 0 0 12px; padding: 2px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: #3d5a8a; background: #e6eefb; border: 1px solid #cfdcf4;
}
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg + .msg { margin-top: 14px; }
.av { width: 36px; height: 36px; border-radius: 50%; flex: none; }
span.av { display: grid; place-items: center; font-size: .9rem; font-weight: 600; color: var(--ink); }
.av-a { background: #dfe7fb; }
.av-b { background: #f1e4d4; }
.av-c { background: #e3f1ea; }
img.av { border: 2px solid #fff; box-shadow: 0 2px 6px -2px rgba(70, 40, 80, .3); }
.who { display: block; font-size: .8rem; color: var(--ink-2); line-height: 1.4; margin: 0 0 3px 2px; }
.bubble {
  margin: 0; padding: 9px 14px; border-radius: 4px 18px 18px 18px; font-size: .97rem; line-height: 1.6;
  background: #f1eff4; color: var(--ink);
}
.bubble-pink { background: var(--pink-soft); }
.bubble-mint { background: var(--mint-soft); }

.js .chat-card .msg { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.js .chat-card.shown .msg { opacity: 1; transform: none; }
.js .chat-card.shown .msg:nth-of-type(2) { transition-delay: .55s; }
.js .chat-card.shown .msg:nth-of-type(3) { transition-delay: 1.3s; }
@media (prefers-reduced-motion: reduce) {
  .js .chat-card .msg { opacity: 1; transform: none; transition: none; }
}

/* ---------- text cards ---------- */
.text-card { padding: 26px 28px 22px; }
.text-card h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: 10px; }

/* ---------- start ---------- */
.start { padding: 28px; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 18px; background: rgba(251, 243, 247, .9); border: 1px solid rgba(169, 58, 108, .12);
  font-weight: 600;
}
.num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--berry-deep); color: #fff; font-size: .9rem;
}
kbd {
  font: inherit; font-weight: 600; font-size: .95em; white-space: nowrap;
  padding: 1px 10px; border-radius: 8px; background: #fff; color: var(--berry-deep);
  border: 1px solid rgba(169, 58, 108, .25); box-shadow: 0 2px 0 rgba(169, 58, 108, .15);
}
.start h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--ink-2); }
.commands { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.commands div { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.commands dt { flex: none; }
.commands dd { margin: 0; color: var(--ink-2); }

.price { margin-top: 18px; padding: 22px 28px; display: flex; align-items: center; gap: 20px; }
.price .duo { margin: 0; flex: none; }
.price-title { margin: 0; font-size: 1.2rem; font-weight: 700; }
.price-note {
  display: inline-block; margin: 6px 0 0; padding: 3px 12px; border-radius: 10px;
  font-size: .95rem; font-weight: 600; color: var(--berry-deep);
  background: repeating-linear-gradient(135deg, rgba(169, 58, 108, .07) 0 8px, rgba(169, 58, 108, .02) 8px 16px);
  border: 1px dashed rgba(169, 58, 108, .4);
}

footer { padding: 8px 20px 40px; text-align: center; font-size: .9rem; color: var(--ink-2); }
footer p { display: inline-block; margin: 0; padding: 4px 14px; border-radius: 10px; background: rgba(255, 250, 247, .82); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid.three { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid.two, .commands, .steps { grid-template-columns: minmax(0, 1fr); }
  .card { --r: 22px; }
  .hero-card, .bot-card, .text-card, .start { padding: 22px 20px; }
  .bot-card header img { width: 72px; height: 72px; }
  .price { padding: 20px; align-items: flex-start; }
}
/* portrait phones: the painting sits at the top, the words below it */
@media (max-width: 760px) and (orientation: portrait) {
  .hero { justify-content: flex-start; padding-top: max(41svh, 300px); min-height: 100svh; }
}
/* short landscape phones: keep the hero compact so the card fits */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { max-width: 26rem; padding: 24px 0 40px; }
  h1 { font-size: 2rem; margin-bottom: 16px; }
  .hero-card { padding: 18px 20px; }
  .hero-card p { margin-bottom: 14px; font-size: .95rem; line-height: 1.65; }
  .hero-card .duo { display: none; }
}
