/* Jobsite Sidekick marketing site. Palette mirrors the app (src/ui/colors.ts). */

:root {
  --bg: #0e1216;
  --surface: #161c23;
  --surface-alt: #1e262f;
  --key: #28323c;
  --border: #2a3540;
  --text: #f3f6f8;
  --muted: #a3b3c0;
  --faint: #7c8e9b;
  --accent: #5aa9de;
  --accent-hover: #7bbde8;
  --on-accent: #0b1620;
  --ok: #4cc38a;
  --warn: #f2c14e;
  --radius: 14px;
  --wrap: 1120px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); text-transform: uppercase; }
h3 { font-size: 1.5rem; }

p { margin: 0 0 16px; }

.accent { color: var(--accent); }

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }

section { padding: 80px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { margin-bottom: 44px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.btn-small { min-height: 44px; padding: 0 18px; font-size: 1.05rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.fineprint { font-size: 0.9rem; color: var(--faint); margin-top: 14px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  font-family: var(--body);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.09em;
  color: var(--text);
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { border-radius: 8px; display: block; }
.wordmark-text span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:not(.btn):hover { color: var(--text); }

/* Hero */

.hero { padding: 64px 0 80px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero .lede { font-size: 1.3rem; }

.phone {
  width: min(320px, 100%);
  margin: 0 auto;
  border: 10px solid #05080a;
  outline: 1px solid var(--border);
  border-radius: 40px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(90, 169, 222, 0.08);
}

/* A phone showing only part of a tall screenshot. */
.phone.crop { aspect-ratio: 390 / 700; }
.phone.crop img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.crop.from-bottom img { object-position: bottom; }

/* Proof strip */

.proof { padding: 0; background: var(--surface); border-block: 1px solid var(--border); }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-item { padding: 26px 20px; text-align: center; border-left: 1px solid var(--border); }
.proof-item:first-child { border-left: 0; }

.proof-num {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.proof-label { color: var(--muted); font-size: 0.98rem; margin-top: 6px; }

/* Demo video */

.demo { padding-bottom: 0; }

.video {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface) center / cover no-repeat;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.demo-side { display: none; }

/* An upright phone recording: phone-shaped frame with the pitch beside it. */
.demo.tall .section-head { margin-bottom: 32px; }
.demo.tall .demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 420px);
  gap: 56px;
  align-items: center;
  justify-content: center;
}
.demo.tall .video {
  width: 100%;
  max-width: 320px;
  margin: 0;
  aspect-ratio: 9 / 16;
  border: 10px solid #05080a;
  outline: 1px solid var(--border);
  border-radius: 40px;
}
.demo.tall .demo-side { display: block; }

@media (max-width: 800px) {
  .demo.tall .demo-grid { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .demo.tall .demo-side { width: 100%; }
}

.video iframe,
.video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* Our own MP4 is recorded at a modern phone's full screen shape (1080 x 2340). */
.demo.tall.file .video { aspect-ratio: 1080 / 2340; }

.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: rgba(14, 18, 22, 0.45);
  color: var(--text);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.video-play:hover { background: rgba(14, 18, 22, 0.25); }

.video-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
}
.video-icon::before {
  content: '';
  margin-left: 6px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--on-accent);
}

/* Feature rows */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 44px 0;
}

.feature:nth-of-type(even) .feature-shot { order: -1; }

.feature p { color: var(--muted); }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text); }
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 14px;
  height: 7px;
  border-left: 3px solid var(--ok);
  border-bottom: 3px solid var(--ok);
  transform: rotate(-45deg);
}

/* The "you type / you get" table */

.io {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.95rem;
}
.io td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.io td:last-child { text-align: right; color: var(--accent); font-weight: 700; white-space: nowrap; }
.io tr:last-child td { border-bottom: 0; }

/* Cards */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
section.alt .card { background: var(--bg); }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }

.card.soon { border-style: dashed; border-color: var(--warn); }

.tag {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: rgba(242, 193, 78, 0.14);
  color: var(--warn);
}

/* Trades */

.trades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }

.trade h3 {
  font-size: 1.3rem;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
}

.trade ul { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 1rem; }
.trade li { padding: 5px 0; }

/* Comparison */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.compare { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.98rem; }

.compare th, .compare td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.compare thead th {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--surface-alt);
  line-height: 1.2;
}

.compare th[scope='row'] { text-align: left; font-weight: 500; color: var(--text); }
.compare td { color: var(--muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

.compare .us { background: rgba(90, 169, 222, 0.1); color: var(--text); font-weight: 600; }
.compare thead .us { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.yes { color: var(--ok); font-weight: 700; }
.dash { color: var(--faint); }

/* Pricing */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center; }

.plan {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}

.plan.best { border: 2px solid var(--accent); }

.plan .flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan h3 { text-transform: uppercase; color: var(--muted); font-size: 1.2rem; letter-spacing: 0.1em; }

.price { font-family: var(--display); font-size: 4rem; font-weight: 700; line-height: 1; }
.price small { font-size: 1.3rem; font-weight: 500; color: var(--muted); }

.plan .note { color: var(--muted); font-size: 0.98rem; min-height: 1.6em; margin: 8px 0 22px; }
.plan .btn { width: 100%; }

.crew {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  max-width: 780px;
  margin: 28px auto 0;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.crew > div { flex: 1 1 320px; }
.crew h3 { margin-bottom: 6px; }
.crew p { color: var(--muted); margin: 0; font-size: 1rem; }

.includes { max-width: 780px; margin: 40px auto 0; }
.includes .ticks { columns: 2; column-gap: 40px; }
.includes .ticks li { break-inside: avoid; }

/* Steps */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }

.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* FAQ */

.faq { max-width: 800px; }

.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  position: relative;
  font-weight: 600;
  font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--accent);
}
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); padding-right: 36px; }

/* Final call + footer */

.final { text-align: center; }
.final .lede { margin-inline: auto; }
.final .cta-row { justify-content: center; }

.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--faint); font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

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

/* Smaller screens */

@media (max-width: 960px) {
  .trades { grid-template-columns: repeat(2, 1fr); }
  .cards, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  body { font-size: 17px; }
  section { padding: 56px 0; }
  .nav a:not(.btn) { display: none; }
  .hero { padding-top: 40px; }
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature { padding: 28px 0; }
  .feature:nth-of-type(even) .feature-shot { order: 0; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(3) { border-left: 0; }
  .proof-item:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .plans { grid-template-columns: 1fr; }
  .includes .ticks { columns: 1; }
  .cta-row .btn { width: 100%; }
}

@media (max-width: 480px) {
  .trades { grid-template-columns: 1fr; }
  /* The full name and the trial button do not fit on one line on a phone. */
  .wordmark { font-size: 1.05rem; }
  .wordmark-text { line-height: 1.1; }
  .wordmark-text span { display: block; }
  .site-header .btn-small { white-space: nowrap; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ------------------------------------------------------------------
   Legal pages: terms.html, privacy.html, refund.html
   Long-form reading styles. Everything is scoped to .legal (plus one
   footer rule for the current page), so no rule above is changed.
   ------------------------------------------------------------------ */

.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 800px; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 12px; }
.legal h2 { font-size: 1.7rem; text-transform: none; margin: 48px 0 12px; scroll-margin-top: 84px; }
.legal h3 { font-size: 1.25rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.4em; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal a { overflow-wrap: anywhere; }

.legal-intro { font-size: 1.15rem; color: var(--muted); }

/* A highlighted panel: the plain-English summary, or a warning. */
.legal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.legal-box.warn { border-left-color: var(--warn); }
.legal-box h2, .legal-box h3 { margin-top: 0; }
.legal-box p:last-child, .legal-box ul:last-child { margin-bottom: 0; }

/* Contents list at the top of each page. */
.legal-toc { columns: 2; column-gap: 32px; font-size: 1rem; }
.legal-toc li { break-inside: avoid; margin-bottom: 4px; }

/* Data tables in the privacy policy. Wrapped in .table-scroll. */
.legal-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.legal-table th, .legal-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.legal-table thead th { background: var(--surface-alt); color: var(--text); font-weight: 600; }
.legal-table tbody th { color: var(--text); font-weight: 600; }
.legal-table tr:last-child th, .legal-table tr:last-child td { border-bottom: 0; }

.legal-updated {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--faint);
}

.footer-links a[aria-current='page'] { color: var(--text); text-decoration: none; }

@media (max-width: 800px) {
  .legal { padding: 40px 0 56px; }
  .legal-toc { columns: 1; }
}

/* Legal tables on phones: each row becomes a small card instead of a table
   that has to be scrolled sideways. Labels come from data-label. */
@media (max-width: 600px) {
  .legal .table-scroll { overflow: visible; }
  .legal-table { min-width: 0; }
  .legal-table thead { display: none; }
  .legal-table tr { display: block; border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table th, .legal-table td { display: block; padding: 0; border: 0; }
  .legal-table tbody th { font-size: 1.05rem; margin-bottom: 6px; }
  .legal-table td + td { margin-top: 10px; }
  .legal-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
  }
}
