/* Same palette as the app: Background and Accent colorsets, BrandWave grays. */
:root {
  --bg: #0E0F11;
  --surface: #17191C;
  --line: #2A2D31;
  --text: #F4F5F6;
  --muted: #A3A7AD;
  --accent: #3FD6FF;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
}
main { flex: 1; width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

/* Header + footer */
.site-header { width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 0; }
.site-home { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; text-decoration: none; }
.site-home img { border-radius: 22.4%; outline: 1px solid var(--line); }
.site-footer { width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 16px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; font-size: 15px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Landing */
.hero { position: relative; display: flex; flex-direction: column; min-height: min(92svh, 860px); overflow: hidden; }
.hero-text { position: relative; z-index: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 16px 0; }
.hero h1 { margin: 0; font-size: clamp(44px, 9vw, 76px); letter-spacing: -0.025em; }
.hero-subtitle { margin: 2px 0 0; color: var(--accent); font-size: clamp(22px, 4vw, 32px); font-weight: 600; line-height: 1.25; }
.hero-tagline { margin: 16px 0 0; max-width: 24em; color: var(--muted); font-size: clamp(18px, 2.6vw, 22px); line-height: 1.4; }
.hero-cta { margin: 22px 0 0; color: var(--text); font-weight: 600; }
.wave { display: block; flex: 1 1 auto; width: 100%; min-height: 240px; margin-top: 8px; overflow: visible; }
.wave path { fill: none; stroke-width: 3px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wave .main { stroke-width: 4px; }
@media (min-width: 760px) {
  .hero-text { padding-top: 64px; }
  .wave { position: absolute; left: 0; right: 0; bottom: 28px; height: 74%; min-height: 0; margin: 0; }
}
/* Same move as the app's welcome: one line that opens into the mark. Numbers come from BrandWave. */
@media (prefers-reduced-motion: no-preference) {
  .wave path { transform-origin: 0 var(--wave-base); animation: wave-open 1.1s cubic-bezier(.3,.7,.2,1) .15s backwards; }
  .wave path:not(.main) { animation-name: wave-open, wave-gray; animation-duration: 1.1s, .25s; }
  @keyframes wave-open { from { transform: scaleY(0); } }
  @keyframes wave-gray { from { opacity: 0; } }
}
.media { width: 100%; max-width: 1080px; margin: 0 auto; padding: 56px 16px 24px; text-align: center; }
.media h2 { margin: 0 auto 28px; max-width: 20em; font-size: clamp(24px, 4vw, 34px); }
.media-frame { display: block; width: min(100%, 320px); margin: 0 auto; border-radius: 28px; }
.media-placeholder {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 9 / 19.5; padding: 24px;
  border: 1.5px dashed var(--line); background: var(--surface); color: var(--muted);
}

/* Documents */
.doc { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 24px; overflow-wrap: anywhere; }
.doc h1 { margin: 0 0 18px; font-size: clamp(32px, 6vw, 42px); }
.doc h2 { margin: 36px 0 10px; font-size: 24px; }
.doc h3 { margin: 26px 0 8px; font-size: 19px; }
.doc h4 { margin: 20px 0 6px; font-size: 17px; }
.doc p, .doc ul, .doc ol, .doc table, .doc blockquote { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin-bottom: 6px; }
.doc li > ul, .doc li > ol { margin: 6px 0 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.doc blockquote { padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.doc code { font: .92em ui-monospace, Menlo, monospace; }
.table-scroll { overflow-x: auto; margin: 0 0 14px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0; overflow-wrap: normal; }
.doc th, .doc td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { background: var(--surface); }
.draft { margin: 0 0 22px; padding: 10px 14px; border: 1px solid #A8741A; border-radius: 10px; background: #2B2010; color: #F6C869; font-weight: 600; }
.jump { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 8px; font-weight: 600; }
.part { scroll-margin-top: 16px; }
.part + .part { margin-top: 44px; padding-top: 8px; border-top: 1px solid var(--line); }
.part > h2:first-of-type, .part > .draft + h2 { margin-top: 26px; font-size: 28px; }

/* Share fallback + 404 */
.center-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62svh; width: 100%; max-width: 560px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.center-page img { border-radius: 22.4%; outline: 1px solid var(--line); margin-bottom: 18px; }
.center-page h1 { margin: 0 0 10px; font-size: 34px; }
.center-page p { margin: 0 0 8px; color: var(--muted); font-size: 19px; }
.center-page .hero-cta { margin-top: 16px; color: var(--text); font-size: 17px; }

/* Coming soon home (John 11/5) */
.coming-soon main { display: flex; align-items: center; justify-content: center; }
