/* Quowl — showcase site */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --night: #1e2140;
  --dusk: #3b3f6b;
  --dusk-soft: #8c90bd;
  --mist: #f4f5f9;
  --paper: #ffffff;
  --amber: #f0a732;
  --amber-deep: #c97f0c;
  --leaf: #2f7a5f;
  --ink: #1e2140;
  --muted: #545977;
  --line: #dcdeea;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; max-width: 22ch; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 0.18em; }
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: rgba(30, 33, 64, 0.07);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--amber);
  color: var(--night);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-small { padding: 0.5rem 1rem; font-size: 0.95rem; }
.btn-amber { background: var(--amber); color: var(--night); }
.btn-amber:hover { background: #f6bb5c; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: #fff; }
.btn-night { background: var(--night); color: #fff; }
.btn-night:hover { background: var(--dusk); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--night);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.brand img { background: #fff; border-radius: 50%; padding: 3px; }
.site-header nav { margin-left: auto; }
.nav-list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
}
.nav-list a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 760px) {
  .site-header nav { display: none; }
  .header-inner > .btn { margin-left: auto; }
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 82% 30%, rgba(240, 167, 50, 0.16), transparent 42%),
    var(--night);
  color: #fff;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13ch;
  margin-bottom: 0.45em;
}
.lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.6rem;
}
.dot {
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(240, 167, 50, 0.2);
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Demo stage */
.demo-stage {
  position: relative;
  min-height: 560px;
  padding: 0 0 2.5rem;
}
.browser {
  position: absolute;
  inset: 0 3.5rem 4.5rem 0;
  background: #e9ebf4;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: #d9dcea;
}
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #b7bbd2; }
.browser-bar i {
  font-style: normal;
  font-size: 0.78rem;
  color: #6b7091;
  margin-left: 0.8rem;
  background: #eef0f7;
  padding: 0.1rem 0.8rem;
  border-radius: 6px;
}
.browser-page { padding: 1.6rem; }
.sk { height: 10px; border-radius: 6px; background: #d2d5e4; margin-bottom: 0.7rem; }
.sk-title { height: 22px; width: 55%; background: #c3c7dc; margin-bottom: 1.1rem; }
.sk-short { width: 70%; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-top: 1.6rem; }
.sk-grid div { aspect-ratio: 1; border-radius: 10px; background: #d9dcea; }

.qw-panel {
  position: absolute;
  right: 0;
  bottom: 6.25rem;
  width: min(370px, 100%);
  height: 470px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 24px 50px -12px rgba(8, 10, 30, 0.55), 0 0 0 1px rgba(30, 33, 64, 0.08);
  overflow: hidden;
  transform-origin: bottom right;
  animation: panel-open 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.35s both;
}
@keyframes panel-open {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.qw-launcher {
  position: absolute;
  right: 0;
  bottom: 2.5rem;
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  border: 0;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -8px rgba(8, 10, 30, 0.6), 0 0 0 3px var(--amber);
  pointer-events: none;
}
.demo-note {
  position: absolute;
  left: 0; bottom: 0;
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: calc(100% - 5rem);
}

.qw-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--night);
  color: #fff;
}
.qw-head img { background: #fff; border-radius: 50%; padding: 2px; }
.qw-head strong { display: block; font-family: var(--display); font-size: 1.05rem; line-height: 1.1; }
.qw-head span { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }
.qw-reset {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.8;
}
.qw-reset:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }

.qw-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f7f8fb;
  font-size: 0.95rem;
  line-height: 1.45;
}
.bubble {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
}
.bubble p { margin: 0 0 0.4em; }
.bubble p:last-child { margin: 0; }
.bubble-sys { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble-user { background: var(--amber); color: var(--night); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-answer { background: #eef6f2; border: 1px solid #cfe5da; }
.bubble-answer strong { display: block; font-family: var(--display); margin-bottom: 0.25rem; }

.qw-choices { display: flex; flex-direction: column; gap: 0.4rem; align-self: stretch; }
.qw-choice {
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}
.qw-choice:hover { border-color: var(--dusk-soft); }
.qw-choice[aria-pressed="true"] { border-color: var(--leaf); background: #eef6f2; }
.qw-escalate {
  align-self: flex-start;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  background: transparent;
  color: var(--dusk);
  border: 0;
  padding: 0.2rem 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.qw-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-self: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  font-size: 0.9rem;
}
.qw-form label { font-weight: 700; }
.qw-form input[type="email"] {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid #c5c8da;
  border-radius: 8px;
}
.qw-consent { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400 !important; }
.qw-consent input { margin-top: 0.25rem; accent-color: var(--night); }
.qw-error { color: #a3262a; margin: 0; font-size: 0.85rem; }
.qw-form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.qw-btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--night);
  background: var(--night);
  color: #fff;
  cursor: pointer;
}
.qw-btn-plain { background: transparent; color: var(--night); }

.qw-ask {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.qw-ask input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #c5c8da;
  border-radius: 999px;
}
.qw-ask input:focus-visible { outline-offset: 0; }
.qw-send {
  flex: none;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  border: 0;
  background: var(--night);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

@media (max-width: 520px) {
  .browser { inset: 0 0 4.5rem 0; }
  .qw-panel { position: relative; bottom: auto; margin: 2.5rem 0 0 auto; width: calc(100% - 1rem); }
  .demo-stage { min-height: 0; padding-bottom: 6.5rem; }
  .qw-launcher { bottom: 3rem; }
  .demo-note { max-width: calc(100% - 4.5rem); }
}

/* Sections */
.section { padding: var(--section-y) 0; }
.section-paper { background: var(--paper); }
.section-night { background: var(--night); color: #fff; }
.section-intro {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 44rem;
  margin-bottom: 3rem;
}
.section-night .section-intro { color: rgba(255, 255, 255, 0.78); }

/* Steps: a real sequence */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.steps li { counter-increment: step; position: relative; padding-top: 4.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 3rem; height: 3rem;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  border-radius: 50%;
  background: var(--night);
  color: var(--amber);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: 3.75rem;
  right: -1.25rem;
  border-top: 2px dashed #c3c7dc;
}
.steps p { color: var(--muted); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* Features */
.feature-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.feature-col h3 {
  padding-bottom: 0.7rem;
  border-bottom: 3px solid var(--night);
}
.feature-col ul { list-style: none; margin: 0; padding: 0; }
.feature-col li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}
.feature-col li strong { display: block; color: var(--ink); }
@media (max-width: 900px) {
  .feature-cols { grid-template-columns: 1fr; }
}

/* Rules */
.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.rules-grid p { max-width: 36rem; }
.note {
  border-left: 3px solid var(--amber);
  padding-left: 1rem;
  color: var(--muted);
}
.rules-card {
  margin: 0;
  background: var(--paper);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(30, 33, 64, 0.35);
}
.rules-card figcaption {
  font-family: var(--display);
  font-weight: 700;
  margin-bottom: 1rem;
}
.rule-list { list-style: none; counter-reset: rule; margin: 0; padding: 0; }
.rule-list li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: #fbfbfd;
}
.rule-list li::before {
  content: counter(rule);
  font-family: var(--display);
  font-weight: 800;
  color: var(--dusk-soft);
  text-align: center;
}
.rule-list .rule-default { border-style: dashed; background: transparent; }
.rule-list .rule-default::before { content: "∞"; }
.rule-who em { font-style: normal; font-weight: 700; }
.rule-who small { display: block; color: var(--muted); font-size: 0.82rem; }
.mode {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.mode-ai { background: var(--night); color: var(--amber); }
.mode-static { background: #e6f1ec; color: var(--leaf); }
.mode-hidden { background: #eceef5; color: var(--muted); }
@media (max-width: 900px) {
  .rules-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .rule-list li { grid-template-columns: 1.5rem 1fr; }
  .mode { grid-column: 2; justify-self: start; }
}

/* AI roadmap */
.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.stage {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 1.75rem;
}
.stage p, .stage li { color: rgba(255, 255, 255, 0.8); }
.stage ul { margin: 0; padding-left: 1.2rem; }
.stage li { margin-bottom: 0.45rem; }
.stage-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 4rem);
  background: linear-gradient(135deg, rgba(240, 167, 50, 0.12), rgba(240, 167, 50, 0.02));
  border-color: rgba(240, 167, 50, 0.4);
}
.stage-wide { align-items: start; }
.stage-wide h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.guardrails {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
}
.guardrails ul { list-style: none; padding: 0; }
.guardrails li { padding-left: 1.6rem; position: relative; }
.guardrails li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 0.8rem; height: 0.8rem;
  border-radius: 3px;
  border: 2px solid var(--amber);
}
.guardrails strong { color: #fff; }
.stage-status {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.status-now { background: var(--amber); color: var(--night); }
.status-next { border: 1px solid var(--amber); color: var(--amber); }
.status-later { border: 1px dashed var(--dusk-soft); color: #c9cbe6; }
.fine { margin-top: 1.5rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 860px) {
  .roadmap { grid-template-columns: 1fr; }
  .stage-wide { display: block; }
  .stage-wide .guardrails { margin-top: 1.25rem; }
}

/* Specs */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
  margin: 2.5rem 0 0;
}
.specs > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.specs dt { font-family: var(--display); font-weight: 700; }
.specs dd { margin: 0; color: var(--muted); }
@media (max-width: 760px) {
  .specs { grid-template-columns: 1fr; }
  .specs > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* Contact */
.contact { background: var(--amber); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.contact-inner { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.contact-inner img { flex: none; background: #fff; border-radius: 50%; padding: 8px; }
.contact h2 { margin-bottom: 0.35em; }
.contact p { font-size: 1.15rem; max-width: 36rem; }
@media (max-width: 600px) {
  .contact-inner { flex-direction: column; align-items: flex-start; }
}

/* Footer */
.site-footer { background: var(--night); color: rgba(255, 255, 255, 0.7); padding: 2rem 0; font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.footer-inner p { margin: 0; }
.site-footer a { color: #fff; }
