/*
 * 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 {
  /* Margin brand palette: paper/graphite/sodium */
  --zb-color-ink: #14161b;
  --zb-color-canvas: #faf8f4;
  --zb-color-surface: #ffffff;
  --zb-color-accent: #ff9a2e;
  --zb-color-accent-text: #a8530a;
  --zb-color-secondary: #7a4010;
  --zb-color-section-tint: #f0ece3;
  --zb-color-border: #e4ddd0;
  --zb-cta-fill: #ff9a2e;
  --zb-cta-text: #14161b;
  --zb-font-headline: 'IBM Plex Sans Condensed', 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,
.cta-button:focus {
  filter: brightness(0.95);
}

/* 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. Dark ink bar that blends into the hero's dark
   gradient on the homepage; on the light blog page it reads as a
   branded header. */
.site-nav {
  background: var(--zb-color-ink);
  color: var(--zb-color-surface);
}

.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-surface);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Logo image in the nav — max-height: 48px per brief; height: auto lets
   the browser scale from the natural aspect ratio rather than pinning a
   fixed render height.  width: auto preserves the 3:2 ratio. */
.site-nav__brand img {
  max-height: 48px;
  height: auto;
  width: auto;
  display: block;
}

/* 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-canvas);
  text-decoration: none;
}

/* Hover/active state without a hue swap. Same reason as `#footer a`:
   the accent is not legible as text on the ink bar for most palettes.
   Underline + full-strength canvas reads as state in every palette and
   does not depend on color alone. */
.site-nav__link:hover,
.site-nav__link:focus {
  text-decoration: underline;
}

.site-nav__link--active {
  color: var(--zb-color-surface);
  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);
}

/* Blog post card grid: displayed on the blog index when posts exist. */
.blog-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
  margin-top: var(--zb-space-3);
}

.blog-card {
  background: var(--zb-color-surface);
  border: 1px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  padding: var(--zb-space-3);
  text-decoration: none;
  color: var(--zb-color-ink);
  display: flex;
  flex-direction: column;
  gap: var(--zb-space-1);
  transition: box-shadow 0.15s;
}

.blog-card:hover,
.blog-card:focus {
  box-shadow: 0 4px 16px rgba(16, 36, 46, 0.1);
  text-decoration: none;
  color: var(--zb-color-ink);
}

.blog-card__title {
  font-family: var(--zb-font-headline);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--zb-color-ink);
  margin: 0;
}

.blog-card__blurb {
  font-size: 0.9375rem;
  color: var(--zb-color-ink);
  line-height: 1.6;
  margin: 0;
  opacity: 0.85;
}

.blog-card__cta {
  font-family: var(--zb-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--zb-color-accent-text);
  margin-top: auto;
  padding-top: var(--zb-space-1);
}

/* Blog post article layout */
.post-hero {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.post-content {
  background: var(--zb-color-surface);
  padding: var(--zb-space-4) 0;
}

.post-content .container {
  max-width: 42rem;
}

.post-content h2 {
  font-size: clamp(1.35rem, 3vw, 1.875rem);
  margin-top: var(--zb-space-4);
  margin-bottom: var(--zb-space-2);
}

.post-content h2:first-of-type {
  margin-top: 0;
}

.post-content p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--zb-color-ink);
}

.post-header-band {
  background: var(--zb-color-section-tint);
  padding: var(--zb-space-4) 0 var(--zb-space-3);
}

.post-header-band .container {
  max-width: 42rem;
}

.post-header-band h1 {
  color: var(--zb-color-ink);
  margin-bottom: var(--zb-space-2);
}

.post-meta {
  font-family: var(--zb-font-body);
  font-size: 0.875rem;
  color: var(--zb-color-accent-text);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 var(--zb-space-1);
}

/* 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 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   CONTENT PAGE HERO: shorter than the homepage hero.
   Used on approach, how-it-works, who-its-for, about.
   The page-specific background-image is set inline on the element.
   ============================================================ */
.page-hero {
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  color: var(--zb-color-canvas);
}

.page-hero .container {
  padding-top: var(--zb-space-4);
  padding-bottom: var(--zb-space-4);
}

.page-hero h1 {
  color: var(--zb-color-canvas);
  max-width: 22ch;
  margin-bottom: var(--zb-space-2);
}

.page-hero .sub {
  font-size: 1.125rem;
  max-width: 46ch;
  color: rgba(250, 248, 244, 0.88);
  line-height: 1.65;
  margin-bottom: 0;
}

/* Plain ink hero: no photo. Used on Pricing. */
.page-hero--plain {
  background: var(--zb-color-ink);
  color: var(--zb-color-canvas);
}

/* ============================================================
   PROSE SECTIONS: light content bands for long-form copy.
   ============================================================ */
.prose-section {
  background: var(--zb-color-surface);
}

.prose-section--tint {
  background: var(--zb-color-section-tint);
}

.prose-section--ink {
  background: var(--zb-color-ink);
  color: var(--zb-color-canvas);
}

.prose-section--ink h2 {
  color: var(--zb-color-canvas);
}

.prose-section--ink p,
.prose-section--ink li {
  color: rgba(244, 250, 251, 0.88);
}

.prose {
  max-width: 70ch;
}

.prose h2 {
  margin-top: var(--zb-space-3);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--zb-color-accent-text);
}

/* ============================================================
   STEP LIST: numbered steps for How It Works.
   ============================================================ */
.step-list {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
}

.step-item {
  counter-increment: step;
  background: var(--zb-color-surface);
  border: 1px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  padding: var(--zb-space-3);
  padding-top: calc(var(--zb-space-3) + 0.25rem);
  position: relative;
}

.step-item::before {
  content: counter(step);
  display: block;
  font-family: var(--zb-font-headline);
  font-weight: 800;
  font-size: 2rem;
  color: var(--zb-color-accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step-item h3 {
  color: var(--zb-color-ink);
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: 0.9375rem;
  color: var(--zb-color-ink);
  margin-bottom: 0;
}

/* ============================================================
   SPLIT GRID: For / Not-for lists on Who It's For.
   ============================================================ */
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  padding: 0.625rem 0 0.625rem 2.25rem;
  position: relative;
  border-bottom: 1px solid var(--zb-color-border);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.check-list li:last-child {
  border-bottom: none;
}

.check-list--for li::before {
  content: "\2713"; /* checkmark */
  position: absolute;
  left: 0;
  top: 0.625rem;
  color: var(--zb-color-accent);
  font-weight: 700;
  font-size: 1rem;
}

.check-list--not li::before {
  content: "\00D7"; /* multiplication sign = cross */
  position: absolute;
  left: 0;
  top: 0.625rem;
  color: var(--zb-color-secondary);
  font-weight: 700;
  font-size: 1rem;
}

/* ============================================================
   PRICING CARDS: dedicated /pricing/ page.
   ============================================================ */
.pricing-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--zb-space-3);
  max-width: 44rem;
}

.pricing-page-card {
  position: relative;
  background: var(--zb-color-canvas);
  border: 2px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  padding: var(--zb-space-3);
}

.pricing-page-card--featured {
  border-color: var(--zb-color-accent);
}

.pricing-page-badge {
  position: absolute;
  top: -0.75rem;
  left: var(--zb-space-3);
  background: var(--zb-color-accent);
  color: var(--zb-cta-text);
  font-family: var(--zb-font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.9rem;
  border-radius: 99px;
  white-space: nowrap;
}

.pricing-page-card h3 {
  color: var(--zb-color-ink);
  margin-bottom: 0.375rem;
}

.pricing-page-amount {
  font-family: var(--zb-font-headline);
  font-weight: 800;
  font-size: 3rem;
  color: var(--zb-color-ink);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-page-period {
  font-size: 0.9375rem;
  color: var(--zb-color-accent-text);
  margin-bottom: var(--zb-space-2);
}

.pricing-page-desc {
  font-size: 0.9375rem;
  color: var(--zb-color-ink);
  line-height: 1.55;
  margin-bottom: var(--zb-space-3);
}

.pricing-page-features {
  list-style: none;
  margin: 0 0 var(--zb-space-3);
  padding: 0;
}

.pricing-page-features li {
  padding: 0.375rem 0 0.375rem 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--zb-color-ink);
  border-bottom: 1px solid var(--zb-color-border);
}

.pricing-page-features li:last-child {
  border-bottom: none;
}

.pricing-page-features li::before {
  content: "\2013"; /* en-dash */
  position: absolute;
  left: 0;
  color: var(--zb-color-accent);
}

/* ============================================================
   CLOSING CTA BAND: ink background, centred.
   ============================================================ */
.closing-cta {
  background: var(--zb-color-ink);
  color: var(--zb-color-canvas);
  text-align: center;
}

.closing-cta h2 {
  color: var(--zb-color-canvas);
  max-width: 24ch;
  margin: 0 auto var(--zb-space-2);
}

.closing-cta .sub {
  color: rgba(244, 250, 251, 0.82);
  max-width: 44ch;
  margin: 0 auto var(--zb-space-3);
}

/* ============================================================
   LAUNCHING SOON BANNER: fixed; spans every page
   Background: paper-raised #f1ede5; text: graphite #14161b;
   border: subtle 1px paper-rule bottom.
   ============================================================ */
.launch-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: #f1ede5;
  color: #14161b;
  border-bottom: 1px solid rgba(20, 22, 27, 0.18);
  text-align: center;
  padding: 0.625rem 1rem;
  font-family: var(--zb-font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

.launch-banner__link {
  color: #14161b;
  font-weight: 600;
  text-decoration: underline;
}

.launch-banner__link:hover,
.launch-banner__link:focus {
  opacity: 0.75;
}

/* ============================================================
   WAITLIST CTA MODIFIER: sodium #ff9a2e fill, graphite text.
   Applied alongside .cta-button on waitlist action buttons.
   ============================================================ */
.cta-button--waitlist {
  background: #ff9a2e;
  color: #14161b;
}

.cta-button--waitlist:hover,
.cta-button--waitlist:focus {
  color: #14161b;
  filter: brightness(0.93);
}

/* ============================================================
   WAITLIST PAGE: form and content layout
   ============================================================ */
.waitlist-section {
  background: var(--zb-color-surface);
}

.waitlist-intro {
  max-width: 50ch;
  color: var(--zb-color-ink);
  margin-bottom: var(--zb-space-3);
}

.waitlist-form-wrap {
  background: var(--zb-color-canvas);
  border: 1px solid var(--zb-color-border);
  border-radius: var(--zb-radius);
  padding: var(--zb-space-3);
  max-width: 34rem;
}

/* ============================================================
   DESKTOP OVERRIDES for new layout patterns.
   ============================================================ */
@media (min-width: 720px) {
  .step-list {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-page-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .split-grid {
    grid-template-columns: 1fr 1fr;
  }
}
