/* SheetVan base styles: tokens, fonts, type, buttons, header and footer. Loaded on every page. */

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/*
 * Light-only palette: clean neutrals plus one accent, trade orange, used for primary buttons and soft tints.
 * Orange always carries dark text (6:1 contrast); orange words on a light background use --accent-text. Every text
 * colour passes 4.5:1 on every light background (test/client/contrast.test.ts). Status badges keep their own colours.
 * Shape rule: buttons 10px, panels and cards 20px, badges fully round.
 */
:root {
  color-scheme: light;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #fcfcfc;
  --surface: #fefefe;
  --surface-2: #f4f4f5;
  --text: #0f1115;
  --muted: #5d636b;
  --faint: #676d75;
  --line: #e6e6e9;
  --ink: #121417;
  --accent: #f26a1b;
  --accent-hover: #e25d10;
  --accent-text: #b5470b;
  --on-accent: #121417;
  --accent-soft: #fff3eb;
  --accent-tint: #ffe7d7;
  --accent-line: #fbdcc6;
  --ok: #17663f;
  --ok-soft: #e7f3ec;
  --warn: #8a4b08;
  --warn-soft: #fbf0d9;
  --error: #b42318;
  --error-soft: #fbe6e3;
  --shadow: 0 1px 2px rgb(15 17 21 / 0.04), 0 10px 30px rgb(15 17 21 / 0.06);

  --radius-control: 10px;
  --radius-panel: 20px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

/* In-page links (#how-it-works, #pricing, #faq) land below the sticky header. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.012em; }
p { margin: 0 0 1rem; }

a { color: var(--text); text-decoration-color: var(--faint); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--text); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

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

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 40rem; }
.muted { color: var(--muted); }
/* Keeps short units such as "$10/month" from breaking across lines. */
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: 0.75rem; z-index: 20;
  transform: translateY(-300%);
  padding: 0.5rem 0.9rem;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
}
.skip-link:focus { transform: none; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font: 650 1rem/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.08s ease;
}
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.button:active { transform: translateY(1px); }
.button--small { padding: 0.6rem 1rem; font-size: 0.95rem; }
.button--quiet { background: var(--surface-2); color: var(--text); }
.button--quiet:hover { background: #ebebed; color: var(--text); }

/* Header (z-index scale: header 10, skip link 20) */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.site-header--app .header-row { grid-template-columns: 1fr; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; justify-self: start;
  color: var(--text); text-decoration: none;
  font: 700 1.2rem/1 var(--font); letter-spacing: -0.03em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand-beta {
  margin-left: 0.15rem; padding-left: 0.65rem; border-left: 1px solid var(--line);
  color: var(--muted); font-size: 0.82rem; font-weight: 500; letter-spacing: 0;
}

/* Beta bar (marketing pages): slim, dark, not sticky, so it never covers content. */
.beta-bar { background: var(--ink); color: #d6d9dd; font-size: 0.88rem; }
.beta-bar-row { display: flex; align-items: center; justify-content: center; gap: 0.9rem; min-height: 38px; padding-top: 0.35rem; padding-bottom: 0.35rem; text-align: center; }
.beta-bar p { margin: 0; }
.beta-bar a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.beta-bar a:hover { text-decoration: underline; color: var(--accent); }
.site-nav { display: flex; gap: 2rem; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.97rem; font-weight: 500; }
.site-nav a:hover { color: var(--muted); }
.header-row > .button { justify-self: end; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.92rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.footer-nav a { color: var(--muted); white-space: nowrap; }
.footer-nav a:hover { color: var(--text); }
.footer-note { margin: 0; max-width: 46ch; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-row { grid-template-columns: 1fr auto; gap: 1rem; }
  .site-nav { display: none; }
  .beta-bar-more { display: none; }
  .variant-site .brand-beta { display: none; }
}
@media (max-width: 380px) {
  .site-header .button--small { padding: 0.5rem 0.75rem; font-size: 0.88rem; }
  .brand { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
