/* Tiko.day landing page. Design notes: docs/03_design/03_01_Landing_Design.md
   Station-clock palette: blue = the user's Google data, red = what Tiko.day tells you. */
:root {
  --paper: #F6F7F8;
  --surface: #FFFFFF;
  --ink: #1A2230;
  --ink-2: #5A6577;
  --rule: #D9DEE5;
  --google: #2F6FDB;
  --google-soft: #E3ECFB;
  --hand: #D7301F;
  --hand-soft: #FBE4E1;
  --ok: #1F7A50;
  --font: "Schibsted Grotesk", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111A26;
    --surface: #182333;
    --ink: #E9EDF3;
    --ink-2: #93A0B3;
    --rule: #2A3647;
    --google: #6E9DF0;
    --google-soft: #1E2E49;
    --hand: #FF5A47;
    --hand-soft: #3A2025;
    --ok: #5CC495;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
html[lang^="zh"] body { line-height: 1.75; }
time, .hours, .moves, .tick-label { font-variant-numeric: tabular-nums; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 6px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--google); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; }
h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02; max-width: 13ch; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; max-width: 18ch; }
h3 { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
html[lang^="zh"] h1 { letter-spacing: 0; line-height: 1.2; max-width: 13em; font-size: clamp(36px, 5.2vw, 60px); }
html[lang^="zh"] h2 { letter-spacing: 0; line-height: 1.3; max-width: 14em; }
p { margin: 0; }
.lead { margin-top: 20px; font-size: 19px; color: var(--ink-2); max-width: 32em; }
.note { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.wordmark { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.wordmark-dot { width: 9px; height: 9px; margin: 6px 2px 0; border-radius: 50%; background: var(--hand); align-self: flex-end; transform: translateY(-5px); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 15px; cursor: pointer; padding: 6px 4px; }
.lang:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 6px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 500; font-size: 16px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }
.btn-small { padding: 7px 14px; font-size: 14px; }

/* Forms */
.waitlist { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; max-width: 470px; }
.waitlist input {
  flex: 1 1 220px; min-width: 0; padding: 12px 14px; border-radius: 6px;
  border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.waitlist input:focus { outline: none; border-color: var(--google); }
.form-msg { flex-basis: 100%; min-height: 1.5em; font-size: 15px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--hand); }
.tool-select { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.tool-select select { padding: 8px 10px; border-radius: 6px; border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }

/* Shared step reveal: JS adds .on to [data-step] elements in order */
[data-step] { opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
[data-step].on { opacity: 1; transform: none; }

/* Hero */
.hero { display: grid; gap: 56px; padding: 56px 0 96px; align-items: start; }
@media (min-width: 960px) { .hero { grid-template-columns: 5fr 6fr; padding-top: 80px; } }

.dial { margin: 0; padding: 22px 22px 18px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--surface); }
.dial-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.dial-head strong { color: var(--ink); font-size: 16px; margin-right: auto; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-google { background: var(--google); }
.sw-hand { background: var(--hand); border-radius: 50%; }

.track { position: relative; height: 132px; margin: 26px 0 8px; }
.ticks {
  position: absolute; inset: auto 0 0 0; height: 30px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px calc(100% / 12)) bottom / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-2) 0 1px, transparent 1px calc(100% / 48)) bottom / 100% 7px no-repeat;
  border-bottom: 1.5px solid var(--ink);
}
.tick-label { position: absolute; bottom: 34px; transform: translateX(-50%); font-size: 12px; color: var(--ink-2); }
.ev, .free {
  position: absolute; top: 0; bottom: 52px;
  left: calc((var(--s) - 480) / 720 * 100%); width: calc((var(--e) - var(--s)) / 720 * 100%);
}
.ev { background: var(--google-soft); border-left: 3px solid var(--google); border-radius: 3px; padding: 6px 6px; overflow: hidden; }
.ev span { display: block; font-size: 12px; line-height: 1.3; color: var(--ink); }
.free { border: 1.5px dashed var(--hand); border-radius: 3px; background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--hand-soft) 6px 8px); }
.hand {
  position: absolute; top: -10px; bottom: 0; width: 2px; background: var(--hand);
  left: calc((var(--t) - 480) / 720 * 100%); transform-origin: bottom;
  transform: scaleY(0); transition: transform .9s var(--ease);
}
.hand::before { content: ""; position: absolute; top: -6px; left: -6px; width: 14px; height: 14px; border-radius: 50%; background: var(--hand); }
.hand span { position: absolute; top: -8px; left: 12px; font-size: 12px; font-weight: 700; color: var(--hand); opacity: 0; transition: opacity .4s .6s; }
.dial.go .hand { transform: scaleY(1); }
.dial.go .hand span { opacity: 1; }

.dial-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.dn { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; padding: 12px 14px; border-left: 3px solid var(--hand); background: var(--hand-soft); border-radius: 0 6px 6px 0; }
.dn time { font-size: 13px; font-weight: 700; color: var(--hand); }
.dn p { font-size: 15px; line-height: 1.5; }

/* Scenes */
.scene { position: relative; display: grid; gap: 40px; padding: 88px 0; align-items: center; }
.scene::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 9px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 1.5px, transparent 1.5px 24px) top / 100% 9px no-repeat;
  border-top: 1.5px solid var(--rule);
}
@media (min-width: 960px) { .scene { grid-template-columns: 5fr 6fr; gap: 64px; } }
.scene-text p { margin-top: 18px; color: var(--ink-2); max-width: 30em; }

.stage { position: relative; min-height: 340px; padding: 24px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--rule); }
.replay { position: absolute; top: 12px; right: 14px; background: none; border: 0; padding: 4px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.replay:hover { color: var(--ink); }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1.5px solid var(--hand); border-radius: 999px; color: var(--hand); font-style: normal; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* Scene 1 */
.connect { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid var(--google); border-radius: 6px; color: var(--google); font-size: 14px; font-weight: 500; transition: background .3s, color .3s; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--google); }
.stage-migrate.connected .connect { background: var(--google); color: var(--surface); }
.stage-migrate.connected .g-dot { background: var(--surface); }
.cols { display: grid; gap: 20px; margin-top: 22px; }
@media (min-width: 560px) { .cols { grid-template-columns: 1fr 1fr; } }
.col h3 { padding-bottom: 8px; border-bottom: 1.5px solid var(--google); }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.45; }
.col li time { display: inline-block; width: 50px; color: var(--google); font-size: 14px; }
.stage-foot { margin-top: 18px; font-size: 14px; color: var(--ok); }

/* Scene 2 */
.modes { display: flex; gap: 24px; margin-top: 28px; border-bottom: 1.5px solid var(--rule); }
.modes button { background: none; border: 0; padding: 10px 0; margin-bottom: -1.5px; font: inherit; font-size: 16px; color: var(--ink-2); border-bottom: 2px solid transparent; cursor: pointer; }
.modes button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--hand); }
.cap-in { display: none; min-height: 92px; padding: 16px; border-radius: 8px; background: var(--paper); font-size: 17px; line-height: 1.5; }
.stage-capture[data-mode="text"] .cap-text,
.stage-capture[data-mode="voice"] .cap-voice,
.stage-capture[data-mode="shot"] .cap-shot { display: block; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -0.15em; background: var(--hand); animation: blink 1s steps(1) infinite; }
.wave { display: flex; align-items: center; gap: 4px; height: 28px; margin-bottom: 10px; }
.wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--hand); transform: scaleY(.15); }
.listening .wave i { animation: wave .9s var(--ease) infinite; }
.wave i:nth-child(3n) { animation-delay: .15s; } .wave i:nth-child(3n+1) { animation-delay: .3s; } .wave i:nth-child(4n) { animation-delay: .45s; }
.chat { position: relative; display: grid; gap: 8px; justify-items: start; overflow: hidden; padding: 4px; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 4px 12px 12px 12px; background: var(--surface); border: 1px solid var(--rule); font-size: 15px; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--hand); box-shadow: 0 0 12px var(--hand); opacity: 0; }
.scanning .scan { animation: scan 1.4s var(--ease) 1 forwards; }
.cap-out { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.cap-out li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; font-size: 15px; opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.cap-out li.on { opacity: 1; transform: none; }
.cap-out .shape { width: 12px; height: 12px; border: 2px solid var(--google); border-radius: 50%; }
.cap-out .shape.ms { border-radius: 2px; transform: rotate(45deg); }
.cap-out small { display: block; color: var(--ink-2); font-size: 13px; }
.cap-out .when { font-size: 13px; font-weight: 500; color: var(--google); white-space: nowrap; }
.cap-out li.synced { grid-template-columns: 1fr; border: 0; padding: 4px 2px; color: var(--ok); font-size: 14px; }

/* Scene 3 */
.versus { display: grid; gap: 18px; }
@media (min-width: 560px) { .versus { grid-template-columns: 1fr 1.25fr; } }
.mini h3 { margin-bottom: 10px; }
.mini-cal {
  position: relative; display: grid; grid-template-rows: repeat(6, 30px); gap: 4px;
  padding: 4px; border-radius: 8px;
  background: repeating-linear-gradient(var(--paper) 0 30px, var(--surface) 30px 34px);
}
.blk { grid-row: var(--r); grid-column: 1; border-radius: 4px; background: var(--google-soft); border-left: 3px solid var(--google); transition: grid-row .3s; }
.mini-auto .blk { background: var(--rule); border-left-color: var(--ink-2); transition: none; }
.mini-auto.shuffling .blk { animation: jolt .35s var(--ease); }
.blk-new { display: none; background: var(--hand-soft); border: 1.5px solid var(--hand); }
.mini-tiko.accepted .blk-new { display: block; animation: settle .5s var(--ease); }
.count { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.count b { color: var(--hand); }
.ask { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--hand); background: var(--hand-soft); border-radius: 0 6px 6px 0; font-size: 15px; line-height: 1.5; }
.ask-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-tiko.answered .ask { display: none; }
.ask-result { margin-top: 12px; min-height: 1.5em; font-size: 14px; color: var(--ok); }

/* Scene 4 */
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.day b { display: block; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1.5px solid var(--rule); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.day-due b { color: var(--hand); border-bottom-color: var(--hand); }
.slots { display: grid; grid-template-rows: repeat(3, 34px); gap: 6px; }
.busy { display: block; border-radius: 4px; background: var(--google-soft); border-left: 3px solid var(--google); }
.due { grid-row: 1 / 4; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; border: 1.5px dashed var(--hand); border-radius: 4px; color: var(--hand); font-size: 13px; font-weight: 500; line-height: 1.35; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 22px; font-size: 14px; color: var(--ink-2); }
.hours { font-size: 20px; color: var(--ink); transition: color .3s; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--paper); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--free, 100%); background: var(--google); transition: width .6s var(--ease), background .3s; }
.stage-risk.empty .bar span { background: var(--hand); }
.stage-risk.empty .hours { color: var(--hand); }
.alert { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--hand); background: var(--hand-soft); border-radius: 0 6px 6px 0; font-size: 15px; line-height: 1.5; }

/* Pricing */
.pricing { position: relative; padding: 88px 0; }
.pricing::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1.5px solid var(--rule); }
.pricing-head p { margin-top: 12px; color: var(--ink-2); }
.billing { display: inline-flex; gap: 20px; margin-top: 24px; }
.billing button { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 16px; color: var(--ink-2); border-bottom: 2px solid transparent; cursor: pointer; }
.billing button.active { color: var(--ink); border-bottom-color: var(--ink); }
.plans { display: grid; margin-top: 36px; border-top: 1.5px solid var(--ink); }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } .plan + .plan { border-left: 1.5px solid var(--rule); } }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 32px 0; }
.plan + .plan { padding-left: 28px; }
@media (max-width: 759px) { .plan + .plan { padding-left: 0; border-top: 1.5px solid var(--rule); } }
.plan h3 { font-size: 20px; font-weight: 700; color: var(--ink); }
.price { display: flex; align-items: baseline; gap: 8px; }
.amount { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; }
.per { color: var(--ink-2); }
.plan p:not(.price) { color: var(--ink-2); max-width: 28em; }
.plan .btn { align-self: flex-start; margin-top: 8px; }

/* Join */
.join { padding: 96px 0 104px; border-top: 1.5px solid var(--ink); }
.join h2 { font-size: clamp(34px, 5vw, 56px); max-width: none; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 0 40px; border-top: 1.5px solid var(--rule); font-size: 14px; color: var(--ink-2); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
@keyframes scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes jolt { 0% { transform: translateX(-6px); } 100% { transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 404 */
.notfound { min-height: 80vh; display: grid; place-content: center; text-align: center; gap: 16px; }
.notfound .lead { margin: 0 auto; }

/* FAQ */
.faq { position: relative; padding: 88px 0; }
.faq::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1.5px solid var(--rule); }
.faq-list { display: grid; gap: 28px 56px; margin: 36px 0 0; }
@media (min-width: 860px) { .faq-list { grid-template-columns: 1fr 1fr; } }
.qa dt { font-weight: 700; font-size: 18px; line-height: 1.4; }
.qa dd { margin: 8px 0 0; color: var(--ink-2); max-width: 36em; }
