/*
 * cohowork.ai (MT-I102). Every colour, shadow, radius and spacing step is a
 * token from packages/ui-tokens/src/theme.css, served beside this file as
 * /_gen/theme.css, under data-theme="geek" — the app's orange theme, the one
 * the sign-in page and the rail already wear. Nothing here names a colour.
 *
 * The sizes are the site's own: the token scale stops at 22px, because it was
 * made for an app. A display heading is not a second copy of anything.
 */

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

body.site {
  /* One page width and one gutter, so a full-bleed region's content lines up with the rest. */
  --page: 1240px;
  --gutter: clamp(var(--ar-space-4), 5vw, calc(var(--ar-space-8) * 2));
  margin: 0;
  background: var(--ar-canvas);
  color: var(--ar-fg);
  font-family: var(--ar-font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }
.accent { color: var(--ar-accent); }
/* The slogan's accent is one name: never broken inside it ("AI 专 / 员"), as the app's welcome screen does. */
.display .accent { white-space: nowrap; }

/* ── brand lockup: the fish and the wordmark, as on the sign-in page ── */
.brand { text-decoration: none; display: inline-flex; }
.brand__lockup { display: inline-flex; align-items: center; gap: var(--ar-space-2); }
.brand__fish { height: 22px; width: auto; }
.brand__word { font-family: var(--ar-font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; }
.brand__lockup--mini .brand__fish { height: 14px; }
.brand__lockup--mini .brand__word { display: none; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ar-space-2);
  padding: var(--ar-space-3) var(--ar-space-5);
  border-radius: var(--ar-radius-md);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--ar-accent); color: var(--ar-on-accent); box-shadow: var(--ar-shadow-accent); }
.btn--primary:hover { background: var(--ar-accent-hover); }
.btn--ghost { background: var(--ar-surface); color: var(--ar-fg); box-shadow: var(--ar-shadow-card); }
.btn--ghost:hover { background: var(--ar-hover); }
.btn--small { padding: var(--ar-space-2) var(--ar-space-4); font-size: 13px; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: var(--ar-space-8);
  padding: var(--ar-space-4) var(--gutter);
  background: color-mix(in srgb, var(--ar-canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ar-hairline);
}
.nav__links { display: flex; gap: var(--ar-space-6); font-size: 15px; color: var(--ar-fg-muted); }
.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--ar-fg); }
.nav__end { margin-left: auto; display: flex; align-items: center; gap: var(--ar-space-4); }
.nav__lang { display: flex; gap: var(--ar-space-1); font-size: 13px; }
.nav__lang a { text-decoration: none; color: var(--ar-fg-muted); padding: var(--ar-space-1) var(--ar-space-2); border-radius: var(--ar-radius-sm); }
.nav__lang a[aria-current] { color: var(--ar-fg); background: var(--ar-surface-sunken); }

/* ── regions: 24px or more between them (UI-GUIDE §3); a page needs far more ── */
.hero, .region {
  padding: calc(var(--ar-space-8) * 3) var(--gutter);
  max-width: var(--page); margin: 0 auto;
}
/* Full-bleed background, content on the same line as every other region:
   the side padding is whatever centres a --page-wide column (a padding
   percentage is of the containing block's width, i.e. the page's). */
.region--sunken {
  max-width: none; background: var(--ar-surface-sunken);
  padding-left: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
}
.region--center { text-align: center; }

.display {
  font-family: var(--ar-font-display); font-weight: 700;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.025em;
  margin: 0;
  /* Lines of about the same length: without it the slogan left one character on a line of its own ("为你工 / 作"). */
  text-wrap: balance;
}
.display--section { font-size: clamp(30px, 4vw, 44px); max-width: 20ch; }
.display--small { font-size: 40px; }
.eyebrow { margin: 0 0 var(--ar-space-3); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ar-accent); }
.lead { margin: var(--ar-space-4) 0 0; max-width: 62ch; font-size: 19px; color: var(--ar-fg-muted); }

/* ── hero ── */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: calc(var(--ar-space-8) * 2); align-items: center; padding-top: calc(var(--ar-space-8) * 2.5); }
.rotator { margin-top: var(--ar-space-6); }
.rotator__lines { list-style: none; margin: 0; padding: 0; min-height: 3.2em; font-size: 22px; line-height: 1.4; color: var(--ar-fg-muted); position: relative; }
.rotator__lines li { position: absolute; inset: 0; opacity: 0; transform: translateY(6px); transition: opacity 400ms ease, transform 400ms ease; }
.rotator__lines li.is-on { opacity: 1; transform: none; position: relative; }
.rotator__controls { display: flex; align-items: center; gap: var(--ar-space-2); margin-top: var(--ar-space-3); }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--ar-radius-pill); background: var(--ar-hairline); cursor: pointer; }
.dot.is-on { width: 24px; background: var(--ar-accent); }
.rotator__pause { margin-left: var(--ar-space-2); border: 0; background: none; color: var(--ar-fg-subtle); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--ar-space-3); margin-top: var(--ar-space-8); }
.hero__note { margin: var(--ar-space-3) 0 0; font-size: 13px; color: var(--ar-fg-subtle); }

/* No script, or no motion: every line at once, nothing moving. */
.no-js .rotator__lines li, .rotator.is-still .rotator__lines li { position: relative; opacity: 1; transform: none; }
.no-js .rotator__lines li + li, .rotator.is-still .rotator__lines li + li { margin-top: var(--ar-space-2); }
.no-js .rotator__controls, .rotator.is-still .rotator__controls { display: none; }

.hero__stage { position: relative; min-height: 380px; }
.hero > *, .grid > * { min-width: 0; }
.card {
  background: var(--ar-surface); border-radius: var(--ar-radius-card);
  box-shadow: var(--ar-shadow-float); padding: var(--ar-space-6);
  display: grid; gap: var(--ar-space-4);
  animation: rise 400ms ease both;
}
.card[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .rotator__lines li { transition: none; } }
.card__head { display: flex; align-items: center; gap: var(--ar-space-3); }
.card__icon { width: 36px; height: 36px; border-radius: var(--ar-radius-md); background: var(--ar-accent-soft); display: grid; place-items: center; }
.card__who { display: grid; }
.card__who small { color: var(--ar-fg-subtle); font-size: 12px; }
.card__title { margin: 0; font-size: 18px; }
.card__steps, .card__checks, .card__list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--ar-space-2); font-size: 15px; }
.card__steps { counter-reset: step; }
.card__steps li { counter-increment: step; display: flex; gap: var(--ar-space-3); align-items: baseline; }
.card__steps li::before { content: counter(step); flex: none; width: 22px; height: 22px; border-radius: var(--ar-radius-pill); background: var(--ar-surface-sunken); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.card__checks li { display: flex; gap: var(--ar-space-2); align-items: flex-start; }
.card__list li { padding-left: var(--ar-space-4); position: relative; }
.card__list li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: var(--ar-radius-pill); background: var(--ar-accent); }
.tick, .cross { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: var(--ar-radius-pill); padding: 2px; }
.tick { color: var(--ar-ok-fg); background: var(--ar-ok-bg); }
.cross { color: var(--ar-caution-fg); background: var(--ar-caution-bg); }
.card__foot { margin: 0; padding-top: var(--ar-space-3); border-top: 1px solid var(--ar-hairline); font-size: 13px; color: var(--ar-fg-muted); }
.card__foot--mono { font-family: var(--ar-font-mono); font-size: 12px; }
.card .btn { justify-self: start; }

.pill { margin-left: auto; padding: var(--ar-space-1) var(--ar-space-3); border-radius: var(--ar-radius-pill); font-size: 12px; font-weight: 600; background: var(--ar-accent-soft); color: var(--ar-rail-active-fg); }
.pill--ok { background: var(--ar-ok-bg); color: var(--ar-ok-fg); }
.pill--warm { background: var(--ar-caution-bg); color: var(--ar-caution-fg); }

/* ── grids of things ── */
.grid { display: grid; gap: var(--ar-space-6); margin-top: calc(var(--ar-space-8) * 1.5); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.feature { background: var(--ar-surface); border-radius: var(--ar-radius-card); box-shadow: var(--ar-shadow-card); padding: var(--ar-space-6); }
.feature h3 { margin: var(--ar-space-3) 0 var(--ar-space-2); font-size: 18px; }
.feature p { margin: 0; color: var(--ar-fg-muted); font-size: 15px; }
.feature--plain h3 { margin-top: 0; }
.feature__n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--ar-radius-md); background: var(--ar-accent-soft); color: var(--ar-accent); font-weight: 700; }

.ways { margin-top: var(--ar-space-8); gap: var(--ar-space-4); }
.way { border-left: 3px solid var(--ar-accent); padding-left: var(--ar-space-4); }
.way h3 { margin: 0 0 var(--ar-space-1); font-size: 16px; }
.way p { margin: 0; font-size: 14px; color: var(--ar-fg-muted); }
.listing { background: var(--ar-surface); border-radius: var(--ar-radius-card); box-shadow: var(--ar-shadow-card); padding: var(--ar-space-5); display: grid; gap: var(--ar-space-2); align-content: start; }
.listing__title { margin: 0; font-size: 17px; }
.listing__text { margin: 0; font-size: 14px; color: var(--ar-fg-muted); }
.listing__ref { margin: 0; font-family: var(--ar-font-mono); font-size: 12px; color: var(--ar-fg-subtle); }

.assistants { margin: var(--ar-space-6) 0 0; font-size: 17px; font-weight: 600; color: var(--ar-fg); }

/* ── footer ── */
.footer {
  display: flex; align-items: center; gap: var(--ar-space-6);
  padding: var(--ar-space-8) var(--gutter);
  border-top: 1px solid var(--ar-hairline); color: var(--ar-fg-muted); font-size: 14px;
}
.footer__links { display: flex; gap: var(--ar-space-4); }
.footer small { margin-left: auto; }

/* ── narrower screens ── */
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; gap: var(--ar-space-8); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 719px) {
  .nav__links { display: none; }
  /* The hero carries the same button a screen below; in the bar it pushed the page wider than the phone. */
  .nav__cta { display: none; }
  .nav { gap: var(--ar-space-4); }
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .hero, .region { padding-top: calc(var(--ar-space-8) * 2); padding-bottom: calc(var(--ar-space-8) * 2); }
  .rotator__lines { font-size: 19px; min-height: 4.4em; }
  .footer { flex-wrap: wrap; }
}
