@font-face {
  font-family: "Pixelify Sans";
  src: url("fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #efebe2;
  --ink: #17150f;
  --mid: rgba(23, 21, 15, 0.68);
  --low: rgba(23, 21, 15, 0.45);
  --rule: rgba(23, 21, 15, 0.16);
  --panel: #e6e1d5;
  --accent: #ff5a1f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --pixel: "Pixelify Sans", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.px { font-family: var(--pixel); }
.word { font-weight: 500; letter-spacing: 0.01em; }
a { color: inherit; }
p { margin: 0; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 24px; }
.bot-sm { width: 26px; height: 26px; display: block; }
.bot-sm svg, .bot-lg svg { display: block; width: 100%; height: 100%; }
.langs { display: flex; gap: 2px; }
.langs button {
  font: 500 14px var(--pixel); letter-spacing: 0.06em; color: var(--low);
  background: none; border: 1.5px solid transparent; padding: 3px 8px; cursor: pointer;
}
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

/* Hero */
.hero { padding: 64px 0 56px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid);
}
.pill i { width: 8px; height: 8px; background: var(--accent); }
h1 {
  font: 400 clamp(38px, 7.4vw, 68px)/1.08 var(--serif);
  letter-spacing: -0.02em; margin: 0 0 26px; max-width: 14em;
}
.hl {
  display: inline-block; background: var(--accent); color: var(--ink);
  font-weight: 600; letter-spacing: 0; padding: 0 0.22em 0.04em; margin-left: 0.04em;
  transform: rotate(-1.6deg); box-shadow: 4px 4px 0 var(--ink);
}
.lede { font-size: 18px; color: var(--mid); max-width: 34em; margin-bottom: 30px; }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 500; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 18px; box-shadow: 4px 4px 0 var(--accent);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--accent); }
.fine { font-size: 13px; color: var(--low); margin-top: 16px; }

/* Stage */
.stage-wrap { margin-bottom: 30px; }
.stage-head, .col-head, .eyebrow, .tag {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--low);
}
.stage-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.live i { width: 7px; height: 7px; background: var(--accent); animation: blink 1.2s steps(2) infinite; }
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); gap: 18px; align-items: start;
  background: var(--panel); border: 1.5px solid var(--ink); padding: 20px; height: 300px; overflow: hidden;
}
.col-head { margin-bottom: 10px; display: none; }
.tk, .dr {
  background: var(--paper); border: 1.5px solid var(--ink); padding: 10px 12px; margin-bottom: 10px;
  font-size: 14px; line-height: 1.35; max-height: 110px; overflow: hidden;
  transition: transform 0.5s ease, opacity 0.45s ease, max-height 0.5s ease, padding 0.5s ease,
    margin 0.5s ease, border-width 0.5s ease;
}
.tk b, .dr b {
  display: block; font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--low); margin-bottom: 3px;
}
.tk.take { transform: translateX(46px); opacity: 0; max-height: 0; padding-block: 0; margin-bottom: 0; border-width: 0; }
.tk.in { animation: rise 0.5s ease both; }
.dr { box-shadow: 3px 3px 0 var(--rule); }
.dr.in { animation: slide 0.45s ease both; }
.dr span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr i { display: block; height: 5px; background: var(--rule); margin-top: 7px; }
.dr i:last-child { width: 62%; }
.dr.ok { box-shadow: 3px 3px 0 var(--accent); }
.dr.ok b { color: var(--accent); }
.agent { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 44px; }
.bot-lg { width: 104px; height: 104px; display: block; }
.status { font-size: 14px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; min-height: 1.4em; }
.status::after { content: "…"; }
.agent[data-state="idle"] .status { color: var(--low); }
.eye { transform-box: fill-box; transform-origin: center; animation: wink 4.5s infinite; }
.agent:not([data-state="idle"]) .ant { animation: blink 0.5s steps(2) infinite; }
.agent:not([data-state="idle"]) .bot-lg { animation: bob 0.5s steps(2) infinite; }

@keyframes blink { 50% { opacity: 0.15; } }
@keyframes wink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes slide { from { opacity: 0; transform: translateX(-40px); } }

/* Sections */
.sec { padding: 64px 0; border-top: 1.5px solid var(--ink); }
.stage-wrap + .sec { margin-top: 50px; }
.eyebrow { margin-bottom: 22px; }
.headword { font-size: clamp(46px, 10vw, 84px); font-weight: 400; line-height: 1; margin: 0 0 10px; }
.pron { font: italic 17px var(--serif); color: var(--low); margin-bottom: 16px; }
.def { font: 400 22px/1.45 var(--serif); max-width: 28em; }
.display { font: 400 clamp(28px, 4.6vw, 40px)/1.15 var(--serif); letter-spacing: -0.015em; margin: 0 0 30px; max-width: 18em; }
.display .word { font-size: 0.92em; }
.display-sm { font: 400 25px/1.2 var(--serif); margin: 0 0 10px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 64px 1fr; padding: 18px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n { font-size: 22px; color: var(--accent); line-height: 1.2; }
.steps h3 { font: 600 17px/1.3 var(--sans); margin: 0 0 3px; }
.steps p, .two p:not(.tag) { color: var(--mid); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 40px; }
.three h3 { font: 600 17px/1.3 var(--sans); margin: 0 0 6px; }
.three p:not(.tag) { color: var(--mid); font-size: 15.5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.tag { color: var(--accent); margin-bottom: 10px; }
.body { color: var(--mid); max-width: 38em; margin-bottom: 16px; font-size: 17px; }
.body + .btn { margin-top: 14px; text-transform: none; letter-spacing: 0.02em; }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  border-top: 1.5px solid var(--ink); padding: 22px 0 44px; font-size: 13.5px; color: var(--mid);
}
footer .links { display: flex; gap: 18px; }

@media (max-width: 680px) {
  .hero { padding: 40px 0 44px; }
  .stage { grid-template-columns: minmax(0, 1fr); height: auto; gap: 6px; padding: 14px; }
  .queue { height: 150px; overflow: hidden; }
  .out { height: 176px; overflow: hidden; }
  .col-head { display: block; }
  .agent { flex-direction: row; padding: 4px 0 12px; justify-content: flex-start; }
  .bot-lg { width: 56px; height: 56px; }
  .two, .three { grid-template-columns: 1fr; gap: 30px; }
  .steps li { grid-template-columns: 46px 1fr; }
  .sec { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Legal page */
.legal { max-width: 640px; padding-bottom: 60px; }
.legal h1 { font-size: 34px; margin: 44px 0 16px; }
.legal h2 { font: 600 17px var(--sans); margin: 28px 0 6px; }
.legal p { margin-bottom: 12px; color: var(--mid); }
.todo { background: #ffd84a; color: #17150f; padding: 0 4px; }

/* The agent icon is always solid ink */
.bot-sm, .bot-lg { color: var(--ink); }


/* ---- Wider layout ---- */
body { overflow-x: clip; }
.wrap { max-width: 1240px; padding: 0 32px; }
h1 { font-size: clamp(38px, 7.2vw, 92px); }
.lede { font-size: clamp(18px, 1.5vw, 21px); }

/* Full-width band of request types */
.marquee {
  margin-top: 56px; padding: 15px 0; overflow: hidden; white-space: nowrap;
  background: var(--ink); color: var(--paper);
  width: 100vw; margin-left: calc(50% - 50vw);
  font-size: 20px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.marquee .track { display: inline-flex; align-items: center; animation: scroll 60s linear infinite; }
.marquee span { padding: 0 22px; }
.marquee i { width: 9px; height: 9px; background: var(--accent); flex: none; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee + .sec { border-top: 0; margin-top: 0; }

/* Full-width dark closing band */
.sec.dark {
  background: var(--ink); color: var(--paper); border-top: 0;
  box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax);
  padding: 84px 0 92px;
}
.sec.dark .eyebrow { color: rgba(239, 235, 226, 0.5); }
.sec.dark .body { color: rgba(239, 235, 226, 0.72); }
.sec.dark .display { font-size: clamp(30px, 5vw, 60px); max-width: 16em; }
.sec.dark .btn { background: var(--paper); color: var(--ink); }
.sec.dark + footer { border-top: 0; }

@media (min-width: 1000px) {
  .hero { padding: 84px 0 68px; }
  .stage { grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); gap: 28px; padding: 28px; height: 372px; }
  .tk, .dr { font-size: 16px; padding: 13px 16px; margin-bottom: 12px; }
  .bot-lg { width: 150px; height: 150px; }
  .agent { padding-top: 42px; }
  .status { font-size: 16px; }

  /* Section label in a left column, content beside it */
  .sec { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 40px; padding: 84px 0; }
  .sec > * { grid-column: 2; }
  .sec > .eyebrow { grid-column: 1; grid-row: 1 / span 8; margin: 8px 0 0; }
  .display { font-size: clamp(34px, 3.6vw, 50px); }
  .def { font-size: 24px; }
  .three { gap: 44px; }
  .two { gap: 64px; }
  .sec.dark .btn { justify-self: start; }
}
