@font-face {
  font-family: "Jakarta";
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy: #1F2A6B;
  --ink: #161A33;
  --muted: #5B6078;
  --line: #DDE0EA;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --ok: #0F7F4A;
  --warn: #A15C00;
  --accent: var(--navy);
  --bar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Jakarta", -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 4px; cursor: pointer; text-align: left;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 16px; color: var(--navy); }
.brand small { font-size: 12px; color: var(--muted); }
.sync {
  margin-left: auto; font-size: 13px; color: var(--muted);
  padding: 6px 10px; border-radius: 999px; background: var(--bg); white-space: nowrap;
}
.sync.ok { color: var(--ok); }
.sync.wait { color: var(--warn); background: #FFF4E0; }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; min-height: 48px;
  font-weight: 700; font-size: 16px; cursor: pointer;
  background: var(--accent); color: #fff;
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-capture { background: var(--navy); }
.link { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

main { outline: none; }

/* ---------- Home ---------- */
.home { padding: 24px 16px calc(32px + var(--safe-b)); max-width: 1100px; margin: 0 auto; }
.home h1 { font-size: clamp(24px, 4vw, 38px); margin: 8px 0 4px; color: var(--navy); letter-spacing: -0.01em; }
.home p.intro { margin: 0 0 20px; color: var(--muted); font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 190px; padding: 20px; border: 0; border-radius: 20px; text-align: left; cursor: pointer;
  background: var(--c); color: #fff; overflow: hidden;
  box-shadow: 0 6px 20px rgba(22, 26, 51, .12);
}
.tile::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px;
  background: url("img/mark.png") center / contain no-repeat; opacity: .16;
}
.tile .name { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
.tile .name img { width: 32px; height: 32px; background: #fff; border-radius: 50%; padding: 3px; }
.tile .line { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 18px 0 14px; max-width: 26ch; }
.tile .go { font-size: 14px; font-weight: 700; opacity: .9; }
.umbrella {
  margin-top: 24px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}
.umbrella strong { color: var(--navy); }

/* ---------- Deck ---------- */
.deck {
  --c: var(--navy);
  position: relative; height: calc(100dvh - var(--bar-h) - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; overflow: hidden; background: #fff;
}
.track { flex: 1; display: flex; transition: transform .35s ease; touch-action: pan-y; }
.slide {
  flex: 0 0 100%; height: 100%; overflow-y: auto;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 5vw, 72px) 24px;
  display: flex; flex-direction: column; justify-content: center;
}
.slide h2 { font-size: clamp(26px, 4.6vw, 52px); line-height: 1.1; margin: 0 0 16px; color: var(--c); letter-spacing: -0.015em; }
.slide .sub { font-size: clamp(17px, 2.2vw, 24px); color: var(--muted); max-width: 40ch; margin: 0; line-height: 1.4; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--c); font-size: 18px; margin-bottom: 18px; }
.kicker img { width: 36px; height: 36px; }
.s-title { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000)); }
.s-title h2, .s-title .sub, .s-title .kicker { color: #fff; }
.s-title .sub { opacity: .92; }
.s-title .kicker img { background: #fff; border-radius: 50%; padding: 3px; }

.problems { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; max-width: 760px; }
.problems li {
  font-size: clamp(17px, 2.2vw, 23px); line-height: 1.35; padding: 14px 18px 14px 52px; position: relative;
  background: var(--bg); border-radius: 14px;
}
.problems li::before {
  content: "!"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff;
  font-weight: 800; font-size: 15px; display: grid; place-items: center;
}
.points li::before { content: "✓"; }
.source { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Workflow diagram */
.flow { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.flow li {
  counter-increment: step; position: relative; background: var(--bg); border-radius: 16px;
  padding: 56px 14px 16px; text-align: center; border-top: 5px solid var(--c);
}
.flow li::before {
  content: counter(step); position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -12px; top: 28px; width: 10px; height: 10px;
  border-top: 3px solid var(--c); border-right: 3px solid var(--c); transform: rotate(45deg); z-index: 1;
}
.flow b { display: block; font-size: clamp(15px, 1.8vw, 19px); margin-bottom: 6px; }
.flow span { font-size: clamp(13px, 1.4vw, 15px); color: var(--muted); line-height: 1.35; }

/* Screenshot slide */
.s-shot { justify-content: flex-start; }
.s-shot h2 { font-size: clamp(22px, 3.4vw, 38px); margin-bottom: 8px; }
.s-shot .sub { margin-bottom: 14px; max-width: 60ch; }
.shot {
  flex: 1; min-height: 200px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--bg); overflow: hidden; border: 1px solid var(--line);
}
.shot img { max-height: 100%; width: auto; object-fit: contain; display: block; }
.shot.missing { border: 2px dashed color-mix(in srgb, var(--c) 45%, #fff); color: var(--muted); font-size: 15px; text-align: center; padding: 20px; }

/* Price slide */
.price { border-collapse: collapse; width: 100%; max-width: 820px; font-size: clamp(16px, 2vw, 21px); }
.price td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
.price td:first-child { font-weight: 700; }
.price td:nth-child(2) { color: var(--c); font-weight: 800; }
.note { color: var(--muted); font-size: 15px; margin: 14px 0 0; max-width: 70ch; }
.offer {
  margin-top: 16px; padding: 14px 18px; border-radius: 14px; font-weight: 700; font-size: 17px;
  background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); max-width: 820px;
}
.s-cta { align-items: flex-start; }
.s-cta .btn { margin-top: 24px; font-size: 20px; padding: 16px 28px; background: var(--c); }
.s-cta .site { margin-top: 18px; color: var(--muted); font-size: 16px; }

/* Deck controls */
.controls {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line); background: #fff;
}
.dots { display: flex; gap: 6px; margin: 0 auto; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--c); width: 22px; border-radius: 5px; }
.nav-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; }
.nav-btn:disabled { opacity: .3; }
.edge { position: absolute; top: 0; bottom: 70px; width: 14%; border: 0; background: transparent; cursor: pointer; z-index: 2; }
.edge.l { left: 0; } .edge.r { right: 0; }

/* ---------- Capture form ---------- */
.form-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px calc(40px + var(--safe-b)); }
.form-wrap h1 { color: var(--navy); font-size: 26px; margin: 6px 0 4px; }
.form-wrap .hint { color: var(--muted); margin: 0 0 18px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend, .lbl { font-weight: 700; margin-bottom: 8px; display: block; font-size: 15px; }
.req::after { content: " *"; color: #B3261E; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 20px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--navy) 30%, transparent); border-color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer;
}
.chip input:checked + span { background: var(--cc, var(--navy)); border-color: var(--cc, var(--navy)); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--navy) 40%, transparent); }
.keen-help { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.consent input { width: 26px; height: 26px; flex: 0 0 auto; margin: 0; accent-color: var(--navy); }
.err { color: #B3261E; font-weight: 600; margin: 0 0 14px; }
.actions { display: flex; gap: 12px; margin-top: 20px; }
.actions .btn { flex: 1; font-size: 18px; min-height: 56px; }
.privacy { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------- Leads (staff) ---------- */
.staff { max-width: 900px; margin: 0 auto; padding: 20px 16px 40px; }
.staff h1 { color: var(--navy); font-size: 24px; }
.staff .row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.lead { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.lead .top { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.lead .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.pill.sent { color: var(--ok); } .pill.waiting { color: var(--warn); background: #FFF4E0; }
.pin { max-width: 320px; margin: 60px auto; text-align: center; padding: 0 16px; }
.pin input { font-size: 28px; letter-spacing: .4em; text-align: center; width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }

/* ---------- Saved overlay, toast, banner ---------- */
.saved {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(246, 247, 251, .94);
  animation: fade .2s ease;
}
.saved div { text-align: center; color: var(--ok); font-size: 26px; font-weight: 800; }
.saved svg { width: 120px; height: 120px; display: block; margin: 0 auto 10px; }
.saved small { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 40; }
.banner { position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 35; background: var(--navy); color: #fff; border-radius: 14px; padding: 14px 16px; text-align: center; }

/* Attract mode: hide chrome */
body.attract .bar, body.attract .controls, body.attract .edge { display: none; }
body.attract .deck { height: 100dvh; }

/* ---------- Phone ---------- */
@media (max-width: 700px) {
  :root { --bar-h: 58px; }
  .brand small, .sync:empty { display: none; }
  .brand strong { font-size: 14px; }
  .btn-capture { padding: 10px 12px; font-size: 14px; min-height: 42px; }
  .sync { font-size: 12px; padding: 5px 8px; }
  .flow { grid-template-columns: 1fr; gap: 10px; }
  .flow li { padding: 12px 14px 12px 60px; text-align: left; border-top: 0; border-left: 5px solid var(--c); }
  .flow li::before { left: 14px; top: 50%; transform: translateY(-50%); }
  .flow li:not(:last-child)::after { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .tile { min-height: 150px; }
  .price td { padding: 10px 6px; font-size: 15px; }
  .edge { display: none; }
}

/* ---------- Print: one slide per page, for follow-up PDFs ---------- */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .bar, .controls, .edge, .banner, .toast { display: none !important; }
  .deck { height: auto; overflow: visible; }
  .track { display: block; transform: none !important; }
  .slide { height: 180mm; page-break-after: always; break-after: page; overflow: hidden; }
  .s-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (min-width: 1180px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Portrait tablets and phones: workflow steps stack vertically */
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 10px; max-width: 640px; }
  .flow li { padding: 14px 16px 14px 64px; text-align: left; border-top: 0; border-left: 5px solid var(--c); }
  .flow li::before { left: 16px; top: 50%; transform: translateY(-50%); }
  .flow li:not(:last-child)::after { display: none; }
  .flow b { font-size: 19px; } .flow span { font-size: 15px; }
}

/* iPhone: capture-only app, so the header capture button is redundant */
.phone .btn-capture { display: none; }

/* Stop iOS double-tap zoom, so a double tap on the logo reaches the app */
html, button { touch-action: manipulation; }

/* Kate Underwood HR umbrella tile spans the full row */
.tile.wide { grid-column: 1 / -1; min-height: 150px; }
.tile.wide .line { max-width: 60ch; }
