/* ============ tokens ============ */
:root{
  --paper:#FFF7EE; --ink:#1D2B53; --accent:#FFA300;
  --hot:#FF004D;   --shade:#FFE8C8; --white:#FFFFFF;
  --col:680px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font:400 17px/1.55 'Space Grotesk',ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
svg{display:block}
a{color:inherit}
:focus-visible{outline:3px solid var(--hot);outline-offset:2px;border-radius:4px}

/* ============ primitives ============ */
.wrap{width:100%;max-width:var(--col);margin-inline:auto;padding-inline:20px}
.px{font-family:'Silkscreen',ui-monospace,monospace;letter-spacing:.03em;font-weight:400}
.stack{display:flex;flex-direction:column;gap:14px}
.card{background:var(--white);border:2px solid var(--ink);border-radius:14px;padding:16px;box-shadow:5px 5px 0 var(--ink)}
.press{transition:transform .08s ease,box-shadow .08s ease}
.press:hover,.press:focus-visible,.press:active{transform:translate(2px,2px);box-shadow:3px 3px 0 var(--ink)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font:inherit;font-weight:700;font-size:15px;line-height:1.2;color:var(--ink);background:var(--accent);
  border:2px solid var(--ink);border-radius:10px;padding:10px 16px;
  cursor:pointer;text-decoration:none;white-space:nowrap;
  box-shadow:3px 3px 0 var(--ink);transition:transform .07s ease,box-shadow .07s ease;
}
.btn:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--ink)}
.btn--sm{font-size:13px;padding:7px 11px;box-shadow:2px 2px 0 var(--ink)}
.btn--sm:active{transform:translate(2px,2px)}
.btn--big{font-size:17px;padding:13px 22px;box-shadow:5px 5px 0 var(--ink)}
.btn--big:active{transform:translate(5px,5px)}
.btn--ghost{background:var(--white);font-weight:500}

/* ============ mascot ============ */
.bot{width:32px;height:32px;flex:none;shape-rendering:crispEdges;fill:var(--bot-body,#1D2B53)}
.bot .eye{fill:var(--bot-eye,#FFA300)}
@keyframes blink{0%,95.5%,100%{transform:scaleY(1)}96.5%,98.5%{transform:scaleY(.12)}}
.bot--live .eye{transform-box:fill-box;transform-origin:center;animation:blink 8s steps(1,end) infinite}

/* ============ header ============ */
.site-head{position:sticky;top:0;z-index:30;background:var(--paper);border-bottom:2px solid var(--ink)}
.site-head__in{display:flex;align-items:center;gap:8px;padding:9px 20px;max-width:var(--col);margin-inline:auto}
.logo{display:flex;align-items:center;gap:9px;margin-right:auto;text-decoration:none;font-family:'Silkscreen',monospace;font-size:15px;line-height:1}
.logo .bot{width:28px;height:28px}
.logo .amp{color:var(--hot)}

.lang{display:flex;border:2px solid var(--ink);border-radius:8px;overflow:hidden}
.lang button{
  font-family:'Silkscreen',monospace;font-size:10px;line-height:1;
  padding:8px 6px;background:var(--white);color:var(--ink);
  border:0;border-left:2px solid var(--ink);cursor:pointer;
}
.lang button:first-child{border-left:0}
.lang button[aria-pressed="true"]{background:var(--accent);font-weight:700}

/* ============ sections ============ */
main section{padding:44px 0 8px}
h1{font:inherit;font-weight:700;font-size:clamp(30px,7.5vw,46px);line-height:1.1;letter-spacing:-.02em;margin:0 0 14px}
.hl{background:var(--shade);box-decoration-break:clone;-webkit-box-decoration-break:clone;padding:0 4px}
h2{font:inherit;font-weight:700;font-size:clamp(23px,5.5vw,30px);line-height:1.15;letter-spacing:-.015em;margin:0 0 6px}
h3{font:inherit;font-weight:700;font-size:18px;line-height:1.25;margin:0}
.lead{font-size:17.5px;margin:0 0 22px;max-width:38em}
.sub{margin:0 0 20px;font-size:16px;opacity:.75}
.rule{border:0;border-top:2px solid var(--shade);margin:38px 0 0}

/* ============ chat ============ */
#bot{scroll-margin-top:70px}
.chat{background:var(--white);border:2px solid var(--ink);border-radius:14px;box-shadow:5px 5px 0 var(--ink);overflow:hidden}
.chat__head{
  display:flex;align-items:center;gap:9px;background:var(--ink);color:var(--paper);
  padding:9px 12px;font-family:'Silkscreen',monospace;font-size:12px;
  --bot-body:#FFF7EE;--bot-mouth:#1D2B53;
}
.chat__head .bot{width:20px;height:20px}
.chat__led{width:8px;height:8px;background:var(--accent);margin-left:auto;flex:none}
.chat__log{display:flex;flex-direction:column;gap:10px;padding:14px;max-height:min(58vh,360px);overflow-y:auto;overscroll-behavior:contain}
.chat__ctrl{display:flex;flex-direction:column;gap:8px;padding:4px 14px 14px}

.msg{max-width:88%;padding:9px 12px;border:2px solid var(--ink);border-radius:12px;font-size:15.5px;line-height:1.45}
.msg--bot{align-self:flex-start;background:var(--shade);border-bottom-left-radius:4px}
.msg--me{align-self:flex-end;background:var(--accent);border-bottom-right-radius:4px;font-weight:500}
.sig{display:inline-flex;align-items:center;gap:6px;font-weight:500;white-space:nowrap}
.sig .bot{width:18px;height:18px}

.typing{display:flex;gap:5px;align-items:center;padding:12px}
.typing i{width:7px;height:7px;background:var(--ink);border-radius:2px;animation:blip 1.1s infinite}
.typing i:nth-child(2){animation-delay:.16s}
.typing i:nth-child(3){animation-delay:.32s}
@keyframes blip{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}

.opt{
  text-align:left;font:inherit;font-weight:500;font-size:15px;line-height:1.3;color:var(--ink);background:var(--white);
  border:2px solid var(--ink);border-radius:10px;padding:10px 12px;cursor:pointer;
  box-shadow:3px 3px 0 var(--ink);transition:transform .07s ease,box-shadow .07s ease,background .12s ease;
}
.opt:hover{background:var(--shade)}
.opt:active{transform:translate(3px,3px);box-shadow:0 0 0 var(--ink)}
.field{display:flex;gap:8px}
.field input{
  flex:1 1 auto;min-width:0;font:inherit;font-size:16px;color:var(--ink);background:var(--white);
  border:2px solid var(--ink);border-radius:10px;padding:10px 12px;
}
.field input::placeholder{color:var(--ink);opacity:.45}
.fine{font-size:12.5px;line-height:1.45;opacity:.7;margin:2px 0 0}

/* ============ cases ============ */
.case{display:block;text-decoration:none}
.case p{margin:0;font-size:15.5px}
.case h3{margin-bottom:6px}
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}
.tag{font-family:'Silkscreen',monospace;font-size:10px;line-height:1;padding:4px 7px;border:2px solid var(--ink);border-radius:6px;background:var(--shade)}
.case__go{display:inline-block;margin-top:10px;font-size:13px;font-weight:700;border-bottom:2px solid var(--accent)}

/* ============ process ============ */
.step{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:start}
.step__num{font-family:'Silkscreen',monospace;font-size:15px;line-height:1;padding:8px 8px 7px;border:2px solid var(--ink);border-radius:8px;background:var(--shade)}
.step__head{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:6px}
.step p{margin:0;font-size:15.5px}
.step--hl{background:var(--shade)}
.step--hl .step__num{background:var(--accent)}
.badge{font-family:'Silkscreen',monospace;font-size:10px;line-height:1;background:var(--hot);color:#fff;border:2px solid var(--ink);border-radius:6px;padding:5px 7px}

/* ============ about ============ */
.about{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:start}
.about__face{width:76px;height:76px;flex:none;shape-rendering:crispEdges;border:2px solid var(--ink);border-radius:10px;background:var(--shade)}
.about p{margin:0;font-size:16px}

/* ============ footer ============ */
.site-foot{border-top:2px solid var(--ink);margin-top:44px;padding:36px 0 30px}
.cta{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;background:var(--shade);padding:24px 20px}
.cta .bot{width:56px;height:56px}
.cta h2{margin:0}
.colophon{margin-top:26px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.colophon .px{font-size:11px;opacity:.8}
.colophon a{font-size:13px;opacity:.8}
@media (min-width:560px){.colophon{flex-direction:row;justify-content:space-between;align-items:center}}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .bot--live .eye{animation:none}
  .typing i{animation:none;opacity:.55}
  *{transition-duration:.001s !important}
}

/* ---- tagline under the H1 block ---- */
.tagline{margin:0 0 10px;font-size:15px;font-weight:500;opacity:.75}
/* ---- portfolio page ---- */
.back{display:inline-block;margin-bottom:18px;font-size:14px;font-weight:500;text-decoration:none;border-bottom:2px solid var(--accent)}
.work-foot{margin-top:38px}

/* ---- honeypot: off-screen for people, plain input for bots ---- */
.trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none}
