/* 上班搭子 landing page: tokens, type, nav, buttons, and the hero.
   The hero is her desktop: the same wallpaper, window and taskbar as the
   promo video (tools/promo/desktop.py), with her standing on the taskbar. */

@font-face {
  font-family: "Smiley Sans";
  src: url("assets/smiley-sans.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #493943;
  --ink-soft: #6b5862;
  --paper: #fff9f1;
  --line: #e7c9be;
  --sky-top: #d6e2f6;
  --sky-bottom: #f6ecf2;
  --accent: #6f9bd8;
  --blue: #1677d2;
  --deep: #2b56b8;
  --deep-ink: #e9efff;
  --green: #2f8f6a;
  --navy: #2b579a;
  --violet: #7d55c7;
  --display: "Smiley Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --buddy-h: clamp(150px, 27vh, 258px);
  --taskbar-h: 52px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 1.0625rem/1.75 var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
::selection { background: #c9dbf7; color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
img { display: block; max-width: 100%; }
a { color: #1166b8; text-underline-offset: 0.2em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
html { scrollbar-color: #b9c6dd transparent; }

/* Nav: floats over the wallpaper. */
.nav {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font: 1.3rem var(--display); }
.brand img { border-radius: 9px; }
.nav nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.98rem; }
.nav nav a:hover { color: var(--ink); }

/* Buttons. */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 1.15rem var(--display); text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.2s;
}
.btn svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { padding: 0.95rem 1.7rem; background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(22, 119, 210, 0.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(22, 119, 210, 0.75); }
.btn-primary:active { transform: translateY(0); }
.btn-quiet { padding: 0.9rem 1.3rem; background: rgba(255, 255, 255, 0.7); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(73, 57, 67, 0.14); }
.btn-quiet:hover { background: #fff; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 1rem; background: var(--ink); color: #fff; }
.btn-small:hover { background: #2f2329; }

/* Hero: the desktop. */
.hero {
  position: relative; overflow: hidden;
  min-height: max(100svh, 720px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: clamp(2rem, 4vw, 4.5rem);
  padding: clamp(7rem, 15vh, 9.5rem) clamp(1.25rem, 5vw, 4.5rem) calc(var(--taskbar-h) + var(--buddy-h) + 1.5rem);
  background:
    radial-gradient(60% 55% at 92% 2%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(45% 45% at 2% 98%, rgba(255, 220, 235, 0.8), transparent 70%),
    linear-gradient(var(--sky-top), var(--sky-bottom));
}
.hero h1 { font-size: clamp(4rem, 8.6vw, 6rem); letter-spacing: -0.01em; }
.lead { margin-top: 0.6rem; font: clamp(1.45rem, 2.4vw, 1.9rem) var(--display); color: var(--ink-soft); }
.hero-text { margin-top: 1.2rem; max-width: 30em; color: var(--ink-soft); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 1.8rem; }
.meta { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.phone-note { margin-top: 1.2rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(255, 255, 255, 0.75); }
.phone-note p { font-size: 0.95rem; margin-bottom: 0.7rem; }

/* The document-style window the video plays in. */
.window { margin: 0; border-radius: 14px; overflow: hidden; background: #fafafc; box-shadow: 0 0 0 1px rgba(205, 210, 222, 0.9), 0 30px 60px -28px rgba(40, 30, 50, 0.45); }
.window-bar { display: flex; align-items: center; gap: 1.1rem; height: 40px; padding: 0 1rem; background: #ecf0f8; font-size: 0.85rem; color: var(--ink); }
.window-bar span { margin-right: auto; }
.window-bar i { width: 14px; height: 2px; background: #78787f; border-radius: 1px; }
.hero-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #dfe7f5; }

/* Taskbar and her on it. */
.taskbar {
  position: absolute; inset: auto 0 0; height: var(--taskbar-h);
  display: flex; align-items: center; justify-content: center;
  background: rgba(245, 246, 250, 0.92); box-shadow: 0 -1px 0 #d7dae4; backdrop-filter: blur(12px);
}
.apps { display: flex; gap: 0.75rem; }
.apps i { width: 30px; height: 30px; border-radius: 8px; background: var(--c); }
.apps i:nth-child(1) { --c: #0078d4; } .apps i:nth-child(2) { --c: #ffb900; } .apps i:nth-child(3) { --c: #107c41; }
.apps i:nth-child(4) { --c: #2b579a; } .apps i:nth-child(5) { --c: #07c160; } .apps i:nth-child(6) { --c: #3c3c46; }
.clock { position: absolute; right: 1.4rem; display: grid; justify-items: end; line-height: 1.25; font-variant-numeric: tabular-nums; }
.clock b { font-weight: 500; font-size: 0.85rem; }
.clock small { font-size: 0.7rem; color: var(--ink-soft); }

.buddy {
  position: absolute; bottom: var(--taskbar-h); left: 0; z-index: 3;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translateX(calc(var(--x, 85vw) - 50%));
  -webkit-tap-highlight-color: transparent;
}
.buddy img { height: var(--buddy-h); width: auto; user-select: none; }
.buddy.flip img { transform: scaleX(-1); }
.bubble {
  position: absolute; left: 50%; bottom: calc(var(--buddy-h) * 0.97);
  width: max-content; max-width: min(19rem, 80vw); padding: 0.55rem 0.95rem;
  border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 10px 22px -12px rgba(73, 57, 67, 0.5);
  font-size: 0.95rem; line-height: 1.5; color: var(--ink); text-align: left;
  opacity: 0; transform: translate(-50%, 8px) scale(0.92); transform-origin: 50% 100%;
  transition: opacity 0.25s, transform 0.35s var(--ease-out); pointer-events: none;
}
.bubble.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--paper); transform: translateX(-50%) rotate(45deg); box-shadow: 1px 1px 0 var(--line); }

@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  /* Narrow: icons to the left so the clock never sits on them. */
  .taskbar { justify-content: flex-start; padding-left: 1rem; }
  .apps { gap: 0.55rem; }
  .apps i { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .bubble { transition: none; }
}
