/* Fonts are served by Worktally itself, so visitors' details never go to Google. Both are SIL Open Font Licence. */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin.woff2") format("woff2"); font-weight: 400 800; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat-latin.woff") format("woff"); font-weight: 600; font-display: swap; }

/* Look: the carbon-copy invoice pad tradespeople still carry in the truck. */
:root {
  color-scheme: dark;
  --bg: #111316;        /* graphite */
  --surface: #191c20;
  --ink: #e7e9ec;
  --muted: #9ea6b0;
  --rule: #2a2f36;
  --pen: #e7e9ec;       /* near-white: the main action */
  --pen-ink: #111316;
  --canary: #20242a;    /* the invoice-pad illustration */
  --canary-ink: #e7e9ec;
  --stamp: #f28b82;
  --no: #6f7782;
  --panel: #0b0c0e;     /* side panel on login pages */
  --ok: #7fcf98;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

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

.btn {
  display: inline-block;
  background: var(--pen);
  color: var(--pen-ink);
  border: 0;
  border-radius: 6px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 600; font-size: 24px; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.top .btn { padding: 10px 16px; font-size: 16px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
}
.hero h1 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero p { font-size: 20px; color: var(--muted); max-width: 34ch; margin: 0 0 28px; }

/* The invoice ticket: the one bold element on the page */
.ticket {
  position: relative;
  margin: 0;
  background: var(--canary);
  color: var(--canary-ink);
  padding: 22px 24px 26px;
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(31, 42, 68, 0.45);
  transform: rotate(-1.5deg);
  /* perforated top edge */
  background-image: radial-gradient(circle at 8px -2px, var(--bg) 5px, transparent 5.5px);
  background-size: 16px 10px;
  background-repeat: repeat-x;
}
.ticket header { display: flex; justify-content: space-between; font-stretch: 112%; font-weight: 700; font-size: 15px; border-bottom: 2px solid currentColor; padding: 6px 0 10px; }
.ticket dl { margin: 12px 0 0; display: grid; grid-template-columns: 1fr auto; row-gap: 4px; }
.ticket dt, .ticket dd { margin: 0; padding: 6px 0; border-bottom: 1px solid rgba(31, 42, 68, 0.25); }
.ticket dd { text-align: right; }
.hand { font-family: "Caveat", cursive; font-size: 26px; line-height: 1.1; color: var(--pen); }
.ticket .hand { color: var(--ink); } .ticket dt, .ticket dd { border-color: rgba(231, 233, 236, 0.18); }
.ticket .total { display: contents; }
.ticket .total dt, .ticket .total dd { border-bottom: 0; font-weight: 700; padding-top: 12px; }
.ticket .total dd.hand { font-size: 34px; }
.stamp {
  position: absolute;
  right: 22px;
  bottom: 62px;
  border: 3px solid var(--stamp);
  color: var(--stamp);
  border-radius: 6px;
  padding: 2px 12px;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 30px;
  transform: rotate(-14deg);
  opacity: 0.85;
  animation: stamp 0.35s cubic-bezier(.3, 1.6, .5, 1) 0.6s both;
}
@keyframes stamp { from { transform: rotate(-14deg) scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

/* Sections */
section { padding: 56px 0; border-top: 1px solid var(--rule); }
section h2 { font-stretch: 112%; font-weight: 800; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 12px; }
section > .wrap > p.intro { color: var(--muted); max-width: 62ch; margin: 0 0 32px; }

.hero-small { font-size: 16px !important; margin: 14px 0 0 !important; }

/* Savings calculator: the sum is written in pen, like a figure on the invoice pad */
.savings { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.calc { display: grid; gap: 8px; max-width: 420px; }
.calc label { font-weight: 600; font-size: 15px; margin-top: 8px; }
.calc output { font-weight: 800; }
.calc select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--rule); border-radius: 8px; height: 50px; padding: 0 12px;
}
.calc input[type="range"] { width: 100%; accent-color: var(--pen); height: 32px; }
.calc-result { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 28px; }
.calc-result p { margin: 0; }
.calc-big { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; color: var(--pen); margin-top: 14px !important; }
.calc-big span { display: block; font-size: 1.5em; }

/* Closing call to action */
.closing { text-align: left; }
.closing .intro { margin-bottom: 24px !important; }

/* Who it's for */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; }
.facts strong { display: block; font-stretch: 112%; font-size: 19px; margin-bottom: 4px; }
.facts p { margin: 0; color: var(--muted); font-size: 16px; }

/* Comparison table */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
.compare { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-stretch: 112%; font-weight: 700; font-size: 17px; }
.compare tbody th { font-weight: 600; color: var(--muted); position: sticky; left: 0; background: var(--surface); min-width: 170px; }
.compare .us { background: var(--canary); color: var(--canary-ink); font-weight: 700; }
.compare .no { color: var(--no); }
.compare small { display: block; font-weight: 400; color: inherit; opacity: 0.75; font-size: 13px; }
.footnote { font-size: 14px; color: var(--muted); margin: 14px 0 0; max-width: 72ch; }

/* Switching steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: "Caveat", cursive; font-size: 44px; line-height: 1; color: var(--pen); margin-bottom: 6px; }
.steps strong { display: block; font-stretch: 112%; font-size: 19px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* Log in, sign up, password reset: navy panel with the invoice ticket, form on the right */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 100vh; }
.auth-side {
  background: var(--panel);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 36px;
  padding: 48px 32px;
}
.auth-side .ticket {
  width: min(340px, 100%);
  background-image: radial-gradient(circle at 8px -2px, var(--panel) 5px, transparent 5.5px);
}
.auth-tagline { color: var(--muted); font-size: 44px; margin: 0; transform: rotate(-3deg); }
.auth-main { display: grid; grid-template-rows: auto 1fr; padding: 20px 16px 48px; background: var(--bg); }
.auth { align-self: center; justify-self: center; width: min(400px, 100%); padding: 32px 0; }
.auth h1 { font-stretch: 112%; font-weight: 800; font-size: clamp(30px, 4vw, 38px); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 8px; }
.auth-lede { color: var(--muted); margin: 0 0 24px; }
.auth form { display: grid; }
.auth label { font-weight: 600; font-size: 15px; margin: 16px 0 6px; }
.auth input[type="email"], .auth input[type="password"], .auth input[type="text"] {
  width: 100%;
  height: 50px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 0 14px;
}
.auth input:focus { outline: none; border-color: var(--pen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pen) 25%, transparent); }
.pw { position: relative; }
.pw input { padding-right: 76px !important; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; border-radius: 6px; padding: 8px 10px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--pen); cursor: pointer;
}
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.field-link { font-size: 15px; margin: 10px 0 0; text-align: right; }
/* Honeypot: off-screen so people never fill it; bots usually do */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-block { width: 100%; margin-top: 16px; padding: 15px 22px; }
.btn-quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--rule); }
.auth-switch { color: var(--muted); font-size: 16px; margin: 24px 0 0; }
.form-msg { background: var(--surface); border-left: 4px solid; border-radius: 4px; padding: 12px 14px; margin: 0 0 8px; font-size: 16px; }
.form-error { border-color: var(--stamp); }
.form-notice { border-color: var(--ok); }

/* Account and other simple pages */
.panel { max-width: 560px; padding: 32px 0 72px; }
.panel h1 { font-stretch: 112%; font-weight: 800; font-size: 34px; letter-spacing: -0.015em; margin: 0 0 16px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.account-actions form { margin: 0; }

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--rule); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 16px; }
  .facts, .steps, .savings { grid-template-columns: 1fr; gap: 24px; }
  .ticket { transform: rotate(-1deg); }
}

/* Sign-up: agree to the terms */
.agree { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 15px !important; margin: 18px 0 0 !important; color: var(--muted); }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--pen); }

/* Sign-up: first and last name side by side */
.auth .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth .pair input { width: 100%; }
