/* The shop window.
 *
 * Its own stylesheet rather than the app's: a prospective customer should not
 * download the payroll grid's styles to read a sales page, and the two have
 * opposite jobs. The app follows the phone's light or dark setting because a
 * crew reads it in direct sun and the office reads it all day indoors. This
 * does not follow anything — it is a designed page, and a company's shop
 * window looking different depending on a visitor's phone setting is how you
 * look like you did not mean it.
 *
 * Same colours as the app, so arriving inside is not a surprise.
 */

:root {
  --navy: #1b344d;
  --navy-deep: #0a1622;
  --orange: #e47c1f;
  --ink: #0b1a2b;
  --muted: #55708c;
  --line: #dbe4ee;
  --paper: #ffffff;
  --wash: #f1f5f9;
  --chrome-ink: #eaf1f8;
  --chrome-muted: #9db4ca;
}

* { box-sizing: border-box; }

/* The `hidden` attribute is only a UA stylesheet rule, so any author rule that
   sets display beats it — and this page sets `display: grid` on the form. The
   symptom is that after you send the form it stays on screen, underneath the
   message thanking you for sending it. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lede { font-size: clamp(1rem, 2vw, 1.18rem); max-width: 46rem; }

/* ---- the bar ------------------------------------------------------------ */

.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem max(1rem, (100% - 72rem) / 2);
  background: var(--navy-deep); color: var(--chrome-ink);
}
.top nav { display: flex; align-items: center; gap: 1.1rem; }
.top nav a { color: var(--chrome-muted); text-decoration: none; font-size: .9rem; }
.top nav a:hover { color: var(--chrome-ink); }

.wordmark {
  font-weight: 800; font-size: 1.1rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--orange); text-decoration: none;
}
.wordmark span { color: var(--chrome-ink); }
.wordmark.small { font-size: .95rem; }

/* ---- buttons ------------------------------------------------------------ */

.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 9px;
  border: 1px solid transparent; font-weight: 650; font-size: .95rem;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.btn.primary { background: var(--orange); color: #241003; border-color: #b36117; }
.btn.primary:hover { background: #f08b2c; }
.btn.ghost { border-color: #2d4760; color: var(--chrome-ink); padding: .45rem .9rem; }
.btn.ghost:hover { background: #16293c; }

/* ---- hero --------------------------------------------------------------- */

.hero {
  background: linear-gradient(170deg, var(--navy-deep), var(--navy));
  color: var(--chrome-ink);
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(3rem, 8vw, 5rem);
}
.hero .lede { color: var(--chrome-muted); margin-top: 1rem; }
.hero .cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero .cta .muted { color: var(--chrome-muted); font-size: .9rem; }

/* ---- the rule ----------------------------------------------------------- */

/* The one claim the whole product rests on gets a band of its own. Everything
   else on this page is a feature; this is the reason somebody buys it. */
.rule {
  background: var(--orange);
  color: #241003;
  padding: clamp(2rem, 5vw, 3rem) 0;
}
.rule h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
.rule p { max-width: 46rem; margin: 0; }

/* ---- what happens ------------------------------------------------------- */

.how { padding: clamp(3rem, 7vw, 5rem) 0; }
.cards {
  display: grid; gap: 1.1rem; margin-top: 2rem;
  /* 20rem rather than 17: at desktop width that is three columns, so the six
     cards fall as two even rows. 17rem gave four, leaving two empty slots on
     the second row that read as a page somebody did not finish. */
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
.cards article {
  background: var(--wash); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.3rem;
}
.cards h3 { color: var(--navy); }
.cards p { margin: 0; color: #32506d; font-size: .95rem; }

.who { background: var(--wash); padding: clamp(2.5rem, 6vw, 4rem) 0; }

/* ---- price -------------------------------------------------------------- */

.price { padding: clamp(3rem, 7vw, 5rem) 0; }
.price .wrap { display: grid; gap: 2rem; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); align-items: start; }
.pricecard {
  background: var(--navy); color: var(--chrome-ink);
  border-radius: 14px; padding: 1.6rem;
}
.pricecard .num { font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--orange); }
.pricecard .per { color: var(--chrome-muted); margin-bottom: 1.2rem; }
.pricecard ul { margin: 0 0 1.4rem; padding: 0; list-style: none; display: grid; gap: .55rem; }
.pricecard li { font-size: .9rem; padding-left: 1.3rem; position: relative; }
.pricecard li::before { content: '✓'; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.pricenote h3 { color: var(--navy); margin-top: 0; }
.pricenote h3 + p { color: #32506d; }
.pricenote h3:nth-of-type(n+2) { margin-top: 1.4rem; }

/* ---- the form ----------------------------------------------------------- */

.trial { background: var(--wash); padding: clamp(3rem, 7vw, 5rem) 0; }
#lead-form { max-width: 44rem; margin-top: 1.6rem; display: grid; gap: .9rem; }
#lead-form .two { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
#lead-form label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--navy); }
#lead-form input, #lead-form select, #lead-form textarea {
  font: inherit; padding: .65rem .75rem; border: 1px solid #c3d2e2;
  border-radius: 9px; background: var(--paper); color: var(--ink); width: 100%;
}
#lead-form input:focus-visible, #lead-form select:focus-visible, #lead-form textarea:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 1px;
}
#lead-form .send { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }
.formerror { color: #a1150f; font-weight: 600; margin: 0; }

/* The honeypot. Off-screen rather than display:none, because a bot that reads
   the stylesheet skips anything hidden — and a human never reaches it, since
   it is aria-hidden and out of the tab order. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.thanks { margin-top: 1.6rem; padding: 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; max-width: 44rem; }
.thanks h3 { color: var(--navy); }
.thanks p { margin: 0; color: #32506d; }

/* ---- footer ------------------------------------------------------------- */

footer { background: var(--navy-deep); color: var(--chrome-muted); padding: 2rem 0; }
footer .wordmark { margin-bottom: .4rem; display: inline-block; }
footer p { margin: 0; }
footer a { color: var(--chrome-ink); }

/* ---- phones ------------------------------------------------------------- */

@media (max-width: 46rem) {
  .price .wrap { grid-template-columns: 1fr; }
  #lead-form .two { grid-template-columns: 1fr; }
  .top nav { gap: .8rem; }
  .top nav a:not(.btn) { display: none; }
}

/* ==========================================================================
   Terms and privacy. Its own section rather than an inline <style> on the
   page: the Content Security Policy is style-src 'self', so an inline block
   is silently refused and the page renders as unstyled text. Found by opening
   it in a browser, which is the only way that failure shows up — the HTML is
   valid, the server returns 200, and nothing in any test was looking at the
   layout.
   ========================================================================== */
  .legal { padding: clamp(2rem, 6vw, 4rem) 0; }
  .legal .wrap { width: min(48rem, 100% - 2rem); }
  .legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: .4rem; }
  .legal h2 {
    font-size: clamp(1.15rem, 2.6vw, 1.45rem); margin-top: 2.6rem;
    padding-top: 1.4rem; border-top: 1px solid #dbe4ee;
  }
  .legal h3 { font-size: 1.02rem; margin-top: 1.6rem; }
  .legal p, .legal li { max-width: 42rem; line-height: 1.65; }
  .legal ul { padding-left: 1.1rem; }
  .legal li { margin: .4rem 0; }
  .legal .asof { color: var(--muted); font-size: .9rem; margin-top: 0; }
  .legal .jump { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
  .legal table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .93rem; }
  .legal th, .legal td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid #dbe4ee; vertical-align: top; }
  .legal th { color: var(--navy); }
  .legal .plain {
    background: var(--wash); border-left: 3px solid var(--orange);
    padding: .9rem 1rem; margin: 1.2rem 0; border-radius: 0 8px 8px 0;
  }
  .legal .plain p { margin: 0; }

/* ==========================================================================
   The assistant. A bubble in the corner rather than a section in the page:
   a question happens wherever somebody is reading, and anything they have to
   scroll to find is something they will not find. Hidden until the server
   says it is switched on.
   ========================================================================== */
.askbtn {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1.1rem; border-radius: 999px; border: 0;
  background: var(--orange); color: #241003;
  box-shadow: 0 6px 20px rgba(10, 22, 34, .28);
  font: inherit; font-weight: 700; cursor: pointer;
}
.askbtn:hover { background: #f08b2c; }
.askbtn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.askic { width: 1.15rem; height: 1.15rem; }

.askpanel {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 41;
  width: min(24rem, calc(100vw - 2rem));
  /* Tall enough to hold a conversation, never taller than the screen. */
  max-height: min(32rem, 78vh);
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #dbe4ee; border-radius: 14px;
  box-shadow: 0 10px 34px rgba(10, 22, 34, .3); overflow: hidden;
}
.askhead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .8rem .9rem; border-bottom: 1px solid #dbe4ee; background: var(--wash);
}
.askhead strong { color: var(--navy); }
.askclose {
  border: 0; background: none; font-size: 1.5rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 .2rem;
}
.askclose:hover { color: var(--navy); }

/* The log scrolls; the form under it does not move. */
.asklog {
  flex: 1; overflow-y: auto; padding: .85rem .9rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.askbubble {
  max-width: 90%; padding: .55rem .75rem; border-radius: 12px;
  line-height: 1.5; font-size: .94rem; white-space: pre-wrap;
}
.askbubble.mine { background: var(--navy); color: #eaf3fb; align-self: flex-end; border-bottom-right-radius: 3px; }
.askbubble.theirs { background: var(--wash); border: 1px solid #dbe4ee; align-self: flex-start; border-bottom-left-radius: 3px; }
.askbubble.thinking { color: var(--muted); font-style: italic; }

.askform { display: flex; gap: .5rem; padding: .75rem .9rem 0; }
.askform input {
  flex: 1; min-width: 0; padding: .6rem .7rem; font: inherit;
  border: 1px solid #c7d4e3; border-radius: 10px; background: #fff; color: var(--navy);
}
.askform input:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.askform button { flex: 0 0 auto; padding: .6rem .9rem; }
.askfoot { margin: .5rem .9rem .8rem; font-size: .8rem; }
