/* Tokens mirror the ctc_v4.pen variables. */
:root {
  --canvas: #fff8ee;
  --surface: #ffffff;
  --ink: #263b38;
  --deep: #1f4a45;
  --primary: #245b55;
  --sunshine: #f5c451;
  --coral: #ee8a5e;
  --apricot: #f0b18d;
  --sage: #a9cbb1;
  --sage-soft: #dde9de;
  --muted: #526760;
  --critical: #a33132;
  --confirmed: #286047;
  --stroke-field: #263b3826;
  --stroke-divider: #263b381a;
  --r-card: 20px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1328px;
  color-scheme: light;
}

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang HK", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.br-lg { display: none; }
@media (min-width: 720px) { .br-lg { display: inline; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 0; border-radius: var(--r-pill);
  background: var(--sunshine); color: var(--deep);
  font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px #80520f26; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 3px;
}
.btn-lg { min-height: 56px; padding: 0 34px; font-size: 17px; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--stroke-divider); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 20px; color: var(--deep); }
.brand img { width: 44px; height: 44px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:not(.btn):hover { color: var(--deep); }
@media (max-width: 860px) { .site-nav a:not(.btn) { display: none; } .site-nav .btn { min-height: 42px; padding: 0 18px; font-size: 15px; } }
@media (max-width: 420px) { .brand span { font-size: 17px; } .brand img { width: 38px; height: 38px; } }

/* Hero */
.hero { padding: clamp(36px, 6vw, 48px) 0 0; text-align: center; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.hero h1 { margin-top: 12px; color: var(--deep); font-size: clamp(34px, 6.4vw, 68px); line-height: 1.2; letter-spacing: -.01em; }
.hero h1 span { display: inline-block; }
.hero .lead { margin: 14px auto 0; max-width: 34em; color: var(--muted); font-size: clamp(16px, 1.6vw, 20px); }
.hero .btn { margin-top: 26px; }

.hero-stage {
  --pw: clamp(240px, 22vw, 300px);
  position: relative; margin-top: clamp(32px, 5vw, 56px); padding-bottom: 24px;
  min-height: calc(var(--pw) * 658 / 300 + 24px);
}
.hero-phone .device { --w: var(--pw); }
.hero-photo {
  position: relative; border-radius: 28px; overflow: hidden; background: var(--sage-soft);
  aspect-ratio: 21 / 9; margin-top: clamp(40px, 6vw, 72px);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #fff8ee00 55%, #1f4a4526); }
.hero-caption {
  position: absolute; top: 42%; z-index: 2; color: #fff; font-weight: 700; font-size: clamp(16px, 1.7vw, 22px);
  text-shadow: 0 2px 12px #00000059;
}
.hero-caption.left { right: calc(50% + 190px); }
.hero-caption.right { left: calc(50% + 190px); }
.hero-phone { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 3; }
.hero-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.hero-meta strong { color: var(--deep); font-weight: 500; }

@media (max-width: 760px) {
  .hero-photo { margin-top: 0; border-radius: 18px; }
  .hero-caption { display: none; }
  .hero-stage { --pw: min(68vw, 280px); min-height: 0; }
  .hero-phone { position: relative; left: auto; transform: none; margin: -48px auto 0; width: max-content; }
  .hero-meta { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
}

/* Device */
.device {
  --w: clamp(240px, 22vw, 300px);
  position: relative; width: var(--w); aspect-ratio: 300 / 658;
  border-radius: calc(var(--w) * .16); background: #b9bdbb; border: 1px solid #e9ebe8;
  box-shadow: 0 18px 34px #163a3440;
}
.device::before { /* black glass bezel */
  content: ""; position: absolute; inset: 1%; border-radius: calc(var(--w) * .153); background: #101715;
}
.device-screen {
  position: absolute; left: 3.33%; right: 3.33%; top: 2.74%; bottom: 2.74%;
  border-radius: calc(var(--w) * .123); overflow: hidden; background: var(--canvas);
}
.device-island {
  position: absolute; left: 39.7%; width: 20.6%; top: 3.8%; height: 2.4%;
  border-radius: 99px; background: #070a09; z-index: 5;
}
.device-btn { position: absolute; width: 1%; border-radius: 1px; background: #7b8380; }
.device-btn.v1 { left: -1%; top: 19.9%; height: 5.3%; }
.device-btn.v2 { left: -1%; top: 27%; height: 5.3%; }
.device-btn.pw { right: -1%; top: 23.9%; height: 9.4%; }
.device-screen img, .device-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Hero loop: home (reminder ⇄ weather) wipes left into the 小晴 call. */
.loop-panel { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.loop-panel.no-anim, .loop-panel.no-anim * { transition: none !important; }
.loop-home { transform: translateX(0); }
.loop-call { transform: translateX(100%); }
.hero-loop[data-scene="call"] .loop-home { transform: translateX(-100%); }
.hero-loop[data-scene="call"] .loop-call { transform: translateX(0); }
.hero-loop[data-scene="exit"] .loop-call { transform: translateX(-100%); }
.hero-loop[data-scene="exit"] .loop-home { transform: translateX(0); }
.loop-home .weather { opacity: 0; transition: opacity .7s ease; }
.hero-loop[data-card="weather"] .loop-home .weather { opacity: 1; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-dark { background: var(--deep); color: #fff; }
.section-number { font-size: 15px; font-weight: 700; color: var(--primary); letter-spacing: .02em; }
.section-dark .section-number { color: var(--sunshine); }
.section h2 { margin-top: 14px; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.25; color: var(--deep); }
.section-dark h2 { color: #fff; }
.section .body { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 30em; }
.section-dark .body { color: #ffffffcc; }
.split { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; } .split.three { grid-template-columns: 1fr .9fr auto; } }

.benefits { margin-top: 34px; display: grid; gap: 22px; }
.benefit { border-top: 1px solid #ffffff33; padding-top: 18px; }
.benefit h3 { font-size: 19px; }
.benefit p { margin-top: 4px; color: #ffffffb3; font-size: 15px; }

.dialogue { display: grid; gap: 22px; }
.dialogue .label { font-size: 14px; color: #ffffff99; }
.dialogue blockquote { margin: 0; font-size: clamp(20px, 2vw, 26px); line-height: 1.5; }
.dialogue .ai { color: var(--sunshine); border-left: 2px solid var(--sunshine); padding-left: 18px; }
.dialogue .foot { color: #ffffff99; font-size: 14px; }
.section-dark .device { margin-inline: auto; }

.voice-stack { display: grid; gap: 18px; justify-items: start; }
.voice-stack .context { font-weight: 700; color: var(--deep); }
.voice-stack img { width: min(100%, 360px); height: auto; }
.voice-stack .reply { justify-self: end; }
.voice-stack .note { color: var(--muted); font-size: 15px; }
.text-link { display: inline-block; margin-top: 22px; font-weight: 700; color: var(--deep); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards img { width: 100%; height: auto; }
.hierarchy { margin-top: 22px; font-weight: 700; color: var(--deep); }

.closing { text-align: center; }
.closing h2 { margin-top: 0; }
.closing .body { margin: 14px auto 0; }
.closing-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn-outline { background: transparent; color: var(--sunshine); box-shadow: inset 0 0 0 2px var(--sunshine); }
.btn-outline:hover { background: #f5c4511a; box-shadow: inset 0 0 0 2px var(--sunshine); }
.closing .contact { margin-top: 22px; color: var(--sage-soft); font-size: 16px; }
.closing .contact a { color: #fff; }

.site-footer { border-top: 1px solid var(--stroke-divider); padding: 36px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.site-footer .brand { font-size: 17px; }
.site-footer .brand img { width: 36px; height: 36px; }
.site-footer a { color: var(--deep); }

/* Waitlist page */
.waitlist-main { padding: clamp(32px, 6vw, 72px) 0; }
.waitlist-grid { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .waitlist-grid { grid-template-columns: 5fr 6.7fr; } }
.promise h1 { margin-top: 12px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.25; color: var(--deep); }
.promise .body { margin-top: 16px; color: var(--muted); font-size: 17px; }
.promise .care { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--stroke-divider); font-weight: 700; color: var(--primary); }
.promise .device { margin-top: 32px; --w: clamp(220px, 20vw, 260px); }
@media (max-width: 959px) { .promise .device, .promise .care { display: none; } }

.panel { background: var(--surface); border-radius: 28px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 18px 44px #163a341a; }
.panel h2 { font-size: clamp(26px, 3vw, 34px); color: var(--deep); }
.panel .desc { margin-top: 8px; color: var(--muted); }
form { margin-top: 26px; display: grid; gap: 20px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .field label { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 8px; padding: 0; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .roles { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 16px; border: 1.5px solid var(--stroke-field); border-radius: 16px; cursor: pointer; font-weight: 500; background: var(--canvas); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--inkA, #263b3866); display: grid; place-items: center; }
.choice.check .dot { border-radius: 6px; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--sage-soft); }
.choice:has(input:checked) .dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--sage-soft); }
.choice.check:has(input:checked) .dot { box-shadow: none; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.choice:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.interests { display: grid; gap: 10px; }

.field { display: grid; }
.field input {
  min-height: 54px; padding: 0 16px; border: 1.5px solid var(--stroke-field); border-radius: 14px;
  font-family: inherit; font-size: 17px; line-height: 1.2; color: var(--ink); background: var(--surface);
}
.field input::placeholder { color: #263b3873; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px #245b5526; }
.field.invalid input { border-color: var(--critical); box-shadow: 0 0 0 4px #a3313214; }
.field .error { display: none; margin-top: 6px; color: var(--critical); font-size: 14px; }
.field.invalid .error { display: block; }
.hint { color: var(--muted); font-size: 14px; }
.org-only[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-error { display: none; padding: 14px 16px; border-radius: 14px; background: #a331320f; color: var(--critical); font-size: 15px; }
.submit-error.show { display: block; }
form .btn { width: 100%; min-height: 58px; font-size: 17px; }
.note { color: var(--muted); font-size: 13px; text-align: center; }

.thanks { text-align: center; max-width: 640px; margin-inline: auto; }
.thanks .badge { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; background: var(--sage-soft); display: grid; place-items: center; }
.thanks .badge svg { width: 34px; height: 34px; }
.thanks .label { margin-top: 20px; color: var(--confirmed); font-weight: 700; }
.thanks h2 { margin-top: 10px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.3; color: var(--deep); }
.thanks .detail { margin-top: 14px; color: var(--muted); font-size: 17px; }
.thanks .email-chip { display: inline-block; margin-top: 18px; padding: 8px 18px; border-radius: var(--r-pill); background: var(--canvas); border: 1px solid var(--stroke-divider); font-weight: 500; word-break: break-all; }
.thanks .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-ghost { background: transparent; color: var(--deep); border: 1.5px solid var(--stroke-field); }
.btn-ghost:hover { box-shadow: none; background: var(--canvas); }
