/* Zacsync public site
   Hand-authored. No framework, no build step, no tracking.
   One webfont family (Archivo, display only); body and mono use system stacks,
   because a site arguing that bytes are somebody's money should not ship 200 KB
   of typefaces to prove it.

   Two colour roles, deliberately separate:
     --brand  blue. Links, buttons, focus, structure. Decoration and navigation.
     --warn   amber. ONLY the element carrying risk: a waiting job, an unset
              price, the canary node in the logo. Never decorative, or it stops
              meaning anything. */

:root {
  --ink:       #12233F;
  --ink-2:     #33486B;
  --muted:     #4F6382;
  --faint:     #566A88;
  --paper:     #F5F7FA;
  --surface:   #FFFFFF;
  --surface-2: #E9EEF5;
  --line:      #D3DCE8;
  --line-soft: #E4EAF2;
  --brand:     #1D5FD1;
  --brand-2:   #1749A6;
  --on-brand:  #F4F8FF;
  --warn:      #B2540C;
  --ok:        #0F766E;

  --measure: 64ch;
  --gutter: 22px;
  --radius: 2px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:       #E6ECF5;
    --ink-2:     #B9C6D9;
    --muted:     #94A5BD;
    --faint:     #8B9DB6;
    --paper:     #0B1220;
    --surface:   #111B2D;
    --surface-2: #172438;
    --line:      #24354E;
    --line-soft: #1B2942;
    --brand:     #6BA6FF;
    --brand-2:   #9BC5FF;
    --on-brand:  #0B1220;
    --warn:      #F0954A;
    --ok:        #4DB6A8;
  }
}

:root[data-theme="dark"] {
  --ink:       #E6ECF5;
  --ink-2:     #B9C6D9;
  --muted:     #94A5BD;
  --faint:     #8B9DB6;
  --paper:     #0B1220;
  --surface:   #111B2D;
  --surface-2: #172438;
  --line:      #24354E;
  --line-soft: #1B2942;
  --brand:     #6BA6FF;
  --brand-2:   #9BC5FF;
  --on-brand:  #0B1220;
  --warn:      #F0954A;
  --ok:        #4DB6A8;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ---------- primitives ---------- */

.wrap {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 16px;
}

h1, h2, h3, h4 {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -.012em; }

p { margin: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1px 5px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand svg { display: block; flex: none; }

.brand-name {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 29px;
  letter-spacing: -.02em;
  line-height: 1;
}

.brand-name em { font-style: normal; font-weight: 500; color: var(--brand); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 11px;
  border-radius: var(--radius);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); }
.nav .btn { margin-left: 6px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

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

.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); background: var(--surface-2); color: var(--ink); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- sections ---------- */

section { padding-block: clamp(52px, 8vw, 88px); }

section + section { border-top: 1px solid var(--line); }

/* vertical rhythm after a heading, so pages need no inline margins */
h1 + .lede, h2 + .lede, h2 + .prose { margin-top: 20px; }
.prose + .callout, .tiles + .callout, .table-scroll + .callout, pre + .callout { margin-top: 28px; }
.prose + .btn-row { margin-top: 28px; }

.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-2);
  max-width: var(--measure);
  line-height: 1.55;
}

.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 18px; }
.prose p { color: var(--ink-2); }

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

.hero { padding-block: clamp(56px, 9vw, 104px); }
.hero-sub { padding-block: clamp(44px, 6vw, 72px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 28px; }

.hero-meta {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

/* fleet status strip: the hero's only graphic, in the product's own vocabulary */

.fleet {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.fleet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.fleet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.fleet-row:last-child { border-bottom: 0; }

.fleet-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-name span { color: var(--faint); }

.state {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: var(--radius);
  border: 1px solid;
  white-space: nowrap;
}

.state-ok      { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.state-wait    { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 42%, transparent); }
.state-skipped { color: var(--muted);  border-color: var(--line); }
.state-overdue { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.fleet-foot {
  padding: 10px 14px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* ---------- guarantee list ---------- */

.guarantees {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
}

.guarantee {
  background: var(--surface);
  padding: 26px 24px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.guarantee-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--brand);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.guarantee h3 { margin-bottom: 8px; }
.guarantee p { color: var(--ink-2); max-width: 58ch; }

/* ---------- tile grid ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
}

.tile {
  background: var(--surface);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile h3 { margin: 0; }
.tile p { color: var(--ink-2); font-size: 14.5px; }

.tile-link {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tile-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- facts / numbered list ---------- */

.facts { display: flex; flex-direction: column; gap: 0; margin-top: 30px; }

.fact {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.fact:last-child { border-bottom: 1px solid var(--line); }

.fact b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 400;
  font-size: 12px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.fact p { color: var(--ink-2); max-width: 62ch; }
.fact strong { color: var(--ink); font-weight: 600; }

/* ---------- code block ---------- */

pre {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
}

pre code { background: none; border: 0; padding: 0; border-radius: 0; font-size: inherit; }

pre .c { color: var(--faint); }

.prose + pre { margin-top: 24px; }
pre + h2 { margin-top: 48px; }

/* ---------- tables ---------- */

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

table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }

th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }

thead th {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }

td strong { font-weight: 600; }

/* ---------- pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 36px;
}

.plan { background: var(--surface); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }

.plan-name {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.015em;
}

.plan-price {
  font-family: Archivo, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -.03em;
  line-height: 1;
}

.plan-price small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; color: var(--ink-2); }

.plan li { position: relative; padding-left: 18px; }

.plan li::before { content: "·"; position: absolute; left: 2px; top: 0; color: var(--brand); font-weight: 700; }

/* the plan most visitors should start with */
.plan-featured { box-shadow: inset 0 3px 0 var(--brand); }

.plan-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: -4px;
}

.plan .btn { margin-top: auto; }

.tbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px dashed var(--warn);
  border-radius: var(--radius);
  padding: 2px 7px;
  display: inline-block;
}

/* ---------- callout ---------- */

.callout {
  border-left: 3px solid var(--warn);
  background: var(--surface-2);
  padding: 18px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
  font-size: 14.5px;
  max-width: var(--measure);
}

.callout strong { color: var(--ink); }

/* ---------- cta ---------- */

.cta { text-align: left; }
.cta .btn-row { margin-top: 26px; }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 40px 52px;
  font-size: 14px;
  color: var(--muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 30px;
  margin-bottom: 32px;
}

.foot-grid h4 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 400;
  margin-bottom: 12px;
}

.foot-grid ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--brand); }

.foot-bar {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--faint);
}

.weight { color: var(--muted); }
.weight b { color: var(--brand); font-weight: 400; }

/* ---------- skip link ----------
   Added after a UX audit: six nav links on every page is enough to warrant one. */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  padding: 13px 20px;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

/* compact button for the persistent header call to action */

.btn-sm { min-height: 40px; padding: 0 15px; font-size: 14px; }

@media (max-width: 720px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 9px; font-size: 14.5px; }
}

/* ---------- theme toggle ----------
   Dark mode follows the OS by default. This lets a visitor override it, and the
   choice is remembered. The icon is state-independent on purpose, because a sun/moon
   swap has to answer "does it show the current state or the action?", and the
   aria-label answers it instead. */

.theme-toggle {
  display: none; /* needs JS to do anything; .js shows it */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-2);
  background: var(--surface-2);
}

.theme-toggle svg { display: block; }
.js .theme-toggle { display: inline-flex; }

/* Brand steps down on narrow screens so the header does not eat the viewport.
   the header is sticky, so its height is a permanent cost on every scroll. */

@media (max-width: 560px) {
  .brand svg { width: 34px; height: 34px; }
  .brand-name { font-size: 24px; }
  .site-head .wrap { padding-block: 14px; }
  .fleet-name { white-space: normal; }
}

/* ---------- tables on a phone ----------
   Two-column "term / meaning" tables stack rather than scroll sideways. */

@media (max-width: 600px) {
  .table-scroll thead { position: absolute; left: -9999px; }
  .table-scroll tr, .table-scroll td { display: block; }
  .table-scroll td { border-bottom: 0; padding: 4px 16px; }
  .table-scroll td:first-child { padding-top: 14px; }
  .table-scroll td:last-child { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
  .table-scroll tr:last-child td:last-child { border-bottom: 0; }
}

/* ---------- tap targets on a phone ----------
   Footer and card links are one line of small text, about 20px tall, well under the
   44px a thumb needs. Padding grows the hit area without moving the text much. */

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .foot-grid h4 { margin-bottom: 4px; }
  .foot-grid ul { gap: 0; }
  .foot-grid a { display: inline-block; padding-block: 11px; }
  .tile-link a { display: inline-block; padding-block: 11px; }
}

/* ---------- collapsible menu ----------
   Below 960px the six links and the call to action folded the sticky header
   into two rows, a permanent cost on every scroll. With JS the links collapse
   behind a Menu button; without it the header wraps as before. */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover { border-color: var(--ink-2); background: var(--surface-2); }
.nav-toggle svg { display: block; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-close { display: block; }
.nav-open .nav-toggle .i-menu { display: none; }

@media (max-width: 959px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    order: 10;
    flex-basis: 100%;
    gap: 0;
    margin-top: 6px;
    padding: 6px 0 12px;
    border-top: 1px solid var(--line-soft);
  }
  .js .nav-open .nav a:not(.btn) { padding: 12px 10px; font-size: 16px; }
  .js .nav-open .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
  .js .nav-open .nav .btn { margin: 10px 0 0; }
}
