/* TextAI marketing site.
   Visual language follows text.com: near-monochrome, oversized tight-tracked
   type, thin rules, and a lot of whitespace. Brand gold is the only colour
   accent. Red is never used. */

:root {
  --bg: #ffffff;
  --fg: #0b0b0c;
  --fg-soft: #2a2a2e;
  --muted: #6b6b70;
  --line: #e8e8ea;
  --line-strong: #d4d4d8;
  --surface: #f7f7f8;
  --surface-2: #f0f0f2;
  --gold: #d4af37;
  --ink: #0b0b0c;
  --on-ink: #f4f4f5;
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 11vh, 150px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 11, 12, .05);
  --shadow-md: 0 18px 48px rgba(11, 11, 12, .1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 640; letter-spacing: -.03em; line-height: 1.02; }
p { margin: 0; }

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

/* ---------------------------------------------------------------- wordmark */

.wordmark {
  display: inline-flex; align-items: baseline;
  font-size: 21px; font-weight: 700; letter-spacing: -.04em;
}
.wordmark .pipe { color: var(--gold); font-weight: 400; }

/* --------------------------------------------------------------------- nav */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; gap: 34px;
}

.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; }

.nav-item { position: relative; }

.nav-item > .nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; border: 0; background: none;
  font-size: 14.5px; font-weight: 500; color: var(--fg-soft); cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.nav-item > .nav-trigger::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .35; transition: transform .16s ease;
}
.nav-item:hover > .nav-trigger,
.nav-item:focus-within > .nav-trigger { background: var(--surface-2); color: var(--fg); }

.nav-panel {
  position: absolute; top: calc(100% + 10px); left: -8px; min-width: 260px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-item:hover > .nav-panel,
.nav-item:focus-within > .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-link { display: block; padding: 9px 12px; border-radius: var(--radius-sm); }
.nav-link:hover { background: var(--surface); }
.nav-link b { display: block; font-size: 14px; font-weight: 600; }
.nav-link span { display: block; font-size: 12.5px; color: var(--muted); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-text-link {
  font-size: 14.5px; font-weight: 500; color: var(--fg-soft);
  padding: 8px 10px; border-radius: 999px;
}
.nav-text-link:hover { background: var(--surface-2); color: var(--fg); }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--ink); color: var(--on-ink); }
.btn-solid:hover { background: #232327; }
.btn-outline { border-color: var(--line-strong); color: var(--fg); }
.btn-outline:hover { border-color: var(--fg); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* -------------------------------------------------------------------- hero */

.hero { padding: clamp(56px, 9vh, 110px) 0 clamp(48px, 8vh, 96px); }

.hero-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; }

.rail { position: sticky; top: 108px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.rail a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 5px 0 5px 14px; border-left: 2px solid var(--line);
  transition: color .18s ease, border-color .18s ease;
}
.rail a:hover { color: var(--fg); }
.rail a[data-active='1'] { color: var(--fg); border-left-color: var(--gold); font-weight: 600; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); text-transform: uppercase;
}
.kicker::before { content: ''; width: 22px; height: 1px; background: var(--gold); }

.hero h1 {
  margin-top: 22px;
  font-size: clamp(38px, 6.4vw, 80px);
  max-width: 22ch;
}
.hero h1 em {
  display: block; margin-top: 18px;
  font-size: clamp(20px, 2.4vw, 34px);
  font-style: normal; font-weight: 500;
  letter-spacing: -.015em; line-height: 1.25;
  color: var(--muted);
}

.hero-sub {
  margin-top: 26px; max-width: 54ch;
  font-size: clamp(16px, 1.5vw, 19px); color: var(--muted);
}

.hero-actions { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}

/* ------------------------------------------------------------------ splits */

.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }

/* `ch` resolves against the element's own font size, so the constraint has to
   sit on the heading rather than on this wrapper — otherwise a 58px heading is
   squeezed into a 16px-derived 30ch box and wraps every other word. */
.section-head { max-width: 720px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 58px); max-width: 20ch; }
.section-head p { margin-top: 20px; color: var(--muted); font-size: 17px; max-width: 60ch; }

/* ------------------------------------------------------------------- verbs */

.verbs { margin-top: clamp(44px, 7vh, 84px); border-top: 1px solid var(--line); }

.verb {
  display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 380px);
  gap: 36px; align-items: center;
  padding: clamp(28px, 4vh, 46px) 0;
  border-bottom: 1px solid var(--line);
}

.verb h3 { font-size: clamp(26px, 3.2vw, 40px); }
.verb p { color: var(--muted); max-width: 44ch; }

/* ------------------------------------------------------------------- mocks */

.mock {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm);
}
.mock-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: block; }
.mock-bar b { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.mock-body { display: flex; flex-direction: column; gap: 8px; }

.bubble {
  max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.45;
  background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--fg-soft);
}
.bubble.me {
  align-self: flex-end; background: var(--ink); color: var(--on-ink);
  border-color: var(--ink); border-bottom-left-radius: 14px; border-bottom-right-radius: 5px;
}
.bubble .tick { display: block; margin-top: 3px; font-size: 10px; color: var(--gold); }
.bubble.sys {
  align-self: center; background: none; border: 0; font-size: 11px; color: var(--muted); padding: 0;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg-soft);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

.queue { display: flex; flex-direction: column; gap: 8px; }
.q-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.q-row .dot-av {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.q-row .q-name { flex: 1; color: var(--fg-soft); }
.q-row .q-pos { color: var(--muted); font-variant-numeric: tabular-nums; }

.terminal {
  background: var(--ink); border-radius: var(--radius); padding: 16px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.75; color: #d6d6da;
}
.terminal .k { color: var(--gold); }
.terminal .c { color: #6f6f76; }

/* ----------------------------------------------------------------- updates */

.cards { margin-top: clamp(40px, 6vh, 72px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  background: var(--bg); display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card .tag { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.card p { color: var(--muted); font-size: 14px; }
.card .art {
  margin-top: 8px; height: 88px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.card .art .spark { display: flex; align-items: flex-end; gap: 5px; height: 46px; }
.card .art .spark i { width: 7px; border-radius: 3px; background: var(--line-strong); display: block; }
.card .art .spark i.hi { background: var(--gold); }

/* ------------------------------------------------------------------- embed */

.embed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }

.code-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg);
}
.code-card .code-head {
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.code-card pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.7;
}
.code-card .tag-attr { color: var(--muted); }
.code-card .tag-name { color: var(--fg); font-weight: 600; }
.code-card .tag-val { color: var(--gold); }

.steps { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; }
.step .num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.step b { display: block; font-size: 15px; }
.step span { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- together */

.together { background: var(--ink); color: var(--on-ink); border-top: 0; }
.together .section-head h2 { color: var(--on-ink); }
.together .section-head p { color: #a1a1a7; }
.together .kicker { color: #a1a1a7; }

.partners { margin-top: clamp(40px, 6vh, 72px); border-top: 1px solid #232327; }
.partner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 4px; border-bottom: 1px solid #232327;
  transition: padding-left .2s ease, background .2s ease;
}
.partner:hover { padding-left: 14px; }
.partner h3 { font-size: clamp(22px, 2.6vw, 34px); color: var(--on-ink); }
.partner p { color: #a1a1a7; font-size: 14.5px; margin-top: 6px; max-width: 52ch; }
.partner .arrow { font-size: 24px; color: var(--gold); flex-shrink: 0; }

/* --------------------------------------------------------------------- cta */

.cta { padding: var(--section-y) 0; border-top: 1px solid var(--line); text-align: center; }
.cta h2 { font-size: clamp(32px, 5.4vw, 66px); max-width: 20ch; margin: 0 auto; }
.cta p { margin: 22px auto 0; color: var(--muted); max-width: 46ch; }
.cta .hero-actions { justify-content: center; margin-top: 32px; }

/* ------------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--fg); }
.footer small { display: block; margin-top: 26px; color: var(--muted); font-size: 13px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verb { grid-template-columns: 180px minmax(0, 1fr); }
  .verb .mock { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-inner { gap: 16px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .embed-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .verb { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .nav-text-link { display: none; }
  .hero-meta { gap: 14px; flex-direction: column; }
  .partner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
