/* Knock Jockey — shared styles. Mobile-first: the buyers are field sales
   managers and they will open this on a phone. */

/* ---------------------------------------------------------------------------
   Palette

   Two of the five brand colours fail WCAG in their most obvious use, so the
   tokens below encode the SAFE use rather than the raw swatch:

   - Turf Green #48BB78 with white text is 2.43:1 — nowhere near AA. It is a
     fill and a highlight, never a button background with white on top. --cta is a
     deepened green (#2F855A, 4.54:1 with white) for anything clickable.
   - Electric Blue #90CDF4 on white is ~1.9:1. It is an accent and an icon
     fill. As TEXT it appears only on Pin Grey, where it reaches 4.38:1.

   Measured against white unless noted.
--------------------------------------------------------------------------- */
:root {
  --base: #4a5661;        /* Pin Grey    — 7.52:1  headers, dark sections */
  --surface: #d9dee3;     /* Inner Grey  — surfaces only, never text */
  --accent: #90cdf4;      /* Electric Blue — accent and icon fill ONLY */
  /* Electric Blue as TEXT on --base is 4.37:1 — just under AA at small sizes.
     This lightened tint reads as the same brand blue and clears it at 4.95:1.
     Use --accent for fills, --accent-text for words. */
  --accent-text: #a9d8f5;
  --ink: #2c5282;         /* Navy        — 7.97:1  body text and headings */
  --turf: #48bb78;        /* Turf Green  — highlight/fill only */
  --cta: #2f855a;         /* deepened turf — 4.54:1 with white text */
  --cta-hover: #276749;

  --paper: #ffffff;
  --muted: #5b6b7c;       /* 5.6:1 — secondary text */
  --line: #dde3e9;

  --wrap: 1120px;
  --radius: 12px;
  --font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* Wide content (tables, the tier grid) scrolls in its own container; the
     page body must never scroll sideways. */
  overflow-x: hidden;
}

h1, h2, h3, .h { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink); }
h1 { font-size: 2.1rem; margin: 0 0 .6em; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; margin: 2.4rem 0 .7em; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }
a { color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.lead { font-size: 1.12rem; color: var(--muted); }
.center { text-align: center; }
.muted { color: var(--muted); }

/* --- header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
/* nowrap on both: at 375px "Knock Jockey" and "Get started" each wrapped to
   two lines, pushing the CTA to 69px inside a 62px header. It never triggered
   a horizontal scrollbar, so an overflow check alone will not catch it. */
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; color: var(--ink); white-space: nowrap; }
.brand svg { width: 26px; height: 31px; display: block; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; color: var(--muted); font-size: .93rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: #f2f5f8; }
.nav a.on { color: var(--ink); font-weight: 600; }
/* `.nav a` is specificity 0-1-1 and beats `.btn-primary` at 0-1-0, so without
   this the header CTA renders --muted text on the dark green fill — 1.2:1,
   effectively invisible. Restate the button colours at nav specificity. */
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; background: var(--cta-hover); }
/* Secondary nav links collapse on phones — the CTA and logo always survive. */
@media (max-width: 700px) { .nav .opt { display: none; } }
@media (max-width: 480px) {
  .brand { font-size: .96rem; }
  .brand img { width: 23px; height: 27px; }
  .nav .btn-sm { padding: 9px 13px; font-size: .88rem; }
  /* Where a button CTA exists, the plain text links are redundant on a narrow
     screen — drop them so the CTA keeps its full size. Pages with no button
     (privacy, terms) keep their link, which is their only way back. */
  .nav:has(.btn) a:not(.btn) { display: none; }
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
  min-height: 48px; /* thumb-sized: this gets tapped, not clicked */
  white-space: nowrap;
}
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--base); }
.btn-sm { padding: 9px 16px; font-size: .92rem; min-height: 40px; }

/* A CTA whose config value is still null. Visibly inert, not a dead link.
   Text uses --base, not --muted: this button carries information the visitor
   needs to read ("Checkout opening soon"), and --muted on --surface is 4.04:1
   — under AA. --base on --surface is 5.55:1. */
.btn[aria-disabled='true'] {
  background: var(--surface); color: var(--base); border-color: var(--line);
  cursor: not-allowed; pointer-events: none;
}

/* --- hero --------------------------------------------------------------- */
.hero { background: var(--base); color: #fff; padding: 56px 0 60px; }
.hero h1 { color: #fff; font-size: 2.25rem; }
.hero .lead { color: #e3e9ef; font-size: 1.15rem; max-width: 34em; }
.hero .eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { border-color: #fff; }
.hero-note { margin-top: 16px; font-size: .9rem; color: #c6d1dc; }

/* --- sections ----------------------------------------------------------- */
section { padding: 8px 0 28px; }
.band { background: #f6f8fa; padding: 44px 0 48px; margin-top: 40px; }
.band-dark { background: var(--base); color: #fff; padding: 44px 0 48px; margin-top: 40px; }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark p { color: #dde4ea; }

/* --- cards -------------------------------------------------------------- */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 26px 0 0; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); color: var(--ink);
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 12px;
}
.band-dark .card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.band-dark .card .num { background: var(--accent); color: var(--base); }

/* --- pricing ------------------------------------------------------------ */
.price-panel {
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  background: #fff; max-width: 560px; margin: 26px auto 0;
}
.rep-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.rep-choices button {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  min-width: 56px; min-height: 48px; padding: 10px 14px;
  border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer;
}
.rep-choices button[aria-pressed='true'] { border-color: var(--cta); background: #eef7f1; }
.rep-input { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.rep-input input {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  width: 104px; min-height: 48px; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: 10px; color: var(--ink);
}
.total { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--ink); line-height: 1.05; }
/* Scoped to .unit, not to every span: the amount itself is a span too, and a
   bare `.total span` rule silently shrinks the headline number to body size. */
.total .unit { font-size: 1rem; font-weight: 400; color: var(--muted); font-family: var(--font-body); }
.rate-line { margin: 6px 0 0; color: var(--muted); }
.nudge {
  margin: 14px 0 0; padding: 11px 14px; border-radius: 10px;
  background: #eef7f1; border: 1px solid #cfe8da; color: #1f5c40; font-size: .93rem;
}
.nudge:empty { display: none; }

.tier-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .97rem; }
.tier-table th, .tier-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tier-table th { font-family: var(--font-head); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tier-table tr.on td { background: #eef7f1; font-weight: 600; }
/* --muted is tuned for white backgrounds; on the dark band it is 1.37:1.
   Header cells and borders both need lifting inside .band-dark. */
.band-dark .tier-table th { color: #cfd8e0; }
.band-dark .tier-table th, .band-dark .tier-table td { border-bottom-color: rgba(255,255,255,.22); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- faq ---------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem;
  padding: 15px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* --- screenshots -------------------------------------------------------- */
/* Screenshots keep the phone's real proportions (0.552 — the app viewport on
   an iPhone, minus the iOS status bar and Safari toolbar). An earlier pass
   cropped them to 3:4 to win legibility and lost the thing that makes them
   read as a phone at all. The device frame does that job properly: the tall
   shape now looks deliberate instead of like a mistake. */
.shots { display: grid; gap: 28px 20px; grid-template-columns: 1fr; margin-top: 26px; }
.shots .shot { width: 100%; max-width: 320px; margin-inline: auto; }
@media (min-width: 980px) {
  .shots { grid-template-columns: repeat(3, 1fr); }
  .shots .shot { max-width: 340px; }
}
.shot { margin: 0; }
.phone {
  border-radius: 32px;
  padding: 8px;
  background: #14181c;
  box-shadow: 0 12px 32px rgba(20, 30, 40, .22), 0 2px 6px rgba(20, 30, 40, .12);
}
/* height:auto is REQUIRED alongside width:100%. Without it the browser applies
   the literal height attribute and stretches the image; with it, the width and
   height attributes act as an aspect-ratio hint that also reserves space and
   prevents layout shift while the image loads. */
.phone img { width: 100%; height: auto; max-width: 100%; display: block; border-radius: 25px; }
.shot .cap { padding: 15px 4px 0; font-size: .92rem; color: var(--muted); text-align: center; }

/* --- footer ------------------------------------------------------------- */
.site-foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 30px 0 44px; color: var(--muted); font-size: .92rem; }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 26px 44px; align-items: flex-start; }
.site-foot a { color: var(--muted); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* --- misc --------------------------------------------------------------- */
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 11px; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: .45em;
  width: 16px; height: 9px; border-left: 3px solid var(--turf); border-bottom: 3px solid var(--turf);
  transform: rotate(-45deg);
}
.band-dark .checks li::before { border-color: var(--accent); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: var(--ink); padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

@media (min-width: 760px) {
  h1 { font-size: 2.6rem; }
  .hero h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .hero { padding: 78px 0 82px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
