/* keysort.ie - marketing site.
   Tokens follow docs/design/keysort-ui.html (harbour, brass, ink, paper) so the
   site and the product read as one thing. Fonts are self-hosted: no requests to
   Google, no cookies. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #F6F5F1;
  --paper-2: #FAF9F6;
  --surface: #FFFFFF;
  --ink: #16211F;
  --slate: #5B6663;
  --harbour: #1F5F58;
  --harbour-deep: #154540;
  --on-harbour: #FFFFFF;
  --mist: #E3EFEC;
  --brass: #B7791F;
  --line: #DEDBD3;
  --line-soft: #ECEBE7;
  --band: #16211F;
  --on-band: #F3F5F4;
  --on-band-muted: #A9B6B2;

  --st-formdone-fg: #1B564F; --st-formdone-bg: #DDEEEA;
  --st-formsent-fg: #7A5310; --st-formsent-bg: #F5EBD6;
  --st-reminder-fg: #4B3F8C; --st-reminder-bg: #EAE7F6;
  --st-missing-fg: #9A3F1C;  --st-missing-bg: #F8E6DC;

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(22, 33, 31, .06), 0 12px 32px -12px rgba(22, 33, 31, .18);
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* --paper is the logo's own ink, so the dark logo's background blends in. */
    --paper: #16211F;
    --paper-2: #1A2725;
    --surface: #1F2D2A;
    --ink: #EEF2F0;
    --slate: #A9B6B2;
    --harbour: #5BB3A3;
    --harbour-deep: #7CC7B9;
    --on-harbour: #0F1816;
    --mist: rgba(91, 179, 163, .14);
    --brass: #D29B3F;
    --line: #2E3D39;
    --line-soft: #233230;
    --band: #0C1312;
    --on-band: #EEF2F0;
    --on-band-muted: #A9B6B2;

    --st-formdone-fg: #9FD8CC; --st-formdone-bg: rgba(91, 179, 163, .16);
    --st-formsent-fg: #E7C27E; --st-formsent-bg: rgba(210, 155, 63, .16);
    --st-reminder-fg: #C3B9F2; --st-reminder-bg: rgba(140, 125, 220, .18);
    --st-missing-fg: #F0AC8E;  --st-missing-bg: rgba(220, 120, 80, .16);

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--harbour); text-underline-offset: 3px; }
a:hover { color: var(--harbour-deep); }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(2.35rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--r-md);
}
.skip:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate);
}

.lead { font-size: 1.1875rem; color: var(--slate); max-width: 38rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-lg); border: 1.5px solid transparent;
  font-family: var(--font-ui); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--harbour); color: var(--on-harbour); }
.btn-primary:hover { background: var(--harbour-deep); color: var(--on-harbour); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--harbour); color: var(--harbour); }
.btn-on-band { background: var(--on-band); color: #16211F; }
.btn-on-band:hover { background: #FFFFFF; color: #16211F; }
.btn-ghost-band { border-color: rgba(255, 255, 255, .3); color: var(--on-band); }
.btn-ghost-band:hover { border-color: var(--on-band); color: var(--on-band); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 132px; height: auto; }
.site-nav { display: none; }
.site-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9688rem; }
.site-nav a:hover { color: var(--harbour); }
.site-header .btn { min-height: 44px; padding: 10px 16px; font-size: .9375rem; }
@media (min-width: 920px) { .site-nav { display: block; } }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 88px 0 104px; }
  .hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 56px; }
}
.hero-copy { display: grid; gap: 22px; }
.hero h1 .accent { color: var(--harbour); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-points { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--slate); font-size: .9375rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { color: var(--harbour); flex: none; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  padding: 6px 12px; border-radius: var(--r-lg);
  background: var(--mist); color: var(--harbour);
  font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; letter-spacing: .02em;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }

/* Product mock: an example shortlist */
.mock {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: .9375rem;
}
.mock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: var(--paper-2);
}
.mock-title { font-weight: 600; }
.mock-sub { color: var(--slate); font-size: .8125rem; }
.mock-tag { font-family: var(--font-mono); font-size: .75rem; color: var(--slate); white-space: nowrap; }
.mock ol { list-style: none; margin: 0; padding: 0; }
.mock li {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px; align-items: start;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.mock li:last-child { border-bottom: 0; }
.mock .pos { font-family: var(--font-mono); color: var(--slate); font-size: .8125rem; padding-top: 2px; }
.mock .who { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mock .why { grid-column: 2 / 4; color: var(--slate); font-family: var(--font-mono); font-size: .8125rem; }
.star {
  font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .02em;
  color: var(--brass); border: 1px solid currentColor; border-radius: var(--r-pill); padding: 1px 8px;
  white-space: nowrap;
}
.chip {
  justify-self: end; white-space: nowrap;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.chip-done { color: var(--st-formdone-fg); background: var(--st-formdone-bg); }
.chip-sent { color: var(--st-formsent-fg); background: var(--st-formsent-bg); }
.chip-reminder { color: var(--st-reminder-fg); background: var(--st-reminder-bg); }
.chip-missing { color: var(--st-missing-fg); background: var(--st-missing-bg); }
.mock-foot { padding: 10px 18px; font-size: .75rem; color: var(--slate); background: var(--paper-2); border-top: 1px solid var(--line-soft); }

/* Sections */
.section { padding: 80px 0; }
@media (min-width: 960px) { .section { padding: 112px 0; } }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { display: grid; gap: 14px; max-width: 44rem; margin-bottom: 48px; }

/* Problem */
.problem .wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .problem .wrap { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; } }
.problem-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.problem-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: var(--slate); }
.problem-list svg { color: var(--brass); margin-top: 3px; }
.problem-list strong { color: var(--ink); font-weight: 600; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 26px; display: grid; gap: 10px; align-content: start;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .8125rem; color: var(--brass); font-weight: 500;
}
.steps p { color: var(--slate); font-size: .9688rem; }
.example {
  margin-top: 6px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--paper-2); border: 1px dashed var(--line);
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.55; color: var(--slate);
}

/* Features */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li { background: var(--surface); padding: 28px; display: grid; gap: 10px; align-content: start; }
.features .icon {
  width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--mist); color: var(--harbour);
}
.features p { color: var(--slate); font-size: .9688rem; }

/* Rules */
.rules .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .rules .wrap { grid-template-columns: 1fr 1fr; gap: 72px; } }
.rules-copy { display: grid; gap: 18px; }
.rules-copy ul { margin: 4px 0 0; padding-left: 1.2em; color: var(--slate); display: grid; gap: 8px; }
.rule-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.rule-card ol { list-style: none; margin: 0; padding: 0; }
.rule-card li { display: grid; grid-template-columns: 30px 1fr 40px; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.rule-card .n { font-family: var(--font-mono); color: var(--slate); font-size: .8125rem; }
.rule-card .t { font-weight: 500; }
.rule-card .t small { display: block; color: var(--slate); font-weight: 400; font-size: .8125rem; }
.toggle { width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--harbour); position: relative; justify-self: end; }
.toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); }
.toggle.off { background: var(--line); }
.toggle.off::after { right: auto; left: 3px; }
.rule-card .tail { padding: 14px 20px; display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--paper-2); font-size: .8125rem; color: var(--slate); }
.rule-card .tail span:last-child { font-family: var(--font-mono); }

/* Trust */
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); } }
.trust li { padding: 24px 0 0; border-top: 2px solid var(--harbour); display: grid; gap: 8px; }
.trust p { color: var(--slate); font-size: .9688rem; }

/* Pricing note */
.pricing { display: grid; gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; }
@media (min-width: 900px) { .pricing { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 48px; gap: 48px; } }
.pricing ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pricing li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; }
.pricing li svg { color: var(--harbour); margin-top: 3px; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 22px; color: var(--slate); max-width: 44rem; }

/* CTA band */
.band { background: var(--band); color: var(--on-band); padding: 80px 0; }
.band .wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .band .wrap { grid-template-columns: 1.3fr auto; align-items: center; } }
.band h2 { color: var(--on-band); }
.band p { color: var(--on-band-muted); margin-top: 12px; max-width: 36rem; }
.band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.band a:not(.btn) { color: var(--on-band); }

/* Footer */
.site-footer { padding: 48px 0 40px; font-size: .9063rem; color: var(--slate); }
.site-footer .wrap { display: grid; gap: 28px; }
@media (min-width: 820px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .brand img { width: 112px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--harbour); text-decoration: underline; }
.legal { margin-top: 14px; max-width: 36rem; }
