/* qwai.io. Built from the logo: one hot pink, paper white, near black, and
   hard squares. Nothing is rounded. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk-500.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
:root { --paper: #f5f4f1; --panel: #ffffff; --ink: #0b0b0e; --muted: #55575f; --line: #d9d7d2; --brand: #ff2d55; --night: #0b0b0e; --night-panel: #15151a; --night-line: #2a2a31; --night-muted: #a3a5ae; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 19px/1.55 "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.02; font-weight: 700; }
h1 { font-size: clamp(46px, 7.4vw, 112px); }
h2 { font-size: clamp(34px, 4.6vw, 64px); }
h3 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 16px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.top { position: sticky; top: 0; z-index: 10; background: var(--night); color: #fff; border-bottom: 1px solid var(--night-line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 40px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; letter-spacing: -0.04em; text-decoration: none; }
.brand img { display: block; }
nav { display: flex; flex-wrap: wrap; gap: 4px 30px; flex: 1; }
nav a { text-decoration: none; font-weight: 600; padding: 14px 0; color: var(--night-muted); border-bottom: 3px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: #fff; }
nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; font: inherit; font-weight: 700; text-decoration: none; background: var(--brand); color: #fff; border: 2px solid var(--brand); position: relative; overflow: hidden; transition: transform 0.12s ease; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.3) 50%, transparent 65%); transform: translateX(-120%); transition: transform 0.6s ease; }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(1px); }
.btn.line { background: transparent; border-color: currentColor; color: inherit; }
.top .btn { min-height: 48px; padding: 0 22px; }

.hero { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; padding-top: 110px; padding-bottom: 90px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { max-width: 720px; margin: 30px 0 38px; font-size: 23px; color: #d6d6dc; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.page-head .wrap { padding-top: 84px; padding-bottom: 70px; }
.page-head h1 { font-size: clamp(42px, 6vw, 88px); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--night-line); background: var(--night); color: #fff; }
.stats div { padding: 26px 22px; border-right: 1px solid var(--night-line); min-width: 0; }
.stats div:last-child { border-right: 0; }
.stats b { display: block; white-space: nowrap; font-size: clamp(20px, 2.1vw, 34px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--night-muted); }

section { padding: 104px 0; }
section.night { background: var(--night); color: #fff; }
section.pink { background: var(--brand); color: #fff; }
.lead { max-width: 820px; margin-top: 26px; font-size: 22px; color: var(--muted); }
.night .lead { color: #c9c9d1; }
.pink .lead { color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 0; margin-top: 56px; border: 2px solid var(--ink); background: var(--ink); gap: 2px; }
.cards > * { background: var(--panel); padding: 34px 32px 38px; }
.cards h3 { margin-bottom: 14px; }
.cards p { color: var(--muted); }
.night .cards { border-color: var(--night-line); background: var(--night-line); }
.night .cards > * { background: var(--night-panel); }
.night .cards p { color: var(--night-muted); }
.num { font-size: clamp(50px, 6vw, 92px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.num { white-space: nowrap; }
.num small { font-size: 0.3em; letter-spacing: -0.01em; font-weight: 600; margin-left: 8px; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 60px; }
.figures p { margin-top: 12px; color: var(--muted); }
.night .figures p { color: var(--night-muted); }
.tag { display: inline-block; padding: 4px 12px; border: 2px solid currentColor; font-weight: 700; font-size: 16px; letter-spacing: 0.02em; margin-bottom: 26px; }
.pink .tag, .night .tag { color: #fff; }
.tag.brand { color: var(--brand); }

/* Two keys diagram */
.keys { display: grid; gap: 2px; background: var(--ink); border: 2px solid var(--ink); }
.keys div { background: var(--panel); padding: 24px 26px; display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: center; }
.keys i { width: 56px; height: 56px; border: 10px solid var(--brand); display: block; }
.keys div:nth-child(2) i { border-color: var(--ink); }
.keys div:nth-child(3) { background: var(--ink); color: #fff; }
.keys div:nth-child(3) i { border: 0; background: var(--brand); }
.keys b { display: block; font-size: 21px; }
.keys span { color: var(--muted); }
.keys div:nth-child(3) span { color: #c9c9d1; }

table { width: 100%; border-collapse: collapse; margin-top: 50px; font-size: 18px; }
th, td { text-align: left; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
.night th, .night td { border-color: var(--night-line); }
.night th { color: var(--night-muted); }
td.yes { font-weight: 700; }
td.no { color: var(--brand); font-weight: 700; }
tr.us td { background: var(--ink); color: #fff; padding-left: 20px; }
tr.us td.yes { color: #fff; }
.scroll { overflow-x: auto; }

.eco { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-top: 40px; }
.app { display: flex; flex-direction: column; background: var(--panel); border: 2px solid var(--ink); padding: 30px; text-decoration: none; min-height: 300px; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.app:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--brand); }
.app .mark { width: 64px; height: 64px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 30px; margin-bottom: 26px; }
.app .mark.p { background: var(--brand); }
.app h3 { font-size: 30px; }
.app .kind { color: var(--muted); font-weight: 600; margin: 6px 0 16px; }
.app p { color: var(--muted); }
.app .go { margin-top: auto; padding-top: 24px; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters button { font: inherit; font-weight: 700; min-height: 50px; padding: 0 22px; background: transparent; border: 2px solid var(--ink); color: var(--ink); cursor: pointer; }
.filters button.on { background: var(--ink); color: #fff; }

pre { margin: 0; padding: 26px 28px; background: var(--night); color: #f1f1f4; overflow-x: auto; font: 500 16px/1.6 "JetBrains Mono", ui-monospace, Menlo, monospace; border-left: 6px solid var(--brand); }
.night pre { background: var(--night-panel); }
.steps { counter-reset: step; display: grid; gap: 2px; background: var(--ink); border: 2px solid var(--ink); margin-top: 44px; }
.steps > div { counter-increment: step; background: var(--panel); padding: 28px 30px 28px 104px; position: relative; }
.steps > div::before { content: counter(step); position: absolute; left: 30px; top: 22px; font-size: 44px; font-weight: 700; color: var(--brand); letter-spacing: -0.04em; }
.steps p { color: var(--muted); margin-top: 6px; }
.list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.list li { padding-left: 34px; position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px; border: 4px solid var(--brand); }

footer { background: var(--night); color: var(--night-muted); padding: 70px 0 60px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
footer b { display: block; color: #fff; margin-bottom: 14px; }
footer a { display: block; text-decoration: none; padding: 6px 0; }
footer a:hover { color: #fff; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 900px) {
  section { padding: 72px 0; }
  .split, .figures { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div { border-bottom: 1px solid var(--night-line); }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  .hero .wrap { padding-top: 70px; padding-bottom: 60px; }
}
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .btn::after { display: none; } }
