/* ============================================================================
   site.css — consolidated stylesheet for the IndigoPress public site.

   Single source of truth for /, /demo/, /contact/, /contact/thanks.html,
   /partners/, /terms/, /privacy/, and /hq/claim/. The HQ admin UI lives in
   /hq/admin/assets/admin.css and is intentionally NOT bundled here — admin
   is a different visual context.

   Structure: tokens → base → variants → header → buttons → hero →
   sections → homepage components → forms → claim → policy → footer →
   responsive.
   ============================================================================ */

/* ── TOKENS ───────────────────────────────────────────────────────────────── */
:root {
  --ink:    #162456;
  --ink-2:  #4b5563;
  --line:   #e5e9f2;
  --bg:     #ffffff;
  --bg-2:   #f6f8fc;
  --indigo:         #6140AC;
  --indigo-d:       #4C1C98;
  --indigo-accent:  #5729A6;
  --indigo-light:   #A78BFA;
  --red:    #dc2626;

  /* Background gradient stops for <pre> code blocks. */
  --code-bg-top: #4C1C98;
  --code-bg-bot: #6D28D9;

  /* Type scale — 21px floor. */
  --fs-base:    21px;
  --fs-md:      24px;
  --fs-lg:      28px;
  --fs-section: 40px;
  --fs-xl:      56px;
}

/* ── BASE ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER + BRAND + NAV ─────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(180deg, #2d0f6b 0%, #1a0744 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.brand a { color: inherit; -webkit-text-fill-color: inherit; text-decoration: none; }
.brand .dot {
  background: linear-gradient(180deg, #A78BFA 0%, #6D28D9 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
nav.top a {
  color: var(--ink-2);
  margin-left: 22px;
  font-size: var(--fs-base);
  font-weight: 500;
}
nav.top a:hover { color: var(--indigo); text-decoration: none; }

/* CTA link in the top nav — used for "Partner with us". The ::before
   bullet is the only visual differentiator: it sits to the left as an
   indigo dot that separates this link from the rest of the nav, hinting
   it's a different category. The link text itself stays the same colour
   and weight as its neighbours so the nav reads as one visual row. */
nav.top a.cta {
  margin-left: 14px;
  padding-left: 26px;
  position: relative;
}
nav.top a.cta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo);
  transform: translateY(-50%);
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 16px 32px;
  background: linear-gradient(180deg, #9D4EDD 0%, var(--indigo-d) 100%);
  color: #fff;
  border-radius: 6px; font-weight: 600; font-size: var(--fs-md);
  border: 0; cursor: pointer; font-family: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(76, 28, 152, 0.22);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: linear-gradient(180deg, var(--indigo) 0%, #4C1D95 100%);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 3px 9px rgba(76, 28, 152, 0.30);
}
.btn-ghost, .btn.ghost {
  background: var(--bg);
  color: var(--indigo-d);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover, .btn.ghost:hover {
  background: var(--bg-2);
  color: var(--indigo-d);
  box-shadow: none;
}

/* Contact form submit — same look as .btn, named differently so the
   form HTML doesn't have to know about the .btn class. */
.submit {
  display: inline-block; padding: 16px 32px;
  background: linear-gradient(180deg, #9D4EDD 0%, var(--indigo-d) 100%);
  color: #fff;
  border: 0; border-radius: 6px;
  font-weight: 600; font-size: var(--fs-md);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(76, 28, 152, 0.22);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.submit:hover {
  background: linear-gradient(180deg, var(--indigo) 0%, #4C1D95 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 3px 9px rgba(76, 28, 152, 0.30);
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: center; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
/* Secondary pages (solo, compare, faq, terms, etc.) use a compact hero so
   the intro line sits close to the content that follows. The homepage
   overrides below for a taller, landing-page-style hero. */
.hero { padding: 64px 0 32px; text-align: center; border-top: 0; }
body.home .hero { padding: 96px 0 80px; }
.hero h1 {
  font-size: var(--fs-xl); line-height: 1.08; letter-spacing: -0.022em;
  margin: 0 auto 22px; max-width: 820px;
}
.hero h1 em { font-style: normal; color: var(--indigo); }
.hero p.lead {
  font-size: var(--fs-base); line-height: 1.5; color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto;
}
/* Homepage lead — longer paragraphs justified, extra room before CTA. */
body.home .hero p.lead {
  max-width: 700px;
  margin: 0 auto 24px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
body.home .hero p.lead:last-of-type { margin-bottom: 36px; }
body.home .hero ul.lead {
  max-width: 620px; margin: 0 auto 24px; padding-left: 20px;
  text-align: left; color: var(--ink-2); font-size: var(--fs-base); line-height: 1.5;
}
body.home .hero ul.lead li { margin-bottom: 4px; }

/* Secondary pages: when the hero is followed by a content section, drop
   the section's top padding so the intro line flows into content rather
   than sitting alone with 56px+ of empty space below it. */
.hero + section { padding-top: 0; }
.meta { font-size: var(--fs-base); color: var(--ink-2); }
.meta code { background: var(--bg-2); padding: 2px 6px; border-radius: 3px; font-size: var(--fs-base); }

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */
/* Defaults: centred headings + intro for marketing pages.
   Policy pages (.policy) override to read left-aligned for prose.
   The homepage adds a top border on each section via body.home below. */
section { padding: 24px 0; }
section h2 {
  font-size: var(--fs-section); line-height: 1.15; letter-spacing: -0.018em;
  margin: 8px auto 18px; max-width: 760px;
  text-align: center;
}
section h2 em { font-style: normal; color: var(--indigo); }
/* Section lead text — soft grey, centred, narrower than body prose. Used
   both for single-line intros below an h2 and for multi-paragraph prose
   blocks where each paragraph should read like the hero lead. */
section p.section-lead {
  color: var(--ink-2);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 18px;
}
section h2 + p.section-lead { margin-top: 0; }
section p.section-lead:last-child { margin-bottom: 32px; }
section h3 {
  font-size: var(--fs-md); line-height: 1.2;
  margin: 28px 0 8px;
}
section p, section ul, section ol {
  font-size: var(--fs-base);
  color: var(--ink);
  margin: 0 auto 16px;
  max-width: 760px;
}
section ul, section ol { padding-left: 22px; }
section ul li, section ol li { margin-bottom: 6px; }
section p.lead {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 760px;
  margin: 0 auto 16px;
  text-align: center;
}

/* ── HOMEPAGE OVERRIDES (body.home) ──────────────────────────────────────── */
/* Sections on the homepage have a top divider and more breathing room. */
body.home section { padding: 56px 0; border-top: 1px solid var(--line); }

/* Features grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }

/* Spotlight variant: a fixed 3-column grid where one feature takes the
   full row (use .feature.spotlight). Bumped to a media query so the
   mobile rule below (.features → 1fr) still collapses cleanly. */
@media (min-width: 721px) {
  .features.features-spotlight { grid-template-columns: repeat(3, 1fr); }
  .features.features-spotlight > .feature.spotlight { grid-column: 1 / -1; }
}

/* Centred-text features — h3 + body text both centred within each
   .feature column. Used when features read like marketing prose rather
   than a categorised grid with right-aligned icons.
   .feature h3 is a flexbox by default (justify-content: space-between to
   push an icon to the right edge), so centring needs justify-content,
   not text-align. */
.features-spotlight .feature h3,
.features-centered  .feature h3 { justify-content: center; text-align: center; }
.features-spotlight .feature p,
.features-centered  .feature p  { text-align: center; }

/* The spotlight feature spans the full grid row but its prose should
   read at the same comfortable measure as a section-lead — narrow and
   centred within the wider feature element, not full-bleed. */
.features-spotlight .feature.spotlight p { max-width: 640px; margin: 0 auto; }
.feature h3 {
  font-size: var(--fs-md); margin: 0 0 6px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.feature h3 em { font-style: normal; color: var(--indigo); }
.feature p { font-size: var(--fs-base); color: var(--ink-2); margin: 0; }
.feature .icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--indigo-accent);
  flex-shrink: 0;
}
.feature .icon svg { display: block; }

/* Numbered step list — scoped under .steps so the claim-page .step (a
   simple info box) doesn't pick up the counter-bullet treatment. */
.steps { counter-reset: step; }
.steps .step {
  position: relative; padding: 22px 0 22px 56px;
  border-bottom: 1px solid var(--line);
}
.steps .step:last-child { border-bottom: 0; }
.steps .step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 22px;
  width: 36px; height: 36px; line-height: 36px; text-align: center;
  background: var(--indigo); color: #fff;
  border-radius: 50%; font-weight: 700;
}
.steps .step h3 { margin: 0 0 6px; font-size: var(--fs-md); }
.steps .step p  { margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-base); }

/* Code block — used on the homepage install instructions. */
pre {
  background: linear-gradient(180deg, var(--code-bg-top) 0%, var(--code-bg-bot) 100%);
  color: #dde6f2;
  padding: 18px 22px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-base);
  line-height: 1.55;
  overflow-x: auto;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(76, 28, 152, 0.20);
}

/* Requirements box — two-column key/value list on a faint background. */
.reqs { background: var(--bg-2); border-radius: 8px; padding: 24px 28px; }
.reqs h2 { margin: 0 0 14px; font-size: var(--fs-md); text-align: left; }
.reqs ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.reqs li { font-size: var(--fs-base); color: var(--ink-2); }
.reqs li b { color: var(--ink); font-weight: 600; }

/* Pull-quotes — left-bordered blockquotes with big ldquo glyph. */
.pulls {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin: 28px 0 36px; text-align: left;
}
.pulls:has(blockquote:only-child) {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 28px auto 36px;
}
.pulls blockquote {
  margin: 0; padding: 28px 28px 24px;
  border-left: 3px solid var(--indigo);
  background: var(--bg-2);
  border-radius: 0 6px 6px 0;
  position: relative;
}
.pulls:has(blockquote:only-child) blockquote p {
  font-size: var(--fs-lg);
  text-align: center;
}
.pulls blockquote::before {
  content: "\201C";
  position: absolute; left: 14px; top: -6px;
  font-size: 64px; line-height: 1;
  color: var(--indigo); opacity: 0.18;
  font-family: Georgia, "Times New Roman", serif;
}
.pulls blockquote p {
  margin: 0;
  font-style: italic;
  font-size: var(--fs-md);
  line-height: 1.4;
  color: var(--ink);
}

/* ── CENTRED PAGE (contact, thanks) ───────────────────────────────────────── */
.page { padding: 72px 0 56px; }
.page-inner { max-width: 640px; margin: 0 auto; }
.page h1 {
  font-size: 44px; line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 16px; text-align: center;
}
.page p.lead, .page .lead {
  font-size: var(--fs-md); line-height: 1.4; color: var(--ink-2);
  margin: 0 auto 40px; text-align: center;
  max-width: 560px;
}
/* Thanks page is centre-aligned all the way through (no form follows). */
body.thanks .page { text-align: center; padding: 96px 0 80px; }
body.thanks .page p {
  font-size: var(--fs-md); line-height: 1.45; color: var(--ink-2);
  max-width: 560px; margin: 0 auto 32px;
}

/* ── FORMS (contact, solo request) ────────────────────────────────────────── */
form { display: block; }
.field { margin-bottom: 22px; }
.field label {
  display: block; font-size: var(--fs-base); font-weight: 600;
  color: var(--ink); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 6px;
  font: inherit; color: var(--ink); background: var(--bg);
  font-size: var(--fs-base);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(97, 64, 172, 0.15);
}
.field textarea { min-height: 180px; resize: vertical; }

/* Honeypot — visually hidden but reachable to bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.hint { font-size: 17px; color: var(--ink-2); margin-top: 6px; }

/* ── CLAIM PAGE (HQ-side, post-Paddle licence claim) ──────────────────────── */
body.claim {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 1.2rem;
  color: #222;
}
body.claim h1   { font-size: 1.6rem; margin-bottom: .3rem; }
body.claim .sub { color: #666; margin-top: 0; }
body.claim .key {
  font: 1.15rem ui-monospace, "SF Mono", Consolas, monospace;
  background: #f4f6fa; border: 1px solid #d4d9e3; border-radius: 6px;
  padding: 1rem 1.2rem; letter-spacing: .03em; user-select: all;
  word-break: break-all;
}
body.claim .meta { color: #555; font-size: .92rem; margin-top: 1.5rem; }
body.claim .meta dt { font-weight: 600; display: inline-block; min-width: 6.5rem; }
body.claim .meta dd { display: inline; margin: 0; }
body.claim .meta dl { margin: .3rem 0; }
body.claim .err {
  background: #fff4f0; border: 1px solid #f3c0b0; padding: .9rem 1rem;
  border-radius: 6px; color: #802820;
}
body.claim .step {
  background: #f7faf6; border: 1px solid #cfe1c8; border-radius: 6px;
  padding: 1rem 1.2rem; margin-top: 1.5rem;
}
body.claim .step ol { margin: .4rem 0 0 1.2rem; padding: 0; }
body.claim .step li { margin: .25rem 0; }
body.claim code { background: #eef1f6; padding: 1px 5px; border-radius: 3px; }
body.claim .footer { color: #888; font-size: .85rem; margin-top: 3rem; }
body.claim .pending {
  display: flex; align-items: center; gap: .9rem;
  background: #f4f6fa; border: 1px solid #d4d9e3; border-radius: 6px;
  padding: 1rem 1.2rem;
}
body.claim .spinner {
  flex: 0 0 22px; width: 22px; height: 22px;
  border: 3px solid #d4d9e3; border-top-color: var(--indigo);
  border-radius: 50%;
  animation: ip-spin .8s linear infinite;
}
@keyframes ip-spin { to { transform: rotate(360deg); } }

/* ── POLICY PAGES (terms, privacy) ────────────────────────────────────────── */
.policy {
  max-width: 760px; margin: 0 auto;
}
.policy .meta {
  color: var(--ink-2); font-size: var(--fs-base); margin: 0 0 32px;
}
.policy h2 { font-size: 32px; margin: 36px 0 18px; text-align: left; }
.policy h3 { font-size: var(--fs-md); margin-top: 24px; text-align: left; }
.policy p, .policy ul, .policy ol { font-size: var(--fs-base); }
.policy code {
  background: var(--bg-2); padding: 1px 6px; border-radius: 4px;
  font-size: 0.92em;
}
.policy .placeholder {
  background: #fff8e1; border: 1px solid #f59e0b; padding: 14px 18px;
  border-radius: 6px; color: #7a4f00; font-size: var(--fs-base);
  margin: 16px 0;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line);
  padding: 32px 0; margin-top: 64px;
  color: var(--ink-2); font-size: var(--fs-base);
}
footer.site .wrap {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px; text-align: center;
}
footer.site a { color: var(--ink-2); }
footer.site a:hover { color: var(--indigo); }
footer.site .copy { width: 100%; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root {
    --fs-xl: 40px;
    --fs-section: 30px;
  }
  .hero { padding: 48px 0 24px; }
  body.home .hero { padding: 64px 0 56px; }
  body.thanks .page { padding: 64px 0 56px; }
  .page { padding: 48px 0 40px; }
  .features { grid-template-columns: 1fr; }
  .pulls { grid-template-columns: 1fr; }
  .reqs ul { grid-template-columns: 1fr; }
  nav.top a:first-child { margin-left: 0; }
  pre { padding: 14px 16px; }
}
