/* Layout: one 1080px column; legal pages get a sticky contents rail on wide screens.
   Identity: the app's own palette (ink, cream, electric blue, volt) with a wide, heavy grotesque
   and a receipt-style "job ticket" that shows the real fee math. */
:root {
  --paper: #F2EFE9;
  --surface: #FFFFFF;
  --ink: #111111;
  --muted: #5C5A54;
  --line: rgba(17, 17, 17, 0.12);
  --blue: #1E6FDB;
  --blue-ink: #FFFFFF;
  --volt: #FFD60A;
  --volt-ink: #111111;
  --green: #1F8A45;
  --contrast-bg: #111111;
  --contrast-fg: #F2EFE9;
  --contrast-muted: rgba(242, 239, 233, 0.72);
  --font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1013;
    --surface: #18191D;
    --ink: #F2EFE9;
    --muted: #A9A69E;
    --line: rgba(242, 239, 233, 0.14);
    --blue: #5C9BFF;
    --blue-ink: #0F1013;
    --green: #4CC77A;
    --contrast-bg: #1D2638;
    --contrast-fg: #F2EFE9;
    --contrast-muted: rgba(242, 239, 233, 0.72);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1013;
  --surface: #18191D;
  --ink: #F2EFE9;
  --muted: #A9A69E;
  --line: rgba(242, 239, 233, 0.14);
  --blue: #5C9BFF;
  --blue-ink: #0F1013;
  --green: #4CC77A;
  --contrast-bg: #1D2638;
  --contrast-fg: #F2EFE9;
  --contrast-muted: rgba(242, 239, 233, 0.72);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; line-height: 1.05; text-wrap: balance; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.selectable { user-select: all; -webkit-user-select: all; font-family: var(--font-mono); font-size: 0.95em; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 32px 64px; display: grid; gap: 40px; }
.view { display: grid; gap: 40px; }
.view[hidden] { display: none !important; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 900; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -0.01em; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--volt); color: var(--volt-ink); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.92rem; font-weight: 600; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--volt); }

/* Type */
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.big { font-size: 1.35rem; font-weight: 700; }
.fine { font-size: 0.85rem; color: var(--muted); }

/* Buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 1rem; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; padding-top: 16px; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 900; font-stretch: 125%; letter-spacing: -0.02em; }
.hl { background: linear-gradient(transparent 58%, var(--volt) 58%, var(--volt) 92%, transparent 92%); padding: 0 0.08em; color: var(--ink); }

/* The job ticket: a receipt with a perforated edge */
.ticket {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 26px; display: grid; gap: 14px;
  box-shadow: 0 18px 40px -24px rgba(17, 17, 17, 0.45);
  transform: rotate(1.2deg);
}
.ticket::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 10px;
  background: radial-gradient(circle at 6px -1px, var(--paper) 5px, transparent 5.5px) 0 0 / 14px 10px repeat-x;
}
.ticket h3 { font-size: 1.45rem; font-weight: 800; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); font-size: 0.78rem; font-weight: 700; }
.rail { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 0.68rem; font-weight: 700; color: var(--muted); text-align: center; }
.rail li { padding-top: 12px; border-top: 4px solid var(--line); }
.rail li.done { border-top-color: var(--blue); color: var(--ink); }
.rail li.now { border-top-color: var(--green); color: var(--green); }
.ledger { margin: 0; display: grid; gap: 6px; border-top: 1.5px dashed var(--line); padding-top: 12px; font-variant-numeric: tabular-nums; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; font-family: var(--font-mono); font-weight: 500; }
.ledger .total { font-weight: 800; padding-top: 6px; border-top: 1px solid var(--line); }
.ledger .total dt { color: var(--ink); }
.ledger .keep dd { color: var(--green); font-size: 1.05rem; }

/* Hire / Earn */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.panel h2 { font-size: 1.6rem; font-weight: 850; }
.panel-ink { background: var(--contrast-bg); color: var(--contrast-fg); border-color: transparent; }
.panel-ink .eyebrow { color: var(--volt); }
.panel-ink .ticks li { color: var(--contrast-muted); }
.panel-ink .ticks li::before { background: var(--volt); color: var(--volt-ink); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 0.72rem; font-weight: 900; background: var(--blue); color: var(--blue-ink); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.facts div { padding: 18px 16px 4px 0; display: grid; gap: 4px; }
.facts strong { font-family: var(--font-display); font-stretch: 120%; font-weight: 900; font-size: 2rem; line-height: 1; }
.facts span { color: var(--muted); font-size: 0.92rem; }

/* Page heads and documents */
.page-head { display: grid; gap: 12px; padding-top: 12px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -0.015em; }
.page-head .eyebrow { color: var(--muted); }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); display: grid; gap: 10px; font-size: 0.9rem; }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.doc-body { display: grid; gap: 30px; max-width: 68ch; min-width: 0; }
.doc-body section { display: grid; gap: 10px; scroll-margin-top: 90px; }
.doc-body h2 { font-size: 1.3rem; font-weight: 800; font-stretch: 105%; }
.doc-body ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.doc-body p, .doc-body li { overflow-wrap: anywhere; }

/* Support */
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-card > div { display: grid; gap: 6px; min-width: 0; max-width: 60ch; }
.faq { display: grid; gap: 30px; max-width: 760px; }
.faq section { display: grid; gap: 8px; }
.faq h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
summary { cursor: pointer; padding: 15px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-mono); color: var(--blue); }
details[open] summary::after { content: "–"; }
details p { padding-bottom: 16px; color: var(--muted); }

.landing { display: grid; gap: 18px; max-width: 640px; padding-block: 40px; }
.landing h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 24px; padding-block: 32px 48px; font-size: 0.92rem; }
.foot > div { display: grid; gap: 10px; align-content: start; }
.foot nav { display: grid; gap: 6px; align-content: start; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .hero, .split, .doc, .foot { grid-template-columns: minmax(0, 1fr); }
  .ticket { transform: none; }
  .toc { position: static; border-left: 3px solid var(--volt); padding-left: 14px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .nav { font-size: 0.85rem; gap: 2px 12px; }
  .rail { font-size: 0.6rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .ticket { transition: transform 0.4s ease; }
  .ticket:hover { transform: rotate(0deg); }
}


/* ---------- App wallpaper: the same dimmed work photos the PluggedIn app uses ---------- */
body { background: transparent; }
html { background: var(--paper); }
html::before, html::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
html::before {
  background: var(--photo, url("img/vest.jpg")) center / cover no-repeat;
  opacity: 0.42; filter: blur(2px); transform: scale(1.06);
}
html::after {
  background: linear-gradient(180deg, rgba(242,239,233,.60) 0%, rgba(255,255,255,.40) 50%, rgba(242,239,233,.62) 100%);
}
@media (prefers-color-scheme: dark) {
  html::before { opacity: 0.34; }
  html::after { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.70) 100%); }
}
@media (prefers-reduced-transparency: reduce) { html::before { display: none; } }
html:has(body[data-photo="vest"]) { --photo: url("img/vest.jpg"); }
html:has(body[data-photo="tools"]) { --photo: url("img/tools.jpg"); }
html:has(body[data-photo="moving"]) { --photo: url("img/moving.jpg"); }
html:has(body[data-photo="lawn"]) { --photo: url("img/lawn.jpg"); }
html:has(body[data-photo="painting"]) { --photo: url("img/painting.jpg"); }
html:has(body[data-photo="cleaning"]) { --photo: url("img/cleaning.jpg"); }
html:has(body[data-photo="deck"]) { --photo: url("img/deck.jpg"); }
html:has(body[data-photo="hardhats"]) { --photo: url("img/hardhats.jpg"); }
body::before { background: transparent; }
.site-header { background: color-mix(in srgb, var(--paper) 72%, transparent); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
/* Cards float on the photos like the app's cards */
.panel, .contact-card, details, .card, .step, .faq details {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px -22px rgba(0,0,0,.45);
}
.panel-ink { background: color-mix(in srgb, var(--contrast-bg) 92%, transparent); }
.mark { background: none; padding: 0; overflow: hidden; }
.mark img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.nav a.pa { opacity: .7; }
