/* =============================================
   Skip-to-content link (WCAG 2.4.1 — Level A)
   ============================================= */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 9999;
  background: var(--zb-cta-fill);
  color: var(--zb-cta-text);
  padding: 0.75rem 1.5rem;
  font-family: var(--zb-font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  outline: 3px solid var(--zb-cta-text);
  outline-offset: -3px;
}

/* Screen-reader-only utility — visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Design-bearing seed stylesheet (#969; de-branded #1936).
 *
 * The :root block below defines the canonical `--zb-*` CSS custom
 * properties shared with the website-build lane — the SAME names the
 * #967 editorial guardrail block and the #968 photo-derived palette
 * emit, so the seed and the build brief never drift. Only the NAMES are
 * shared; the values here are placeholders.
 *
 * ## These values are a neutral SCAFFOLD, never a brand (#1936)
 *
 * Until #1936 this block inlined the ZenBusiness brand defaults —
 * Signature Black ink/canvas, a Growth Green CTA, Montserrat/Inter. That
 * made ZenBusiness's own look the literal starting point of every
 * founder's website, and the resting state of any site whose build
 * produced no palette of its own. A founder's site, zenbusiness.com, and
 * zenbiz.com must never blur into each other.
 *
 * What is here now is a deliberately quiet, un-branded graphite-and-clay
 * scaffold in system typefaces: enough to make the placeholder page
 * legible and presentable, specific to nobody. It is REPLACED, not
 * extended, on the first real build — `sites.commission_build` always
 * appends a palette block carrying the business's own theme kit
 * (`@fabric/ui/site-theme-kits`), tinted by its hero photo when there is
 * one, and instructs the agent to supersede this `:root`.
 *
 * Two rules for anyone editing this file:
 *   1. Never reintroduce a ZenBusiness brand value here — not Signature
 *      Black (#111112), Growth Green (#33F28B), Horizon Blue (#3971E7),
 *      Montserrat, or Inter. `packages/server/src/__tests__/invariants/
 *      founder-site-brand.test.ts` fails the build if you do.
 *   2. Keep it neutral. Making the scaffold *prettier* by giving it a
 *      real personality would just recreate the original bug with a
 *      different palette — every founder site would start life looking
 *      like the same non-ZenBusiness template.
 *
 * Every pairing below still clears WCAG AA 4.5:1: ink on canvas ≈14.4:1,
 * ink on the section tint ≈13.4:1, accent-text on surface ≈10.0:1,
 * secondary on canvas ≈5.7:1, and the CTA (canvas-on-ink) ≈14.4:1.
 * These are computed in-test, not eyeballed — see the seed block of
 * `packages/server/src/__tests__/invariants/founder-site-brand.test.ts`.
 */
:root {
  /* Slatework palette — Wightman Inspection Group */
  --zb-color-ink: #1C2126;
  --zb-color-canvas: #F6F7F8;
  --zb-color-surface: #FFFFFF;
  --zb-color-accent: #2E5266;
  --zb-color-accent-text: #2E5266;
  --zb-color-secondary: #8A5836;
  --zb-color-section-tint: #E9EBED;
  --zb-color-border: #D7DBDF;
  --zb-cta-fill: #2E5266;
  --zb-cta-text: #FFFFFF;
  --zb-font-headline: 'Sora', sans-serif;
  --zb-font-body: 'IBM Plex Sans', sans-serif;

  --zb-space-1: 0.5rem;
  --zb-space-2: 1rem;
  --zb-space-3: 2rem;
  --zb-space-4: 4rem;
  --zb-radius: 0.75rem;
  --zb-maxw: 64rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--zb-color-canvas);
  color: var(--zb-color-ink);
  font-family: var(--zb-font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--zb-font-headline);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--zb-space-2);
}

h1 {
  font-weight: 800; /* ExtraBold — reserved for the single <h1> */
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

h2 {
  font-weight: 700; /* Bold */
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-weight: 600; /* SemiBold */
  font-size: 1.25rem;
}

p {
  margin: 0 0 var(--zb-space-2);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--zb-color-accent-text);
}

/* Mobile-first layout primitives ----------------------------------- */

.container {
  width: 100%;
  max-width: var(--zb-maxw);
  margin: 0 auto;
  padding: 0 var(--zb-space-3);
}

.section {
  padding: var(--zb-space-4) 0;
}

.eyebrow {
  font-family: var(--zb-font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  color: var(--zb-color-accent-text);
  margin: 0 0 var(--zb-space-1);
}

/* Call to action — always the two CTA vars, never a literal color. The
   pairing they resolve to is chosen per business (and contrast-checked)
   by the build's palette block; this file only decides that the button
   uses them. */
.cta-button {
  display: inline-block;
  background: var(--zb-cta-fill);
  color: var(--zb-cta-text);
  font-family: var(--zb-font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.875rem 2rem;
  border-radius: var(--zb-radius);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  filter: brightness(0.95);
}

.cta-button:focus {
  filter: brightness(0.95);
  outline: 2px solid var(--zb-cta-text);
  outline-offset: 2px;
}

/* Hero — full-viewport. The placeholder background is an INK field with
   a soft neutral highlight for depth, so it re-tints automatically with
   whatever `:root` the first real build emits; the agent swaps in a
   manifest photo.

   The second gradient stop is deliberately ink, NOT the accent. The
   accent is a mid-lightness fill by construction, so canvas-colored hero
   text over an accent stop lands at ~2.3:1 with a saturated kit accent
   (Marigold's #E08E1D) — the same class of defect as the old
   accent-colored links on the ink bar. Canvas-on-ink is the one pairing
   every theme kit guarantees, so the field stays in ink and the
   translucent white does the shaping. */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(160deg, var(--zb-color-ink), var(--zb-color-ink));
  color: var(--zb-color-canvas);
}

#hero h1 {
  max-width: 18ch;
}

#hero .sub {
  font-size: 1.125rem;
  max-width: 46ch;
  color: var(--zb-color-canvas);
  margin-bottom: var(--zb-space-3);
}

/* About — two columns; the left column is a real <img> slot. */
#about {
  background: var(--zb-color-surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
  align-items: center;
}

.about-grid img {
  width: 100%;
  border-radius: var(--zb-radius);
  background: var(--zb-color-section-tint);
}

/* Features — responsive card grid. */
#features {
  background: var(--zb-color-section-tint);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
}

.card {
  background: var(--zb-color-surface);
  border: 1px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  padding: var(--zb-space-3);
}

.card h3 {
  color: var(--zb-color-ink);
}

/* Closing CTA. */
#cta {
  background: var(--zb-color-ink);
  color: var(--zb-color-surface);
  text-align: center;
}

#cta h2 {
  color: var(--zb-color-surface);
}

#cta .sub {
  color: var(--zb-color-canvas);
  max-width: 44ch;
  margin: 0 auto var(--zb-space-3);
}

/* Footer + photographer-attribution slot. */
#footer {
  background: var(--zb-color-ink);
  color: var(--zb-color-canvas);
  padding: var(--zb-space-3) 0;
  font-size: 0.875rem;
}

/* Links on the ink bar are the CANVAS color, not the accent (#1936).
   The accent is a mid-lightness FILL; as text on the ink background it
   clears 4.5:1 for almost no palette — it only ever looked fine because
   the old ZenBusiness default happened to pair a very bright green with
   a near-black ink (~12.8:1). Across the theme kits the same rule lands
   at 1.9–3.4:1. Canvas-on-ink is the pairing that holds for every
   palette, in both polarities, because the kit guarantees it. */
#footer a {
  color: var(--zb-color-canvas);
  text-decoration: underline;
}

/* De-emphasized via opacity on the inherited footer color rather than a
   literal grey: the footer text color flips with the palette (a dark
   theme kit inverts ink and surface), and a baked-in grey that reads as
   "quiet" on one polarity reads as illegible on the other. */
.attribution {
  margin-top: var(--zb-space-2);
  opacity: 0.75;
  font-size: 0.8125rem;
}

/* Shared site header — the SAME markup ships on the homepage AND on
   blog/index.html (and on every page added later) so the whole site
   reads as one website. White bar with navy text throughout. */
.site-nav {
  background: var(--zb-color-surface);
  color: var(--zb-color-ink);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Wrap rather than overflow — see .site-nav__links for how the link
     group takes its own row below the md breakpoint. */
  flex-wrap: wrap;
  gap: var(--zb-space-1) var(--zb-space-2);
  padding-top: var(--zb-space-2);
  padding-bottom: var(--zb-space-2);
}

.site-nav__brand {
  font-family: var(--zb-font-headline);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--zb-color-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-nav__brand img {
  display: block;
  height: 40px;
  width: auto;
}

/* Mobile-first: the link group takes a full row of its own, UNDER the
   brand. `flex-basis: 100%` is what actually forces that — relying on
   `flex-wrap` alone would let the group shrink to its narrowest link and
   stay beside the brand, stacking the links into a tall column next to it
   instead of dropping below it. The inner `flex-wrap: wrap` then only
   handles a link set too long for one row. */
.site-nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-basis: 100%;
  gap: var(--zb-space-1) var(--zb-space-2);
}

/* Desktop — md (900px): there is room beside the brand, so the group
   sits inline and takes the roomier gap. */
@media (min-width: 900px) {
  .site-nav__links {
    flex-basis: auto;
    gap: var(--zb-space-3);
  }
}

.site-nav__link {
  font-family: var(--zb-font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--zb-color-accent);
  text-decoration: none;
}

/* Hover: light blue (#2473B7) — 4.9:1 on white, passes WCAG AA */
.site-nav__link:hover {
  color: #2473B7;
  text-decoration: underline;
}

/* Keyboard focus indicator — outline for clear focus visibility (WCAG 2.4.7) */
.site-nav__link:focus {
  color: #2473B7;
  text-decoration: underline;
  outline: 2px solid var(--zb-color-accent);
  outline-offset: 2px;
}

.site-nav__link--active {
  color: var(--zb-color-accent);
  text-decoration: underline;
}

/* Blog index — a light content page. The empty state holds the route
   until the founder loop publishes the first cornerstone articles. */
.blog-index {
  background: var(--zb-color-surface);
  min-height: 60vh;
}

.blog-empty {
  margin-top: var(--zb-space-3);
  padding: var(--zb-space-4) var(--zb-space-3);
  background: var(--zb-color-section-tint);
  border: 1px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  text-align: center;
}

.blog-empty h2 {
  color: var(--zb-color-ink);
  margin-bottom: var(--zb-space-1);
}

.blog-empty p {
  max-width: 42ch;
  margin: 0 auto;
  color: var(--zb-color-ink);
}

/* Desktop — md (900px) boundary, matching the @fabric/ui breakpoint. */
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Blog card grid: max two columns so wider cards read more comfortably. */
  .blog-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Blog index — card variant for post listings. */
.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--zb-space-1);
}

.blog-card h2 a {
  color: var(--zb-color-ink);
  text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus {
  color: var(--zb-color-accent-text);
  text-decoration: underline;
}

.blog-card p {
  flex: 1;
  font-size: 0.9375rem;
  margin-bottom: var(--zb-space-2);
}

.blog-card__link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--zb-color-accent-text);
  text-decoration: none;
  margin-top: auto;
}

.blog-card__link:hover,
.blog-card__link:focus {
  text-decoration: underline;
}

/* Footer inner layout — shared across pages that load styles.css. */
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-2);
}

@media (min-width: 700px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: var(--zb-space-1);
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--zb-color-canvas);
}

.footer-nav a:hover,
.footer-nav a:focus {
  text-decoration: underline;
}
