/* Katcha demo: the same palette, fonts and shapes as katcha.eu. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
}

:root {
  --black: #0d0a0b;
  --charcoal: #454955;
  --lavender: #f3eff5;
  --green: #72b01d;
  --surface-2: color-mix(in srgb, var(--charcoal) 7%, var(--lavender));
  --line: rgb(69 73 85 / 18%);
  --accent-tint-2: color-mix(in srgb, var(--green) 28%, var(--lavender));
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Figtree', sans-serif;
  --page: min(1120px, calc(100% - 40px));
}

* { box-sizing: border-box; }

/* Respect the `hidden` attribute (the Katcha widget injects a legacy
   type="text" hidden token field that author styles would otherwise show). */
[hidden] { display: none !important; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--lavender);
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.5;
}

main { flex: 1; }

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

a { color: var(--black); text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

code {
  padding: .1rem .4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--lavender);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  overflow-wrap: anywhere;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: var(--black); }
.btn-ghost { border-color: var(--line); background: var(--lavender); color: var(--black); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Header: the floating pill from katcha.eu ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 20px 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--lavender);
  box-shadow: 0 1px 2px rgb(13 10 11 / 6%), 0 16px 36px -22px rgb(13 10 11 / 35%);
}

.brand { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; text-decoration: none; }
.brand img { display: block; width: 104px; height: auto; }

.brand-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-tint-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 2px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.nav-link:hover, .nav-link.active { background: var(--surface-2); color: var(--black); }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-tint-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lead { margin: 0; color: var(--charcoal); font-size: clamp(1.02rem, 1.5vw, 1.18rem); line-height: 1.6; }

/* ---------- Home ---------- */
.hero {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 80px);
  text-align: center;
}

/* Lime text fails contrast on lavender, so the accent word sits on a lime marker instead. */
.accent {
  padding: 0 .12em;
  border-radius: .2em;
  background: var(--green);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }

.demos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: var(--page);
  margin: 0 auto;
}

.demo-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-2);
  color: var(--black);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}

.demo-card:hover { transform: translateY(-3px); border-color: var(--green); }
.demo-card p { margin: 0; color: var(--charcoal); line-height: 1.6; }
.demo-card h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }

.demo-link { margin-top: 4px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.demo-art {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 8;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 20px;
  background: var(--lavender);
}

.mock-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(300px, 78%);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.mock-box {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  animation: box 3.2s ease-in-out infinite;
}

.mock-box svg { width: 20px; fill: none; stroke: var(--black); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: tick 3.2s ease-in-out infinite; }
.mock-label { flex: 1; height: 10px; border-radius: 99px; background: var(--line); }
.mock-logo { width: 26px; height: 26px; }

@keyframes box {
  0%, 30% { background: transparent; border-color: var(--charcoal); }
  40%, 85% { background: var(--green); border-color: var(--green); }
  100% { background: transparent; border-color: var(--charcoal); }
}

@keyframes tick {
  0%, 35% { stroke-dashoffset: 24; }
  50%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 24; }
}

.mock-form {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(300px, 78%);
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.mock-field { height: 12px; border-radius: 99px; background: var(--line); }
.mock-field.short { width: 60%; }
.mock-send { width: 40%; height: 22px; margin-top: 4px; border-radius: 99px; background: var(--green); }

.mock-scan {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent-tint-2), transparent);
  animation: scan 2.8s ease-in-out infinite;
}

@keyframes scan {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

.how {
  display: grid;
  gap: 22px;
  width: var(--page);
  margin: 0 auto;
  padding-top: clamp(56px, 8vw, 96px);
}

.how h2 { text-align: center; }
.more { margin: 0; color: var(--charcoal); text-align: center; }

.how .outcomes, .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how .outcomes li, .steps li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-2);
}

.steps { counter-reset: step; }
.steps li { color: var(--charcoal); line-height: 1.6; counter-increment: step; }

.steps li::before {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--black);
  content: counter(step);
  font-weight: 800;
}

.steps strong { display: block; margin-bottom: 4px; color: var(--black); font-size: 1.05rem; }

/* The three outcomes, used on every page. */
.outcomes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.outcomes li { display: flex; align-items: flex-start; gap: 12px; color: var(--charcoal); line-height: 1.55; }
.outcomes strong { display: block; color: var(--black); }
.dot { flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; }
.dot.pass { background: var(--green); }
.dot.puzzle { border: 3px solid var(--green); }
.dot.block { background: var(--black); }

/* ---------- Form pages ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  align-items: start;
  gap: clamp(32px, 6vw, 88px);
  width: var(--page);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0 0;
}

.split-text { display: grid; justify-items: start; gap: 20px; }
.split-text h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.split-text .outcomes { width: 100%; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dev-note { margin: 0; color: var(--charcoal); font-size: .92rem; line-height: 1.6; }

.form-card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-2);
}

.form-note { margin: 18px 0 0; color: var(--charcoal); font-size: .88rem; text-align: center; }

label { display: block; margin: 0 0 .45rem; font-size: .92rem; font-weight: 700; }

input {
  display: block;
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--lavender);
  color: var(--black);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder { color: color-mix(in srgb, var(--charcoal) 70%, var(--lavender)); }
input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--accent-tint-2); }

.katcha { margin-top: 1.25rem; }

button {
  width: 100%;
  margin-top: 1.25rem;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--black);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}

button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .5; }

.status { min-height: 1.3em; margin: .9rem 0 0; color: var(--charcoal); font-size: .9rem; }

/* ---------- Result pages ---------- */
.result {
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0 0;
}

.result .form-card { display: grid; justify-items: start; gap: 16px; }
.result h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

.banner {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  line-height: 1.5;
}

.banner .icon { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 50%; }
.banner .icon svg { width: 18px; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.banner.ok { background: var(--accent-tint-2); }
.banner.ok .icon { background: var(--green); }
.banner.ok .icon svg { stroke: var(--black); }
.banner.fail { border: 1px solid var(--line); background: var(--lavender); }
.banner.fail .icon { background: var(--black); }
.banner.fail .icon svg { stroke: var(--lavender); }
.banner p { margin: 0; }
.banner p > strong:first-child { display: block; margin-bottom: .15rem; }

.back { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: var(--page);
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--charcoal);
  font-size: 14px;
}

.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--charcoal); font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: var(--black); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .how .outcomes, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-pill { flex-wrap: wrap; justify-content: center; border-radius: 26px; }
  .nav-links { order: 3; flex-wrap: wrap; width: 100%; justify-content: center; }
  .nav-link { padding: 7px 10px; font-size: 13px; }
  .demos { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mock-box { border-color: var(--green); background: var(--green); }
  .mock-box svg { stroke-dashoffset: 0; }
}
