/* Duet Bot brand: duet-bot/brand (coral bot + blue partner on near-black) */
:root {
  --bg: #0b0c10;
  --panel: #121318;
  --panel-2: #191b21;
  --line: #24262e;
  --text: #f0eff4;
  --muted: #9fa1ad;
  --dim: #8a8d99;
  --accent: #f47a38;
  --accent-2: #ee6b3d;
  --accent-ink: #2a1209;
  --blue: #5287f2;
  --blue-ink: #0d1a3d;
  --up: #66e391;
  --down: #ff7d88;
  --r: 16px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; }
p { margin: 0; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10, 11, 13, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.top nav a:hover { color: var(--text); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.035em; }
.logo img { width: 32px; height: 32px; border-radius: 9px; }
.logo b, .hero h1 em {
  font-weight: 800;
  background: linear-gradient(180deg, #ffb27a, #f47a38 50%, #e55a2b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cursor { color: var(--accent); font-weight: 800; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* inline mascots (js/mascots.js) */
[data-mascot], [data-scene] { display: block; }
[data-mascot] svg, [data-scene] svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 13px; color: var(--accent-ink) !important; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 72px clamp(16px, 4vw, 40px) 56px;
}
.eyebrow { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.05em; font-weight: 800; }
.hero h1 em { font-style: normal; }
.hero-art { position: relative; margin-right: calc(-1 * clamp(16px, 4vw, 40px)); cursor: pointer; }
.hero-art [data-scene] { width: 100%; aspect-ratio: 910 / 500; }
/* the banner scene has an opaque backdrop wider than the crop: never let it spill over the copy */
.hero-art [data-scene] svg { overflow: hidden; }
.hero-art::after { /* fade the scene's floor into the page */
  content: ""; position: absolute; inset: auto 0 0 0; height: 18%;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}

/* how it works: tiles + the demo thread */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.stack { display: grid; gap: 12px; margin-top: 28px; }
.stack .tile { display: grid; grid-template-columns: 26px 1fr; column-gap: 16px; padding: 18px 20px; }
.stack .tile .ico { grid-row: span 2; margin: 2px 0 0; }
.stack .tile h3 { margin-bottom: 4px; font-size: 17px; }
.lede { margin-top: 22px; max-width: 520px; font-size: 19px; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { margin-top: 22px; font: 13px var(--mono); color: var(--dim); }

/* phone / thread */
.stage { position: relative; padding-top: 96px; }
.stage .duet {
  position: absolute; top: -10px; right: 6%; width: 190px; height: 154px; z-index: 1;
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-8px); } }
.phone {
  position: relative; z-index: 2;
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
  padding: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 120px rgba(244, 122, 56, .08);
}
.phone-head { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; border-bottom: 1px solid var(--line); }
.phone-head [data-mascot] { width: 34px; height: 34px; }
.phone-head b { display: block; font-size: 15px; }
.phone-head small { color: var(--accent); font: 12px var(--mono); }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 14px 4px 6px; }
.msg {
  max-width: 88%; padding: 11px 14px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.45;
  opacity: 0; transform: translateY(6px); animation: pop .4s ease forwards;
}
.msg.in { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--blue); color: var(--blue-ink); border-bottom-right-radius: 6px; font-weight: 600; }
.msg .tag { display: block; margin-bottom: 4px; font: 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.msg.card { border: 1px solid var(--accent); }
.msg.card .tag { color: var(--accent); }
.up { color: var(--up); font-family: var(--mono); font-weight: 500; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions button {
  flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: 600 14px var(--sans); cursor: pointer;
}
.card-actions button.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card-actions button:disabled { opacity: .45; cursor: default; }
.card-actions button.chosen { opacity: 1; }
.demo-note { margin-top: 10px; text-align: center; font: 12px var(--mono); color: var(--dim); }
.thread .msg:nth-child(1) { animation-delay: .2s; }
.thread .msg:nth-child(2) { animation-delay: .9s; }
.thread .msg:nth-child(3) { animation-delay: 1.6s; }
.thread .msg:nth-child(4) { animation-delay: 2.5s; }
@keyframes pop { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .msg { animation: none; opacity: 1; transform: none; }
  .stage .duet, .agent:hover [data-mascot], .talking [data-mascot] { animation: none; }
  .tile, .agent, .say, .toast { transition: none; }
}

/* sections */
.band { max-width: 1180px; margin: 0 auto; padding: 72px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); }
.band h2, .final h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.035em; }
.sub { margin-top: 14px; max-width: 640px; font-size: 18px; color: var(--muted); }
.grid3, .grid4 { display: grid; gap: 16px; margin-top: 36px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.tile h3 { font-size: 19px; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile.num b { display: block; font: 800 28px/1.1 var(--sans); letter-spacing: -0.03em; margin-bottom: 10px; color: var(--accent); }
.tile.has-mascot { position: relative; }
.tile-mascot { position: absolute; top: 10px; right: 10px; width: 64px; height: 52px; }
.ico { width: 26px; height: 26px; margin-bottom: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tk { font-family: var(--mono); color: var(--text); }

/* team */
.team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 36px; }
.agent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; }
.agent.lead { border-color: var(--accent); }
.agent [data-mascot] { width: 96px; height: 92px; margin: -6px 0 12px -10px; }
.agent:hover [data-mascot] { animation: bob 1.6s ease-in-out infinite; }
.agent h3 { font-size: 18px; }
.role { font: 12px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 2px 0 10px; }
.agent p:last-child { color: var(--muted); font-size: 14.5px; }

/* strategy */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.strategy { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; gap: 18px; }
.s-head { display: flex; justify-content: space-between; align-items: baseline; font: 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.s-head b { font: 700 16px var(--sans); color: var(--text); text-transform: none; letter-spacing: 0; }
.strategy .field { display: grid; gap: 8px; }
.strategy .lbl { font-size: 13px; color: var(--muted); }
.strategy .field.row { display: flex; justify-content: space-between; align-items: center; color: var(--text); font-size: 15px; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; }
.strategy output { font: 13px var(--mono); color: var(--text); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.seg button { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 13px var(--sans); cursor: pointer; }
.chip.on { border-color: var(--accent); color: var(--text); }
.chip.on::before { content: "✓ "; color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.switch { flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); background: var(--accent-ink); }
.s-sum { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }

/* token */
.ca {
  display: inline-flex; gap: 12px; align-items: center; margin-top: 26px; padding: 10px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font: 13px var(--mono); cursor: pointer; transition: border-color .15s, transform .15s;
}
.ca:hover { border-color: var(--accent); transform: translateY(-1px); }
.ca span { color: var(--dim); }
.ca-ico { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ca:hover .ca-ico { stroke: var(--accent); }

/* clickable tiles and talking mascots */
[data-toast], [data-say] { cursor: pointer; }
.tile, .agent { transition: transform .18s ease, border-color .18s ease; }
.tile[data-toast]:hover, .tile[data-say]:hover, .agent:hover { transform: translateY(-3px); border-color: #3a3d47; }
.agent.lead:hover { border-color: var(--accent); }
.agent, .tile[data-say] { position: relative; }
.say {
  position: absolute; z-index: 3; left: 14px; right: 14px; top: -14px;
  padding: 9px 12px; border-radius: 14px 14px 14px 4px;
  background: var(--text); color: var(--bg); font: 600 13px/1.35 var(--sans);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: bottom left;
  pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.say:empty { display: none; }
.talking .say { opacity: 1; transform: none; }
.talking [data-mascot] { animation: hop .5s ease; }
@keyframes hop { 30% { transform: translateY(-10px) rotate(-4deg); } 60% { transform: translateY(0) rotate(2deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(440px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--accent);
  color: var(--text); font: 500 14px/1.4 var(--sans); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.demo-replay {
  align-self: center; margin-top: 4px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: 500 12px var(--mono); cursor: pointer;
}
.demo-replay:hover { color: var(--text); border-color: var(--accent); }

/* join: success state */
.done { margin-top: 36px; padding: 28px; border-radius: 20px; border: 1px solid var(--accent); background: var(--panel); text-align: center; }
.done [data-scene] { width: 160px; height: 130px; margin: 0 auto 10px; }
.done h2 { font-size: 30px; letter-spacing: -0.03em; }
.done p { color: var(--muted); margin: 10px auto 22px; max-width: 460px; }
.done .cta-row { justify-content: center; margin-top: 0; }

.final { text-align: center; padding: 72px 16px 96px; border-top: 1px solid var(--line); }
.final [data-scene] { width: 200px; height: 162px; margin: 0 auto 18px; }
.final h2 { max-width: 760px; margin: 0 auto 28px; }

footer { padding: 32px clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; display: grid; gap: 8px; max-width: 1180px; margin: 0 auto; }

/* join + litepaper */
.narrow { max-width: 720px; margin: 0 auto; padding: 64px 16px 96px; }
.narrow h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1.05; }
.form { display: grid; gap: 22px; margin-top: 36px; }
.form .btn { justify-self: start; }
.q { display: grid; gap: 8px; }
fieldset.q { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.q > span, .q > legend { font-weight: 600; padding: 0; }
.q > legend { margin-bottom: 8px; }
.req { font: normal 11px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; }
.q small { color: var(--dim); }
.q input[type=text], .q textarea, .q select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #6a6d7a;
  background: var(--panel); color: var(--text); font: 16px var(--sans);
}
.q input::placeholder, .q textarea::placeholder { color: var(--dim); opacity: 1; }
.q textarea { min-height: 96px; resize: vertical; }
.q input:focus, .q textarea:focus, .q select:focus { border-color: var(--accent); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.opts input { accent-color: var(--accent); }
.form-msg { color: var(--accent); min-height: 1.5em; }
.paper h2 { font-size: 28px; margin: 48px 0 12px; }
.paper h2 small { display: block; font: 12px var(--mono); color: var(--accent); letter-spacing: .1em; margin-bottom: 8px; }
.paper p, .paper li { color: var(--muted); font-size: 17px; }
.paper p + p { margin-top: 14px; }
.paper strong { color: var(--text); }
.paper ul { padding-left: 20px; display: grid; gap: 8px; }

@media (max-width: 960px) {
  .hero, .split, .how { grid-template-columns: 1fr; }
  .hero-art { margin: 0 calc(-1 * clamp(16px, 4vw, 40px)); }
  .stage { max-width: 440px; width: 100%; margin: 0 auto; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .agent.lead { grid-column: 1 / -1; }
  .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .top nav a:not(.btn) { display: none; }
  .hero { padding-top: 40px; }
  .stage { padding-top: 76px; }
  .stage .duet { width: 150px; height: 122px; }
  .team, .grid4 { grid-template-columns: 1fr; }
  .lede, .sub { font-size: 16px; }
}
