/* ─── tasky.bot — marketing site ─────────────────────────────────────────────
   Shares the product's typefaces and its one accent, so the site and the app read
   as the same house. The page's spine is a CLOCK RAIL: sections are pinned to the
   hour they actually matter in a Vietnamese team's day (08:30 nhận việc → 17:30
   nhật báo → thứ 7 làm bù). The order carries information; it isn't decoration. */

:root {
  --ink:        #0E1020;   /* near-black with a blue cast — sits with the blurple */
  --ink-2:      #3B3F55;
  --muted:      #6C7189;
  --line:       #E5E6EF;
  --canvas:     #FBFBFD;
  --surface:    #FFFFFF;
  --blurple:    #5865F2;
  --blurple-d:  #4450D6;
  --blurple-50: #EEF0FE;
  --done:       #16A34A;
  --late:       #DC2626;

  --font:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --rail:  clamp(64px, 9vw, 132px);   /* width of the clock rail on desktop */
  --pad:   clamp(20px, 5vw, 40px);
  --max:   1120px;
  --r:     14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 12px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: var(--display); font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { background: var(--blurple-50); color: var(--blurple-d); }
.nav-links .btn { margin-left: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: transform .12s ease, background .16s ease, border-color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blurple); color: #fff; }
.btn-primary:hover { background: var(--blurple-d); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-2); }
:where(a, button):focus-visible { outline: 2px solid var(--blurple); outline-offset: 2px; border-radius: 6px; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); }
.hero h1 em { font-style: normal; color: var(--blurple); }
.hero p.lead { margin-top: 20px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Hero signature: a Discord message becoming a task. The product's core trick,
   shown rather than claimed. */
.morph { position: relative; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(14,16,32,.04), 0 12px 32px rgba(14,16,32,.06);
}
.msg { padding: 16px; display: flex; gap: 12px; }
.msg-av { width: 38px; height: 38px; border-radius: 999px; background: var(--blurple); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.msg-name { font-weight: 600; font-size: 15px; }
.msg-name b { font-weight: 600; }
.msg-name time { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.msg-body { font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.msg-body mark { background: var(--blurple-50); color: var(--blurple-d); padding: 0 3px; border-radius: 4px; }

.arrow {
  display: grid; place-items: center; height: 46px; color: var(--muted);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
}
.arrow span { display: inline-flex; align-items: center; gap: 8px; }
.arrow svg { width: 14px; height: 14px; }

.task { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.tick {
  width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
}
.task.is-done .tick { background: var(--done); border-color: var(--done); }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.tick svg { width: 12px; height: 12px; opacity: 0; }
.task.is-done .tick svg { opacity: 1; }
.task-title { font-weight: 600; font-size: 15px; }
.task-meta { display: flex; gap: 10px; align-items: center; margin-top: 3px; font-size: 13px; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--canvas); color: var(--ink-2);
}
.chip i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.due { color: var(--late); font-weight: 600; }

/* ─── The clock rail ──────────────────────────────────────────────────────── */
.day { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.day-head { max-width: 46ch; margin-bottom: clamp(28px, 4vw, 48px); }
.day-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.day-head p { margin-top: 14px; color: var(--ink-2); }

.rail { position: relative; display: grid; gap: clamp(28px, 4vw, 44px); }
.rail::before {                       /* the spine — a real day, top to bottom */
  content: ''; position: absolute; left: calc(var(--rail) / 2); top: 6px; bottom: 6px;
  width: 1px; background: linear-gradient(var(--line), var(--line) 92%, transparent);
}
.hour { display: grid; grid-template-columns: var(--rail) 1fr; gap: clamp(16px, 3vw, 36px); align-items: start; }
.hour-time {
  position: relative; font-family: var(--mono); font-size: 13px; color: var(--muted);
  padding-top: 3px; text-align: center;
}
.hour-time::after {                   /* the dot on the spine */
  content: ''; position: absolute; left: 50%; top: 34px; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 999px; background: var(--canvas);
  border: 2px solid var(--line);
}
.hour.is-now .hour-time { color: var(--blurple); font-weight: 700; }
.hour.is-now .hour-time::after { background: var(--blurple); border-color: var(--blurple); }
.hour h3 { font-size: clamp(20px, 2vw, 25px); }
.hour p { margin-top: 10px; color: var(--ink-2); max-width: 56ch; }
.hour .card { margin-top: 18px; overflow: hidden; }

.rows > * + * { border-top: 1px solid var(--line); }
.row { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.row-title { font-weight: 600; font-size: 15px; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.row-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.grp-head {
  padding: 10px 16px; background: var(--canvas); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px;
}
.grp-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 700; }
.count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }

/* Report card (17:30) */
.report { padding: 16px; display: grid; gap: 12px; }
.report-line { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.report-line .k { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 62px; flex-shrink: 0; padding-top: 3px; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blurple); border-radius: 999px; }

/* Leave card (thứ 7) */
.leave { padding: 16px; display: grid; gap: 10px; }
.leave-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.badge-ok { background: #E9F7EF; color: var(--done); }
.badge-wait { background: #FFF4E5; color: #B45309; }

/* ─── Feature strip (the things that aren't tied to an hour) ──────────────── */
.more { padding: clamp(48px, 7vw, 84px) 0; border-top: 1px solid var(--line); background: var(--surface); }
.more h2 { font-size: clamp(26px, 3vw, 34px); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 36px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cell { background: var(--surface); padding: 26px; }
.cell h4 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.cell p { font-size: 15px; color: var(--ink-2); }
.cell .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blurple-50); color: var(--blurple);
  display: grid; place-items: center; margin-bottom: 14px; }
.cell .ic svg { width: 18px; height: 18px; }

/* ─── CTA ─────────────────────────────────────────────────────────────────── */
.cta { padding: clamp(56px, 8vw, 96px) 0; text-align: center; }
.cta h2 { font-size: clamp(28px, 3.6vw, 42px); }
.cta p { margin-top: 14px; color: var(--ink-2); }
.cta .hero-cta { justify-content: center; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; background: var(--surface); }
.foot-in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.foot a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot a:hover { color: var(--ink); }
.foot small { color: var(--muted); font-size: 13px; }

/* ─── Legal / support pages ───────────────────────────────────────────────── */
.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 88px); }
.doc-in { max-width: 72ch; }
.doc h1 { font-size: clamp(30px, 4vw, 44px); }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 12px; }
.doc h2 { font-size: 22px; margin-top: 40px; }
.doc h3 { font-size: 17px; margin-top: 26px; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.doc p, .doc li { color: var(--ink-2); font-size: 16px; }
.doc p { margin-top: 14px; }
.doc ul { margin-top: 12px; padding-left: 20px; }
.doc li { margin-top: 8px; }
.doc a { color: var(--blurple); }
.doc .note {
  margin-top: 24px; padding: 16px 18px; border: 1px solid var(--line);
  border-left: 3px solid var(--blurple); border-radius: 10px; background: var(--surface);
}
.doc .note p:first-child { margin-top: 0; }

/* ─── Reveal on scroll (quiet: 8px + fade, once) ──────────────────────────── */
.rv { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero p.lead { max-width: none; }
  .more-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  /* The rail folds: the hour becomes a chip above its section, so the day still
     reads in order without a spine squeezed against the screen edge. */
  .rail::before { display: none; }
  .hour { grid-template-columns: 1fr; gap: 10px; }
  .hour-time { text-align: left; padding-top: 0; }
  .hour-time::after { display: none; }
  .hour-time b {
    display: inline-block; font-family: var(--mono); font-size: 12px;
    padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--muted);
  }
  .hour.is-now .hour-time b { border-color: var(--blurple); color: var(--blurple); }
}
