*, *::before, *::after { box-sizing: border-box; }
/* The `hidden` attribute must always win. Component classes that set an explicit
   `display` (e.g. `.cx-pay { display: flex }`, `.sx-btn { display: inline-flex }`)
   otherwise override the UA `[hidden] { display: none }` rule, leaking elements
   that JS has toggled hidden (empty "Pay now", "Open deliverables folder", …). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(0.8rem, 2vw, 1.1rem) clamp(1.2rem, 5vw, 3rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.brand-name { font-size: 1.05rem; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; align-self: flex-end; margin-bottom: 3px; }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: var(--step--1); }
.site-nav a { text-decoration: none; color: var(--text-muted); transition: color 0.2s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* ---- section rhythm ---- */
.section { padding-block: clamp(3.5rem, 9vw, 7rem); border-top: 1px solid var(--border-soft); }
.section-inner { width: min(100% - 2 * clamp(1.2rem, 5vw, 3rem), var(--maxw)); margin-inline: auto; }
.eyebrow { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; color: var(--accent); margin: 0 0 var(--space-4); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.01em; font-weight: 400; margin: 0; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-4); }
.lead { font-size: var(--step-1); color: var(--text-muted); max-width: var(--maxw-prose); }

/* ---- buttons / links ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.7rem 1.15rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text-dim); }
.link-arrow { color: var(--accent); text-decoration: none; font-weight: 600; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--space-7); }
.footer-inner { width: min(100% - 2 * clamp(1.2rem, 5vw, 3rem), var(--maxw)); margin-inline: auto; padding-block: var(--space-7); display: grid; gap: var(--space-3); }
.footer-meta { color: var(--text-dim); font-size: var(--step--1); margin: 0; }
.footer-meta a { color: var(--text-muted); }
.brand--sm .brand-name { font-size: 0.95rem; }

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