/* Nalu v6 — warm paper, black ink, grey second lines, product screens in stone panels. */
:root {
  color-scheme: light;
  --rail: 220px;
  --paper: #fbfaf7;
  --stone: #f1efeb;
  --ink: #161616;
  --ink-2: #55534f;
  --grey: #8d8b86;
  --line: #e4e1db;
  --blue: #1a6cf0;
  --s: 13px;
  --b: 15px;
  --h2: 28px;
  --h1: 44px;
  --r: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--b);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; padding: 0; }
h1 { font-size: var(--h1); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: var(--h2); line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: var(--b); line-height: 1.6; font-weight: 600; }
p { line-height: 1.8; }
.quiet { color: var(--grey); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 16px; top: 12px; padding: 10px; background: #fff; transform: translateY(-200%); z-index: 30; }
.skip-link:focus { transform: none; }
.caption { font-size: var(--s); color: var(--grey); line-height: 1.6; }
.text-link { font-size: var(--b); color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color 160ms ease-out; }
.text-link:hover { border-color: var(--ink); }

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--s); font-weight: 500; white-space: nowrap; transition: opacity 160ms ease-out; }
.pill:hover { opacity: .82; }

/* Left rail */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); padding: 28px 0 28px 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; z-index: 10; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-size: var(--b); font-weight: 600; letter-spacing: -.01em; }
.mark { width: 24px; height: 24px; }
.wordmark svg { stroke: none; }
.wordmark .word { width: 62px; height: 18px; }
.rail nav { display: flex; flex-direction: column; }
.rail nav a { min-height: 28px; display: flex; align-items: center; font-size: var(--s); color: var(--ink-2); transition: color 160ms ease-out; }
.rail nav a:hover { color: var(--ink); }
.rail .lang { position: fixed; top: 24px; right: 32px; }
.lang { min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--s); color: var(--ink-2); transition: border-color 160ms ease-out, color 160ms ease-out; }
.lang:hover { border-color: var(--ink); color: var(--ink); }

main, .ending { margin-left: var(--rail); padding-right: 180px; }
main > section, .dusk, .footer-inner { max-width: 980px; margin-inline: auto; }

/* Hero */
.hero { padding-top: 96px; text-align: center; }
.hero-actions { margin-top: 28px; display: flex; justify-content: center; align-items: center; gap: 24px; }
.stage { background: var(--stone); border-radius: calc(var(--r) + 28px); padding: 28px; }
.hero-stage { margin-top: 56px; }
.screen { width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 1px 2px rgb(0 0 0 / 6%); }

/* Sections */
.section { padding-top: 144px; }
.section > h2 { margin-bottom: 40px; }

.tab-stage { position: relative; padding-top: 72px; }
.segmented { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; background: #e6e3de; border-radius: 999px; }
.nowrap { white-space: nowrap; }
html[lang="en"] .nowrap::before { content: " "; }
.segmented button { white-space: nowrap; min-height: 30px; padding: 0 16px; border-radius: 999px; font-size: var(--s); color: #5d5b57; transition: background 160ms ease-out, color 160ms ease-out; }
.segmented button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.tab-stage + .caption { margin-top: 12px; }

.art-stage { position: relative; overflow: hidden; padding: 88px 72px 72px; }
.art-stage > .tab-panel, .art-stage > .segmented { position: relative; }
.art-stage > .segmented { position: absolute; }
.art-stage .screen { box-shadow: 0 2px 6px rgb(0 0 0 / 12%); }

.stepper { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: stretch; }
.steps { display: flex; flex-direction: column; justify-content: center; }
.steps button { text-align: left; display: grid; gap: 4px; padding: 20px 0 20px 20px; border-left: 1px solid var(--line); color: var(--grey); transition: color 160ms ease-out, border-color 160ms ease-out; }
.steps button strong { font-size: var(--b); font-weight: 600; }
.steps button span { font-size: var(--s); line-height: 1.7; }
.steps button[aria-selected="true"] { color: var(--ink); border-left-color: var(--ink); }
.steps button:hover { color: var(--ink); }
.step-stage { height: 600px; padding: 28px 0; display: flex; justify-content: center; overflow: hidden; }
.step-pane { height: 100%; position: relative; overflow: hidden; background: #fff; border-radius: 22px; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); }
.step-pane img { display: block; height: 100%; width: auto; }
.step-demo { margin-top: 28px; }

/* Right-side page position: always visible, marks the section being read. */
.progress { position: fixed; right: 32px; top: 50%; transform: translateY(-50%); z-index: 10; }
.progress ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.progress a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 28px; font-size: var(--s); color: var(--grey); transition: color 160ms ease-out; }
.progress a::after { content: ""; width: 12px; height: 2px; border-radius: 1px; background: #d6d3cc; transition: width 160ms ease-out, background 160ms ease-out; }
.progress a:hover { color: var(--ink); }
.progress a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.progress a[aria-current="true"]::after { width: 24px; background: var(--ink); }
.milestones { list-style: none; display: grid; gap: 16px; }
.milestones li { display: grid; grid-template-columns: 72px 88px 1fr; column-gap: 16px; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line); }
.milestones .state { font-size: var(--s); color: var(--grey); }
.milestones .done .state { color: var(--ink); }
.milestones time { font-size: var(--s); color: var(--grey); font-variant-numeric: tabular-nums; grid-column: 2; }
.milestones h3 { grid-column: 3; }
.milestones p { grid-column: 3; font-size: var(--s); color: var(--ink-2); }

.features { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.features li { display: grid; gap: 8px; align-content: start; }
.tile { height: 380px; margin-bottom: 12px; padding: 20px; border-radius: calc(var(--r) + 14px); background: var(--stone); display: flex; align-items: center; justify-content: center; }
.tile .crop { width: 100%; max-width: 250px; height: auto; border-radius: 14px; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); }
.features p { font-size: var(--s); color: var(--ink-2); }

/* Island */
.world-stage { position: relative; height: 560px; padding: 0; overflow: hidden; }
.world-surface { position: absolute; inset: 0 0 56px; display: flex; align-items: center; justify-content: center; }
.world-surface > img { width: 100%; height: 100%; object-fit: contain; }
.world-surface canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.world-surface canvas:active { cursor: grabbing; }
.world-stage[data-ready="true"] #world-poster { display: none; }
.world-stage[data-light="night"] { background: #2b2f36; }
.world-toolbar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 8px; }
.light-switch, .orbit-actions, .chip { display: flex; align-items: center; min-height: 36px; padding: 3px; background: #fff; border-radius: 999px; font-size: var(--s); }
.chip { padding: 0 16px; white-space: nowrap; }
.chip:disabled { opacity: .6; cursor: wait; }
.light-switch button, .orbit-actions button { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #6b6964; font-size: var(--s); }
.light-switch button[aria-pressed="true"] { background: var(--stone); color: var(--ink); }
.light-switch svg, .orbit-actions svg { width: 16px; height: 16px; }
.world-status { position: absolute; left: 28px; top: 24px; font-size: var(--s); color: var(--grey); }
.world-stage[data-light="night"] .world-status { color: #b9b6af; }

/* Questions */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.qa > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.questions details { border-radius: var(--r); transition: background 160ms ease-out; }
.questions details[open] { background: var(--stone); }
.questions summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; padding: 0 16px; font-size: var(--s); cursor: pointer; }
.questions summary::-webkit-details-marker { display: none; }
.questions details[open] summary svg { transform: rotate(45deg); }
.questions summary svg { transition: transform 160ms ease-out; }
.questions details p { padding: 0 16px 16px; font-size: var(--s); color: var(--ink-2); }

/* Footer */
.footer { padding-top: 120px; padding-bottom: 40px; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 40px; align-items: start; }
.footer-cols h3 { font-size: var(--s); margin-bottom: 8px; }
.footer-cols a { display: block; font-size: var(--s); color: var(--ink-2); line-height: 2; }
.footer-cols a:hover { color: var(--ink); }
.footer-cols .caption { justify-self: end; }

/* Dialogs */
.sheet { width: calc(100% - 32px); max-width: 600px; max-height: calc(100dvh - 64px); padding: 48px; border: 0; border-radius: calc(var(--r) + 14px); background: var(--paper); color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgb(20 20 20 / 30%); }
.close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.close:hover { background: var(--stone); }
.full-note, .request, #request-brief, #request-saved { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.full-note h3 { margin-top: 8px; }
.request blockquote { width: 100%; padding: 16px; border-radius: var(--r); background: var(--stone); line-height: 1.8; }

/* Ending: one line and the way in. */
.dusk-mark { width: 56px; height: 56px; margin-bottom: 4px; stroke: none; } /* the door from the opening, closing the page */
.dusk { padding: 168px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }

/* Motion. Only when JS has run and the reader allows motion (html.motion). */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.motion .hero h1 .line { display: inline-block; animation: rise 800ms cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero h1 .line + br + .line { animation-delay: 140ms; }
.motion .hero-actions { animation: rise 800ms 260ms cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero-stage { animation: rise 1000ms 380ms cubic-bezier(.2, .7, .2, 1) both; }

.motion .reveal { opacity: 0; transform: translateY(32px); transition: opacity 800ms ease-out, transform 900ms cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .features .card { transform: translateY(60px); transition: transform 1100ms cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 110ms + 200ms); }
.motion .features .in .card { transform: none; }
.card { height: calc(100% + 16px); }
.card.bottom img { bottom: 16px; }
.motion .features .in .tile:hover .card { transform: translateY(-14px); transition-duration: 400ms; transition-delay: 0ms; }

.motion .tab-panel:not([hidden]) { animation: fade 450ms ease-out; }
.motion .step-pane:not([hidden]) img { animation: rise 600ms cubic-bezier(.2, .7, .2, 1); }

/* Autoplaying tabs: a bar fills under the selected tab; when it ends app.js moves on. */
[data-autoplay] [role="tab"] { position: relative; }
.motion [data-autoplay]:not(.stopped) [aria-selected="true"]::after { content: ""; position: absolute; background: var(--ink); transform-origin: left; animation: fill 5200ms linear both; }
.motion .segmented:not(.stopped) [aria-selected="true"]::after { left: 16px; right: 16px; bottom: 4px; height: 1.5px; border-radius: 1px; opacity: .5; }
.motion .steps:not(.stopped) [aria-selected="true"] { border-left-color: var(--line); }
.motion .steps:not(.stopped) [aria-selected="true"]::after { left: -1px; top: 0; bottom: 0; width: 2px; transform-origin: top; animation-name: fill-y; }
.motion [data-autoplay].paused [aria-selected="true"]::after { animation-play-state: paused; }

.motion .milestones .doing .state::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 2px; border-radius: 50%; background: var(--ink); animation: pulse 1800ms ease-in-out infinite; }

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

@media (max-width: 1180px) {
  .progress { display: none; }
  main, .ending { padding-right: 48px; }
}

@media (max-width: 1080px) {
}

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; gap: 40px; }
  :root { --h1: 30px; --h2: 28px; }
  .rail { position: sticky; top: 0; width: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--paper); }
  .rail nav { display: none; }
  .rail .lang { position: static; margin-left: auto; margin-right: 12px; }
  main, .ending { margin-left: 0; padding-inline: 20px; }
  .dusk { padding-top: 112px; }
  .hero { padding-top: 48px; }
  .stage { padding: 12px; border-radius: calc(var(--r) + 12px); }
  .hero-stage { margin-top: 36px; }
  .art-stage { padding: 64px 16px 16px; }
  .hero-stage picture, .tab-panel picture { display: flex; justify-content: center; }
  .hero-stage .screen, .tab-panel .screen { max-width: 340px; }
  .section { padding-top: 96px; }
  .section > h2 { margin-bottom: 28px; }
  .tab-stage { padding-top: 60px; }
  .qa, .stepper { grid-template-columns: 1fr; gap: 28px; }
  .step-stage { height: 520px; padding: 16px 0; }
  .milestones li { grid-template-columns: 1fr; row-gap: 4px; }
  .milestones time, .milestones h3, .milestones p { grid-column: 1; }
  .world-stage { height: 440px; padding: 0; }
  .world-toolbar { bottom: 14px; }
  .world-status { left: 16px; top: 14px; }
  .footer { padding-top: 80px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols .caption { grid-column: 1 / -1; justify-self: start; }
  .sheet { padding: 48px 22px 24px; }
}

/* Opening (intro.js). Until the canvas exists, a paper-coloured sheet covers the page. The page underneath is
   already fully drawn (no rise-in), so whatever the opening uncovers is the real page. */
html.intro body::before { content: ""; position: fixed; inset: 0; z-index: 900; background: #fbfaf7; }
.intro-canvas { position: fixed; inset: 0; z-index: 900; width: 100vw; height: 100vh; pointer-events: none; }
html.intro-played .hero h1 .line, html.intro-played .hero-actions, html.intro-played .hero-stage { animation: none; }

/* Opening: the header logo waits for the pixels that fly back from the door (intro.js draws them
   forming the mark), then hops into place while the letters of "nalu" pop in column by column. */
html.logo-wait .wordmark svg { visibility: hidden; }
html.logo-pop .wordmark .mark { animation: logo-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
html.logo-pop .wordmark .word rect { transform-box: fill-box; transform-origin: center; animation: px-in .32s cubic-bezier(.3, 1.6, .5, 1) var(--d, 0ms) both; }
@keyframes logo-pop { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-5px) scale(1.28); } 70% { transform: translateY(1px) scale(.96); } 100% { transform: none; } }
@keyframes px-in { from { opacity: 0; transform: translateY(-4px) scale(.2); } }

/* Cowork: a project board shared by three people; each person is shown with their own AI
   (the small Nalu tile), and every task belongs to one of those AIs. */
.board { width: 400px; height: auto; align-self: center; padding: 22px 22px 8px; color: var(--ink); }
.board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: var(--b); }
.board .people { display: flex; gap: 6px; }
.board ul { list-style: none; display: grid; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; column-gap: 12px; padding: 14px 0; border-top: 0.5px solid var(--line); }
.board .task { display: grid; line-height: 1.5; }
.board .task strong { font-size: var(--s); font-weight: 600; }
.board .task span { font-size: 12px; color: var(--grey); }
.pair { position: relative; display: inline-block; width: 30px; height: 30px; }
.pair .ai-badge { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 4px; outline: 2px solid #fff; stroke: none; }
.who { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 12px; font-weight: 600; color: #fff; }
.who.me { background: #3a3936; }
.who.lin { background: #7b7872; }
.who.yao { background: #b3afa8; }
.board .state { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; column-gap: 6px; width: 84px; font-size: 12px; color: var(--grey); }
.board .state i { width: 6px; height: 6px; border-radius: 50%; background: #cfcbc4; }
.board .run .state, .board .check .state { color: var(--ink); }
.board .run .state i { background: var(--blue); }
.board .check .state i { background: #e0952f; }
.board .done .state { color: var(--blue); }
.board .done .state i { background: var(--blue); }
.board .bar { flex-basis: 100%; height: 2px; margin-top: 5px; border-radius: 1px; background: linear-gradient(var(--blue), var(--blue)) 0 0 / var(--p) 100% no-repeat, var(--line); }
.board .review { grid-column: 2 / -1; margin-top: 10px; }
.board .review p { font-size: 12px; line-height: 1.6; color: var(--ink-2); margin-bottom: 8px; }
.board .actions { display: flex; gap: 8px; }
.board .actions button { min-height: 28px; padding: 0 12px; border-radius: 999px; border: 0.5px solid var(--line); font-size: 12px; color: var(--ink); }
.board .actions .ok { border-color: var(--blue); background: var(--blue); color: #fff; }
.motion .board:not([hidden]) .bar { animation: bar-in 1.2s ease-out both; }
.motion .board:not([hidden]) .run .state i { animation: pulse 1800ms ease-in-out infinite; }
@keyframes bar-in { from { background-size: 0 100%, auto; } }
@media (max-width: 860px) { .board { width: calc(100% - 24px); padding: 18px 16px 6px; } }
#cowork .step-stage { height: auto; min-height: 420px; padding: 40px 0; align-items: center; }
@media (max-width: 860px) { #cowork .step-stage { min-height: 0; padding: 20px 0; } }
.rail .gh { right: 88px; display: inline-flex; align-items: center; }
@media (max-width: 860px) { .rail .gh { display: none; } }
.questions .text-link { font-size: inherit; }
/* After the logo has hopped and its letters are in, the corner controls and the page index fade in. */
html.logo-wait .rail .lang, html.logo-wait .rail > .pill, html.logo-wait .progress { opacity: 0; }
html.logo-pop .rail .lang, html.logo-pop .rail > .pill, html.logo-pop .progress { animation: chrome-in .6s ease-out 1.15s both; }
html.logo-pop .rail .lang + .lang { animation-delay: 1.27s; }
html.logo-pop .rail > .pill { animation-delay: 1.39s; }
html.logo-pop .progress { animation-delay: 1.5s; }
@keyframes chrome-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.logo-pop .rail .lang, html.logo-pop .rail > .pill, html.logo-pop .progress { animation: none; } }
.film-narrow { display: none; }
@media (max-width: 760px) { .film-wide { display: none; } .film-narrow { display: block; } }
/* The chat film runs about 13.5 s; give its tab that long before moving on. */
.motion #tab-chat[aria-selected="true"]::after { animation-duration: 13000ms; }

/* Pixels around the pointer after the opening (cursor.js); multiply keeps text readable underneath */
.cursor-pixels { position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; pointer-events: none; mix-blend-mode: multiply; }

/* 登录 in the top-right, the one filled button there so it is easy to find */
.rail .login { right: 88px; display: inline-flex; align-items: center; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rail .login:hover { color: var(--paper); opacity: .85; }
@media (max-width: 860px) { .rail .login { margin-right: 8px; } .rail .login + .lang { margin-left: 0; } }
