/* samiullah.app — "accountant's ledger": paper + ink, one green accent, amber only for
   numbers that are still moving. Type scale ~1.25 (minor third-ish), 8px spacing grid. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6f6f3;
  --sheet: #ffffff;
  --ink: #16181d;
  --ink-2: #3b404a;
  --muted: #5b616e;
  --rule: #dcdcd5;
  --rule-strong: #b9b9b0;
  --accent: #1f4d3a;
  --accent-ink: #ffffff;
  --accent-soft: #e4eee8;
  --moving: #9a5b00;          /* still-moving numbers only */
  --moving-soft: #f6ead6;
  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: clamp(2.441rem, 1.6rem + 3.6vw, 3.815rem);
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111316;
    --sheet: #171a1e;
    --ink: #eceee9;
    --ink-2: #c9ccc6;
    --muted: #9da3ad;
    --rule: #2a2e35;
    --rule-strong: #3b414b;
    --accent: #8fd0ae;
    --accent-ink: #0f1a14;
    --accent-soft: #1b2a22;
    --moving: #e2ad5a;
    --moving-soft: #2b2316;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 48rem) { .wrap { padding: 0 32px; } }

/* --- header ------------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 1.125rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 12px; height: 12px; background: var(--accent); display: inline-block; }
.site-header nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: var(--step--1); padding: 6px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* --- type ----------------------------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: var(--step-5); line-height: 1.04; margin: 0 0 24px; max-width: 18ch; }
h2 { font-size: var(--step-3); line-height: 1.15; margin: 0 0 16px; }
h3 { font-size: var(--step-1); line-height: 1.3; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 16px; max-width: 64ch; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.eyebrow { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
em { font-family: var(--serif); font-style: italic; font-size: 1.05em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }

/* --- sections ------------------------------------------------------------------------------- */
.section { padding: 56px 0; border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
@media (min-width: 48rem) { .section { padding: 88px 0; } }
.hero { padding: 64px 0 56px; }
@media (min-width: 48rem) { .hero { padding: 104px 0 88px; } }
.hero h1 { max-width: 15ch; }
.hero-text { max-width: 52rem; }
.hero-ledger { margin: 56px 0 0; }
@media (min-width: 60rem) { .hero-ledger { margin-top: 72px; margin-left: 12%; } }
.ledger .why { min-width: 16rem; }
.split { display: grid; gap: 32px; }
@media (min-width: 60rem) { .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
/* break the split rhythm: one wide statement, explanation offset beneath */
.statement { font-size: var(--step-4); max-width: 20ch; margin-bottom: 32px; }
@media (min-width: 60rem) { .offset { margin-left: 41.66%; } }
/* closing line: the email itself is the large element, ledger-style rule above */
.closing { border-top: 1px solid var(--rule-strong); }
.closing-row { display: grid; gap: 24px; align-items: end; }
@media (min-width: 60rem) { .closing-row { grid-template-columns: 1fr auto; gap: 64px; } }
.closing-mail { font: 500 var(--step-3)/1.1 var(--serif); color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; justify-self: start; overflow-wrap: anywhere; }
.closing-mail:hover { border-bottom-width: 2px; }
.page-head { padding: 56px 0 24px; }
@media (min-width: 48rem) { .page-head { padding: 88px 0 32px; } }

/* --- actions ---------------------------------------------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 32px; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 12px 20px; font-weight: 600; border-radius: 2px; }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " \2192"; }

/* --- the ledger (signature) ------------------------------------------------------------------ */
.ledger { background: var(--sheet); border: 1px solid var(--rule-strong); }
.ledger-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--rule-strong); font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ledger table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.ledger th { text-align: left; font: 600 0.72rem/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.ledger td { padding: 14px 20px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .when { white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: 0.85em; }
.ledger .delta { white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ledger .why { color: var(--ink-2); }
.ledger-foot { padding: 12px 20px; border-top: 1px solid var(--rule-strong); font-size: 0.8rem; color: var(--muted); }
.status { display: inline-block; font: 600 0.72rem/1.6 var(--sans); letter-spacing: 0.04em; padding: 0 8px; border: 1px solid currentColor; border-radius: 2px; white-space: nowrap; }
.status.ok { color: var(--accent); }
.status.moving { color: var(--moving); }
@media (max-width: 44rem) {
  .ledger thead { display: none; }
  .ledger tr { display: block; padding: 14px 20px; border-bottom: 1px solid var(--rule); }
  .ledger tr:last-child { border-bottom: 0; }
  .ledger td { display: block; padding: 2px 0; border: 0; }
  .ledger .when { margin-bottom: 4px; }
}

/* "still moving" figures: dotted amber underline + label */
.moving-num { border-bottom: 2px dotted var(--moving); padding-bottom: 1px; }
.moving-note { background: var(--moving-soft); border-left: 3px solid var(--moving); padding: 16px 20px; max-width: 64ch; }
.moving-note p:last-child { margin-bottom: 0; }

/* --- numbered list (services, commitments) ----------------------------------------------------- */
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; border-top: 1px solid var(--rule-strong); }
.numbered > li { counter-increment: n; display: grid; grid-template-columns: 3rem 1fr; gap: 8px 16px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.numbered > li::before { content: counter(n, decimal-leading-zero); font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 6px; }
@media (min-width: 60rem) {
  .numbered.wide > li { grid-template-columns: 3rem 2fr 3fr 1fr; align-items: baseline; }
  .numbered.wide > li > .price { text-align: right; }
}
.numbered p { margin-bottom: 8px; }
.price { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- pricing table ------------------------------------------------------------------------------ */
.price-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-strong); }
.price-table th, .price-table td { text-align: left; padding: 24px 16px 24px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.price-table th { font: 500 var(--step-1)/1.3 var(--serif); width: 30%; }
.price-table td.amount { font: 500 var(--step-2)/1.2 var(--serif); white-space: nowrap; width: 22%; }
.price-table td.amount small { display: block; font: 400 0.8rem/1.4 var(--sans); color: var(--muted); margin-top: 6px; }
@media (max-width: 44rem) {
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: auto; }
  .price-table tr { padding: 20px 0; border-bottom: 1px solid var(--rule); }
  .price-table th, .price-table td { border: 0; padding: 2px 0; }
}

/* --- prose pages (privacy, terms) ---------------------------------------------------------------- */
.prose { max-width: 68ch; padding-bottom: 88px; }
.prose h2 { font-size: var(--step-2); margin-top: 48px; }
.prose h3 { margin-top: 32px; }
.prose ul { padding-left: 1.2rem; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 24px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

mark.pending { background: var(--moving-soft); color: var(--moving); font: 600 0.8em var(--mono); padding: 0 4px; }

/* --- footer ------------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule-strong); padding: 48px 0 56px; font-size: var(--step--1); color: var(--ink-2); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid .legal { grid-column: 1 / -1; } }
.footer-name { font: 600 1.05rem/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }
.site-footer p { margin-bottom: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.site-footer nav a { color: var(--ink-2); }
.legal { color: var(--muted); font-size: 0.78rem; max-width: 80ch; margin-top: 8px; }

@media (prefers-reduced-motion: no-preference) { a, .button { transition: color 120ms, filter 120ms, text-decoration-thickness 120ms; } }
