/* tooo landing — paper and ink (DESIGN.md): no hue, square corners, serif titles, the start square as the motif. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --board: #ececec;
  --well: #f2f2f2;
  --hair: #e2e2e2;
  --hair-2: #cfcfcf;
  --ink: #262626;
  --ink-2: #525252;
  --ink-3: #737373;
  --ink-3-board: #666666; /* #737373 is only 4.0:1 on the board; #666 is 4.9:1 */
  --mute: #bdbdbd;
  --half: #d0d0d0;
  --done: #d4d4d4;
  --on-ink: #ffffff;
  --lift: 0 1px 2px rgb(0 0 0 / 0.06);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* Windows has no good CJK serif by default; YaHei beats a faux-bold SimSun for the Chinese titles there */
  --serif: ui-serif, "New York", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", Cambria, Georgia, STSong, "Microsoft YaHei", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  --gutter: 16px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #1d1d1d;
    --board: #141414;
    --well: #242424;
    --hair: #2e2e2e;
    --hair-2: #3d3d3d;
    --ink: #ededed;
    --ink-2: #b0b0b0;
    --ink-3: #8a8a8a;
    --ink-3-board: #8a8a8a;
    --mute: #4a4a4a;
    --half: #4d4d4d;
    --done: #3d3d3d;
    --on-ink: #141414;
    --lift: 0 1px 2px rgb(0 0 0 / 0.4);
  }
  /* light-only screenshots are toned down a little on a dark page */
  .shot img.lite { filter: brightness(0.86); }
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }

/* language: the other one is hidden; html[data-l] is set before paint */
[data-l="en"] .zh, [data-l="zh"] .en { display: none !important; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }

/* ---------- brand mark: an ink square with a bar near its foot ---------- */
.mark { width: 22px; height: 22px; flex: none; }
.mark .m-sq { fill: var(--ink); }
.mark .m-bar { fill: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--serif); letter-spacing: -0.02em; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.top-r { display: flex; align-items: center; gap: 8px; }
.lang {
  min-width: 44px; height: 40px; padding: 0 10px;
  border: 1px solid var(--hair-2); background: var(--paper); color: var(--ink-2);
  font: 500 13px/1 var(--sans); cursor: pointer; border-radius: 0;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--on-ink);
  font: 600 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.btn:active, .lang:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-s { height: 40px; padding: 0 14px; font-size: 14px; }
@media (max-width: 380px) { .top .btn-s { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .lang:hover { color: var(--ink); border-color: var(--ink-3); }
  .btn:hover svg { transform: translateX(3px); }
  .btn svg { transition: transform 200ms var(--ease-out); }
}

/* ---------- the start square ---------- */
.sq {
  position: relative; display: inline-block; flex: none;
  width: 22px; height: 22px; border: 1.5px solid var(--mute); background: transparent;
  border-radius: 2px; /* DESIGN.md: the checkbox is the one thing with a 2px radius */
}
.sq svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sq .tick { fill: none; stroke: var(--on-ink); stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
.sq.is-doing { border-color: var(--ink); background: var(--half); }
.sq.is-done { border-color: var(--done); background: var(--done); }
.sq.is-done .tick { stroke: #fff; }
.sq.is-empty .tick, .sq.is-doing .tick { display: none; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.eyebrow { display: flex; align-items: flex-start; gap: 8px; margin: 32px 0 0; color: var(--ink-2); font-size: 15px; letter-spacing: 0.02em; }
.eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 9px; border: 1px solid var(--ink-3); }
.hero h1 { font-size: clamp(32px, 9.4vw, 68px); line-height: 1.12; margin: 14px 0 0; }
.hero h1 .l { display: block; }
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }
.cta-note { color: var(--ink-3); font-size: 14px; }

/* the big square is a working start box (index.html script): data-s 0 grey line, 1 ink line + grey fill,
   2 ink fill + tick drawing + ring, 3 settled light grey with the white tick. One short run on load, then taps. */
.big { display: flex; align-items: center; gap: 22px; }
.big > .sq {
  width: clamp(64px, 16vw, 104px); height: clamp(64px, 16vw, 104px); border-width: 3px;
  padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.big > .sq:active { transform: scale(0.97); }
.big > .sq .tick { stroke-width: 2.2; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 320ms var(--ease-out) 60ms, stroke 300ms; }
.big > .sq::after { content: ""; position: absolute; inset: -3px; border: 1px solid var(--ink); opacity: 0; pointer-events: none; }
.big[data-s="1"] > .sq { border-color: var(--ink); background: var(--half); }
.big[data-s="2"] > .sq { border-color: var(--ink); background: var(--ink); }
.big[data-s="3"] > .sq { border-color: var(--done); background: var(--done); transition-duration: 600ms; }
.big[data-s="2"] > .sq .tick, .big[data-s="3"] > .sq .tick { stroke-dashoffset: 0; }
.big[data-s="3"] > .sq .tick { stroke: #fff; }
.big[data-s="2"] > .sq::after { animation: ring 520ms var(--ease-out) both; }
@media (hover: hover) and (pointer: fine) {
  .big[data-s="0"] > .sq:hover { border-color: var(--ink-3); }
}
.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-3); }
.legend li { display: flex; align-items: center; gap: 10px; transition: color 200ms var(--ease-out); }
.legend .sq { width: 14px; height: 14px; border-width: 1.5px; }
.legend .sq .tick { stroke-width: 3; }
.big[data-s="0"] .legend li:nth-child(1), .big[data-s="1"] .legend li:nth-child(2),
.big[data-s="2"] .legend li:nth-child(3), .big[data-s="3"] .legend li:nth-child(3) { color: var(--ink); }
.demo-hint { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
html:not(.js) .demo-hint { display: none; }
@keyframes ring { from { opacity: 0.6; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  .big > .sq, .big > .sq .tick, .legend li { transition: none; }
  .big[data-s="2"] > .sq::after { animation: none; }
}

/* ---------- screenshots ---------- */
.shot { margin: 0; background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--lift); }
.shot img { width: 100%; }
.phone { width: min(300px, 78vw); }
.hero-shot { justify-self: center; position: relative; }
.hero-shot .shot { width: min(320px, 80vw); }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.board { background: var(--board); --ink-3: var(--ink-3-board); }
.kicker { color: var(--ink-3); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.sec-head { max-width: 40em; }
.sec-head h2 { font-size: clamp(30px, 6vw, 52px); margin-top: 14px; }
.sec-head p { margin-top: 18px; font-size: 17px; color: var(--ink-2); }

/* how a day goes */
.steps { display: grid; gap: 72px; margin-top: 64px; }
.step { display: grid; gap: 32px; align-items: center; }
.step-n { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font: 300 15px/1 var(--serif); }
.step-n .sq { width: 22px; height: 22px; }
.step h3 { font-size: clamp(26px, 4.6vw, 38px); margin-top: 18px; }
.step p { margin-top: 14px; color: var(--ink-2); max-width: 30em; }
.step-shots { display: flex; gap: 16px; justify-content: center; align-items: flex-start; }
.step-shots .phone { width: min(280px, 62vw); }
.step-shots.two .phone { width: min(260px, calc(50% - 8px)); }
.step-shots.two .phone + .phone { margin-top: 48px; }
/* two phones side by side are unreadable on a narrow phone: stack them */
@media (max-width: 559px) {
  .step-shots.two { flex-direction: column; align-items: center; }
  .step-shots.two .phone { width: min(280px, 78vw); }
  .step-shots.two .phone + .phone { margin-top: 0; }
}

.also { margin-top: 80px; border-top: 1px solid var(--hair); display: grid; }
.also div { padding: 20px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 4px; align-content: start; }
.also b { font-family: var(--serif); font-size: 18px; }
.also div > span { color: var(--ink-2); font-size: 15px; }

/* AI agents */
.ai-grid { display: grid; gap: 40px; margin-top: 56px; align-items: start; }
.chat { background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--lift); padding: 22px; display: grid; gap: 14px; font-size: 15px; }
.chat .who { display: block; color: var(--ink-3); font-size: 12.5px; margin-bottom: 2px; }
.chat .call { border-left: 2px solid var(--ink); padding: 6px 0 6px 12px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; }
.chat .call code { font: 600 13px/1.5 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; color: var(--ink); margin-right: 8px; }
.chat .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 2px solid var(--ink); padding: 10px 12px; }
.chat .row .ul { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.chat .row .sq { width: 18px; height: 18px; }
.ways { display: grid; border-top: 1px solid var(--hair-2); }
.ways div { padding: 18px 0; border-bottom: 1px solid var(--hair-2); }
.ways b { display: block; font-family: var(--serif); font-size: 19px; }
.ways div > span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.ways .url { color: var(--ink-3); font-size: 14px; margin-top: 18px; padding: 0; border: 0; overflow-wrap: anywhere; }

/* native */
.plats { display: grid; margin-top: 56px; border-top: 1px solid var(--hair); }
.plat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 20px 0; border-bottom: 1px solid var(--hair); align-content: start; }
.plat b { font-family: var(--serif); font-size: 20px; }
.plat > span:not(.chip) { grid-column: 1; color: var(--ink-2); font-size: 15px; }
.chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12.5px; color: var(--ink-3); border: 1px solid var(--hair-2); padding: 3px 8px; white-space: nowrap; }
.chip.now { color: var(--on-ink); background: var(--ink); border-color: var(--ink); text-decoration: none; }
.gallery { display: grid; gap: 24px; margin-top: 48px; }
.g-row { display: grid; gap: 24px; }
.gallery figure { margin: 0; min-width: 0; }
.gallery figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* trust */
.trust { display: grid; gap: 1px; margin-top: 56px; background: var(--hair); border: 1px solid var(--hair); }
.trust > div { background: var(--paper); padding: 28px 24px; }
.trust h3 { font-size: 22px; }
.trust p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.code6 { margin-top: 22px; font: 300 clamp(38px, 9vw, 48px)/1 var(--serif); letter-spacing: 0.06em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.devs { margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; }
.devs li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.devs li span + span { color: var(--ink-3); }
.sync { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.sync .sq { width: 18px; height: 18px; }

/* beta */
.beta { text-align: left; }
.beta-box { border: 2px solid var(--ink); padding: clamp(24px, 5vw, 56px); background: var(--paper); }
.beta-box h2 { font-size: clamp(28px, 5.4vw, 46px); }
.beta-box p { margin-top: 16px; max-width: 34em; color: var(--ink-2); font-size: 17px; }
.beta-box .cta { margin-top: 28px; }

/* footer */
footer { padding: 40px 0 56px; border-top: 1px solid var(--hair); color: var(--ink-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot a { text-underline-offset: 3px; }
.foot .brand { font-size: 18px; color: var(--ink); }
.foot .mark { width: 18px; height: 18px; }

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .hero { padding: 56px 0 96px; }
  .also { grid-template-columns: repeat(3, 1fr); border-top: 0; gap: 0 32px; }
  .also div { border-top: 1px solid var(--hair); }
  .trust { grid-template-columns: repeat(3, 1fr); }
  /* flex-grow = each picture's width / height, so the two in a row end up the same height */
  .g-row { display: flex; gap: 16px; }
  .g-mac { flex: 1.422 1 0; } .g-ipad { flex: 0.82 1 0; }
  .g-tab { flex: 1.6 1 0; } .g-menu { flex: 1.579 1 0; }
  section { padding: 112px 0; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; }
  .hero h1 { font-size: clamp(44px, 5vw, 64px); }
  .hero h1 .l { white-space: nowrap; }
  .hero-shot { justify-self: end; }
  .step { grid-template-columns: 1fr 1fr; gap: 64px; }
  .step:nth-child(even) .step-text { order: 2; }
  .ai-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .plats { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}
.beta { padding-top: 0; }
.beta-box h2 { margin-top: 14px; }

/* 404 */
.nf { padding-top: 12vh; padding-bottom: 96px; }
.nf .sq { width: 56px; height: 56px; border-width: 3px; }
.nf h1 { font-size: clamp(30px, 7vw, 56px); margin-top: 28px; }
.nf p { margin-top: 16px; color: var(--ink-2); font-size: 17px; }
.nf-app { color: var(--ink-2); text-underline-offset: 4px; }
