/* Invoicy site — shared base, header, footer and the legal/support pages.
   Static, no build step. Fonts are self-hosted (fonts.css). */

:root {
  --ink: #0b0d17;
  --ink-2: #141729;
  --ink-3: #1d2038;
  --line-d: rgba(237, 234, 247, 0.12);
  --text-d: #edeaf7;
  --muted-d: #a8a5c0;
  --paper: #f3ecde;
  --paper-2: #ebe2d0;
  --paper-ink: #1b1a24;
  --paper-muted: #5e5a52;
  --paper-line: #d9cfba;
  --lav: #a99bff;
  --lav-deep: #5d52c9;
  --amber: #ff7a45;
  --amber-deep: #e5602b;
  --mint: #7fe0b0;
  --radius: 18px;
  --max: 1160px;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-d);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lav); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #1b0f08; padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 23, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-d);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text-d); text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { color: var(--muted-d); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-d); }
.nav .btn { color: #1b0f08; }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .nav a[href="support.html"], .nav a[href="index.html"] { display: inline; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--amber); color: #1b0f08;
  padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1 var(--body); text-decoration: none;
  box-shadow: 0 8px 28px -8px rgba(255, 122, 69, 0.65), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); background: #ff8a59; box-shadow: 0 14px 34px -10px rgba(255, 122, 69, 0.75), inset 0 -2px 0 rgba(0, 0, 0, 0.12); }
.btn--lg { padding: 18px 30px; font-size: 18px; }
.btn--ghost { background: transparent; color: var(--text-d); box-shadow: inset 0 0 0 1.5px var(--line-d); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px rgba(237, 234, 247, 0.35); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn { white-space: nowrap; }
.btn:not(.btn--live) .apple { display: none; }
@media (max-width: 760px) { .nav .btn { padding: 10px 16px; font-size: 15px; } .nav { gap: 16px; } }

/* ---------- footer ---------- */
.site-footer { background: #080a12; border-top: 1px solid var(--line-d); padding: 56px 0 44px; color: var(--muted-d); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h2 { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); margin: 0 0 14px; padding: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--text-d); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line-d); padding-top: 22px; font-size: 13px; line-height: 1.7; }
.site-footer .brand { margin-bottom: 14px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---------- legal + support pages: a printed page on dark ---------- */
body.doc main { padding: 56px 0 96px; }
.doc .sheet {
  max-width: 820px; margin: 0 auto;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 6px 6px 22px 22px;
  padding: 56px clamp(22px, 5vw, 64px) 64px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
}
.doc .sheet::before { /* perforated pad edge */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 14px;
  background: radial-gradient(circle at 10px 0, var(--ink) 6px, transparent 7px) 0 0 / 20px 14px repeat-x;
}
.doc .sheet a { color: var(--lav-deep); }
.doc .eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-deep); margin: 0 0 16px; }
.doc h1 { font: 800 clamp(34px, 5vw, 52px)/1.04 var(--display); letter-spacing: -0.03em; margin: 0 0 12px; }
.doc h2 { font: 700 24px/1.2 var(--display); letter-spacing: -0.015em; margin: 44px 0 12px; padding-top: 22px; border-top: 1.5px dashed var(--paper-line); }
.doc h3 { font: 700 18px/1.3 var(--display); margin: 26px 0 6px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .meta { font: 400 13px/1.5 var(--mono); color: var(--paper-muted); margin-bottom: 26px; }
.doc .lead { font-size: 19px; color: var(--paper-muted); }
.doc .card { background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: 14px; padding: 18px 22px; margin: 20px 0; }
.doc .card.note { background: #e8e2fb; border-color: #cfc6f4; }
.doc .card h3:first-child, .doc .card p:last-child { margin-top: 0; margin-bottom: 0; }
.doc .toc { columns: 2; column-gap: 28px; padding-left: 20px; font-size: 15px; }
.doc .toc li { break-inside: avoid; }
.doc .table-wrap { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--paper-line); border-radius: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fbf7ee; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--paper-line); }
.doc th { font-weight: 700; white-space: nowrap; background: var(--paper-2); }
.doc tr:last-child td { border-bottom: 0; }
.doc details { background: #fbf7ee; border: 1px solid var(--paper-line); border-radius: 14px; padding: 4px 20px; margin: 10px 0; }
.doc summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--amber-deep); }
.doc details[open] summary::after { content: "–"; }
.doc details[open] summary { padding-bottom: 6px; }
.doc details p { color: var(--paper-muted); }
@media (max-width: 560px) { .doc .toc { columns: 1; } .doc .sheet { padding-top: 44px; } }
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer { display: none; }
  .doc .sheet { box-shadow: none; padding: 0; background: #fff; }
}
