/* Apptiller — one typeface (Hanken Grotesk), one accent (green), one grey family (green-greys).
   Shape rule: actions are pills; the product window is 16; cards 12; chips and small controls 8. */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f4f1;
  --ink: #111614;
  --ink-2: #39413e;
  --muted: #646d69;
  --line: #e4e6e2;
  --line-2: #d6d9d4;
  --accent: #0f6b4f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 107, 79, .09);
  --warn: #a5541f;
  --shadow-sm: 0 1px 2px rgba(17, 22, 20, .05);
  --shadow-lg: 0 1px 2px rgba(17, 22, 20, .04), 0 24px 60px -24px rgba(17, 22, 20, .22);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c100e;
    --surface: #131816;
    --surface-2: #1a201d;
    --ink: #eef1ee;
    --ink-2: #c3cac6;
    --muted: #8b9590;
    --line: #232a27;
    --line-2: #2d3531;
    --accent: #5fd3a3;
    --accent-ink: #062018;
    --accent-soft: rgba(95, 211, 163, .12);
    --warn: #e9a06f;
    --shadow-sm: none;
    --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
svg { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
.num { font-variant-numeric: tabular-nums; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.035em; color: var(--ink); }
.logo svg { width: 24px; height: 24px; }
.logo .mark, .toolcall .mk { color: var(--accent); }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); transition: color .15s var(--ease); }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* buttons: pills only */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 999px; padding: 0 20px;
  font: 600 15px/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--muted); }
.nav .btn { min-height: 36px; padding: 0 16px; font-size: 14px; }

/* hero */
.hero { padding-block: 84px 0; }
.hero-copy { max-width: 820px; margin-inline: auto; text-align: center; }
.hero-copy .lede { margin-inline: auto; }
.hero-copy .cta-row, .hero-copy .checks { justify-content: center; }
.pill-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 8px; }
.pill-tag b { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; border-radius: 999px; padding: 2px 8px; }
h1 { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -.045em; font-weight: 650; margin: 22px 0 18px; text-wrap: balance; }
.lede { font-size: clamp(18px, 2vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 36em; margin: 0 0 30px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 26px 0 0; font-size: 14.5px; color: var(--muted); }
.checks li { display: inline-flex; align-items: center; gap: 7px; }
.checks svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* product window */
.stage { margin-top: 56px; position: relative; }
.stage::before { content: ""; position: absolute; inset: 12% 4% -6% 4%; background: var(--accent-soft); filter: blur(60px); border-radius: 40px; z-index: -1; }
.window { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 520px; }
.side { background: var(--surface-2); border-right: 1px solid var(--line); padding: 16px 12px; font-size: 13.5px; color: var(--muted); }
.side .dots { display: flex; gap: 6px; margin: 2px 4px 18px; }
.side .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); display: block; }
.side .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 16px 8px 6px; }
.side .it { padding: 7px 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .it.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.side .conn { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.side .conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; }
.convo { min-width: 0; padding: 28px clamp(18px, 4vw, 56px) 30px; display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.msg-user { align-self: flex-end; max-width: 78%; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.toolcall { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.toolcall .mk { width: 16px; height: 16px; }
.toolcall code { font: 12.5px var(--mono); color: var(--ink-2); }
.toolcall .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.toolcall.done .spin { display: none; }
.toolcall .ok { display: none; width: 14px; height: 14px; color: var(--accent); }
.toolcall.done .ok { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.answer p { margin: 0 0 10px; color: var(--ink-2); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.data th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.data tr:last-child td { border-bottom: 0; }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
table.data .src { display: inline-flex; align-items: center; gap: 8px; }
table.data .src i { width: 8px; height: 8px; border-radius: 2px; background: var(--line-2); display: block; }
.good { color: var(--accent); font-weight: 600; }
.bad { color: var(--warn); font-weight: 600; }
.proposal { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
  justify-content: space-between; background: var(--surface); }
.proposal .what { font-weight: 600; }
.proposal .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.proposal .acts { display: flex; gap: 8px; }
.proposal .btn { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.applied { display: none; align-items: center; gap: 8px; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.proposal.is-applied .acts { display: none; }
.proposal.is-applied .applied { display: inline-flex; }
.example-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }

/* reveal motion for the scripted conversation */
.js .seq { opacity: 0; transform: translateY(6px); transition: opacity .28s var(--ease), transform .28s var(--ease); }
.js .seq.in { opacity: 1; transform: none; }
.js .proposal.seq { transform: scale(.97); }
.js .proposal.seq.in { transform: none; }

/* works with */
.works { padding-block: 72px 24px; }
.works p { text-align: center; font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.names { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; font-weight: 600; font-size: 16px; color: var(--ink-2); letter-spacing: -.01em; }
.names span { opacity: .78; }

/* sections */
section.block { padding-block: 104px; }
.head { max-width: 680px; margin-bottom: 48px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); }
h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -.04em; font-weight: 650; margin: 10px 0 14px; text-wrap: balance; }
.head p { color: var(--ink-2); font-size: 18px; margin: 0; text-wrap: pretty; }
h3 { font-size: 18px; letter-spacing: -.02em; font-weight: 650; margin: 0 0 6px; }

/* join diagram */
.join { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.streams { padding: 8px; display: grid; gap: 4px; }
.stream { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 8px; }
.stream:nth-child(odd) { background: var(--surface-2); }
.stream b { font-weight: 600; }
.stream span { color: var(--muted); font-size: 14px; text-align: right; }
.journey { padding: 24px; }
.journey .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.journey .top span { font-size: 13px; color: var(--muted); }
.fun { display: grid; gap: 12px; }
.fr { display: grid; grid-template-columns: 112px 1fr 64px; gap: 12px; align-items: center; font-size: 14.5px; }
.fr .src { font-size: 12px; color: var(--muted); display: block; }
.track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.track i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 999px; transform-origin: left; }
.js .track i { transform: scaleX(0); transition: transform .7s var(--ease); }
.js .fun.in .track i { transform: scaleX(1); }
.js .fun.in .fr:nth-child(2) i { transition-delay: .06s; } .js .fun.in .fr:nth-child(3) i { transition-delay: .12s; }
.js .fun.in .fr:nth-child(4) i { transition-delay: .18s; } .js .fun.in .fr:nth-child(5) i { transition-delay: .24s; }
.fr .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.journey .foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 14.5px; gap: 12px; flex-wrap: wrap; }
.journey .foot b { font-variant-numeric: tabular-nums; }

/* principles */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pr { padding: 26px; }
.pr .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.pr .ic svg { width: 18px; height: 18px; }
.pr p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* loop */
.loop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.st { padding: 22px; position: relative; }
.st .n { font: 500 12.5px var(--mono); color: var(--accent); display: block; margin-bottom: 14px; }
.st p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* visibility */
.vis { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.vis .head { margin-bottom: 0; }
ul.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
ul.ticks li { display: flex; gap: 10px; color: var(--ink-2); }
ul.ticks svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 4px; }
.rank { padding: 20px; }
.rank .q { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.rank .q b { color: var(--ink); font-weight: 600; }
.rr { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 8px; font-size: 15px; }
.rr + .rr { border-top: 1px solid var(--line); }
.rr .n { font: 12.5px var(--mono); color: var(--muted); }
.rr.you { background: var(--accent-soft); border-top-color: transparent; }
.rr.you + .rr { border-top-color: transparent; }
.eng { display: flex; gap: 5px; }
.eng i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: block; transition: background-color .3s var(--ease); }
.eng i.on { background: var(--accent); }
.js .rank:not(.in) .eng i.on { background: var(--line-2); }
.rank .legend { font-size: 12.5px; color: var(--muted); margin: 12px 10px 0; }

/* faq */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* final */
.final { padding-block: 40px 120px; }
.final .card { padding: clamp(32px, 6vw, 64px); text-align: center; }
.final h2 { margin-inline: auto; max-width: 15em; }
.final p { color: var(--ink-2); margin: 0 auto 28px; max-width: 34em; }
.final .cta-row { justify-content: center; }
.final .fine { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
footer nav { display: flex; gap: 22px; }
footer nav a { text-decoration: none; } footer nav a:hover { color: var(--ink); }

/* legal pages */
.doc { max-width: 720px; padding-block: 64px 40px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin: 0 0 6px; }
.doc .muted { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 21px; letter-spacing: -.02em; margin: 40px 0 8px; }
.doc h3 { font-size: 16px; margin: 22px 0 4px; }
.doc p, .doc li { color: var(--ink-2); }
.doc a { color: var(--accent); }

/* responsive */
@media (max-width: 980px) {
  .window { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .join, .vis { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
  .loop-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-block: 52px 0; }
  section.block { padding-block: 72px; }
  .three, .loop-grid, .faq { grid-template-columns: 1fr; }
  .faq { gap: 0; }
  .msg-user { max-width: 92%; }
  .fr { grid-template-columns: 88px 1fr 52px; }
  .convo { padding: 20px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .seq, .js .track i, .eng i { transition: none !important; opacity: 1 !important; transform: none !important; }
  .toolcall .spin { animation: none; }
}

/* principles: plain columns with rules, no cards */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.col { border-top: 2px solid var(--ink); padding-top: 22px; }
.col .ic { width: 22px; height: 22px; color: var(--accent); margin-bottom: 14px; }
.col p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* control loop: full-width inverted band with a timeline */
.band { background: var(--ink); color: var(--bg); padding-block: 104px; }
.band .eyebrow { color: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.band h2 { color: var(--bg); }
.band .head p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; margin-top: 8px; }
.timeline::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: color-mix(in srgb, var(--bg) 18%, transparent); }
.tl { position: relative; padding: 34px 28px 0 0; }
.tl::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--ink);
  border: 2px solid color-mix(in srgb, var(--accent) 60%, var(--bg)); }
.tl:first-child::before { background: color-mix(in srgb, var(--accent) 60%, var(--bg)); }
.tl h3 { color: var(--bg); }
.tl p { margin: 0; color: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 15.5px; }
@media (prefers-color-scheme: dark) { .band { background: #e9eee9; color: #0c100e; } .band h2, .tl h3 { color: #0c100e; }
  .band .head p, .tl p { color: #3c4541; } .band .eyebrow { color: #0f6b4f; }
  .timeline::before { background: #c9d0cb; } .tl::before { background: #e9eee9; border-color: #0f6b4f; } .tl:first-child::before { background: #0f6b4f; } }

/* founder note */
.founder { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.founder blockquote { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.32; letter-spacing: -.025em; font-weight: 500; text-wrap: pretty; }
.founder .by { margin-top: 20px; color: var(--muted); font-size: 15px; }
.apps { padding: 22px; }
.apps .lbl { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.apps ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.apps li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 15px; }
.apps li:nth-child(odd) { background: var(--surface-2); }
.apps li span { color: var(--muted); font-size: 14px; }
@media (max-width: 980px) { .founder, .cols { grid-template-columns: 1fr; gap: 28px; } .timeline { grid-template-columns: 1fr 1fr; row-gap: 36px; } .timeline::before { display: none; } }
@media (max-width: 640px) { .timeline { grid-template-columns: 1fr; } .band { padding-block: 72px; } }
