/* ============================================================
   Postcard Activation — public design system
   ------------------------------------------------------------
   This is the SAME visual system as the 124-page niche network
   (countertops.postcardactivation.com, the apex, etc.). The
   generator for those pages is:

       ~/Apps/postcard-sites/niche-network/build.py  ->  STYLE

   Everything in section 1 and 2 below is that stylesheet,
   token-for-token and rule-for-rule, so a visitor who clicks
   from a niche landing page into this Flask funnel does not
   notice a change of website. Section 3 adds only what the
   funnel needs and the static pages never did (video frame,
   FAQ list, notices, long-form legal), built from the same
   tokens — no new colours, no new fonts.

   If build.py's STYLE changes, change this file to match.
   Do NOT restyle this file on its own.

   Deliberately NOT imported here:
     * Tailwind CDN and static/css/custom.css. custom.css is the
       admin CRM theme; it shares the gold palette but not the
       type scale, radii or button. Loading either alongside this
       file re-introduces exactly the mismatch this file removes.
     * Any webfont. The niche pages use the system UI stack and
       load no Google Font, so neither does this.
   ============================================================ */

/* ------------------------------------------------------------
   1. TOKENS — verbatim from build.py STYLE :root
   ------------------------------------------------------------ */
:root {
  --bg:        #0B0B0D;
  --bg-2:      #14141C;
  --card:      #15151D;
  --card-2:    #1B1B25;
  --gold:      #C7A35A;
  --gold-soft: #B8945A;
  --text:      #F5F1E8;
  --text-mute: #9C9788;
  --text-dim:  #8A8576;
  --line:      rgba(199, 163, 90, 0.18);

  /* Funnel-only additions, derived from the palette above. */
  --card-bg:   linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  --ok:        #A7F3D0;
  --ok-line:   rgba(52, 211, 153, 0.45);
  --ok-bg:     rgba(16, 185, 129, 0.10);
  --warn:      #FCD34D;
  --warn-line: rgba(245, 158, 11, 0.50);
  --warn-bg:   rgba(245, 158, 11, 0.10);
  --bad:       #FCA5A5;
  --bad-line:  rgba(248, 113, 113, 0.50);
  --bad-bg:    rgba(239, 68, 68, 0.10);
}

/* ------------------------------------------------------------
   2. THE NICHE-PAGE STYLESHEET
   ------------------------------------------------------------ */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

header { padding: 20px 0; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: 0.06em; font-size: 1.05rem; color: var(--gold); text-decoration: none; }
.brand span { color: var(--text); }

.hero { padding: 64px 0 48px; text-align: center; }
.eyebrow { color: var(--gold); letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; margin-bottom: 18px; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; margin: 0 0 20px; font-weight: 800; }
h1 .accent { color: var(--gold); }
.sub { color: var(--text-mute); font-size: 1.15rem; max-width: 620px; margin: 0 auto 34px; }

.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #14100a; font-weight: 700; padding: 15px 34px; border-radius: 8px;
  text-decoration: none; font-size: 1.02rem; border: none; cursor: pointer;
  font-family: inherit; text-align: center;
}
.btn:hover { filter: brightness(1.05); }

.fineprint { color: var(--text-dim); font-size: 0.82rem; margin-top: 14px; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-title { font-size: 1.7rem; font-weight: 800; text-align: center; margin: 0 0 8px; }
.section-sub { color: var(--text-mute); text-align: center; max-width: 580px; margin: 0 auto 40px; }

.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pain-card {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 22px;
}
.pain-card .num { color: var(--gold); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; margin-bottom: 10px; }
.pain-card p { margin: 0; color: var(--text-mute); font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 16px;
}
.step h3 { margin: 0 0 8px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-mute); font-size: 0.92rem; }

.why-mail {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 32px;
}
.why-mail ul { margin: 0; padding-left: 20px; color: var(--text-mute); }
.why-mail li { margin-bottom: 10px; }

form.lead {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 32px; max-width: 480px; margin: 0 auto;
}
.field { margin-bottom: 14px; }
label { display: block; font-size: 0.82rem; color: var(--text-mute); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; color: var(--text); font-size: 0.98rem; font-family: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }

/* skip link — visible only on keyboard focus */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: #0B0B0D; padding: 12px 20px;
  font-weight: 700; border-radius: 0 0 8px 0; text-decoration: none; }
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
    scroll-behavior: auto !important; }
}

form.lead .btn { width: 100%; margin-top: 6px; }

footer { padding: 32px 0; text-align: center; color: var(--text-dim); font-size: 0.82rem; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------
   3. FUNNEL ADDITIONS — same tokens, no new colours
   ------------------------------------------------------------ */

/* The funnel's hero sits left-aligned on the long-form pages so a
   3-line headline does not read as a poster; the niche hero stays
   centred via .hero. */
.hero--left { text-align: left; }
.hero--left .sub { margin-left: 0; margin-right: 0; }

/* Section headings on the long-form funnel pages are left-aligned
   headings inside a normal reading column, not centred posters. */
.section-heading { font-size: 1.7rem; font-weight: 800; margin: 0 0 18px; line-height: 1.2; }
.section-heading--sm { font-size: 1.3rem; }
section.tight { padding: 44px 0; }
section.flush { border-top: none; }

/* Generic surface, same treatment as .pain-card / .why-mail. */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 28px;
}
.card--pad-sm { padding: 22px; }

/* Body copy inside a funnel section. */
.body-copy { color: var(--text-mute); font-size: 1.02rem; margin: 0 0 14px; }
.body-copy:last-child { margin-bottom: 0; }
.body-copy strong { color: var(--text); }
.lede { color: var(--text-mute); font-size: 1.15rem; margin: 0 0 24px; }

/* Bulleted lists — the .why-mail list treatment, reusable. */
.bullets { margin: 0; padding-left: 20px; color: var(--text-mute); }
.bullets li { margin-bottom: 10px; }
.bullets li:last-child { margin-bottom: 0; }
.bullets strong { color: var(--text); }

/* Numbered "next steps" list. */
.numbered { margin: 0; padding-left: 0; list-style: none; counter-reset: pa-step; }
.numbered li {
  counter-increment: pa-step; position: relative;
  padding-left: 38px; margin-bottom: 14px; color: var(--text-mute);
}
.numbered li:last-child { margin-bottom: 0; }
.numbered li::before {
  content: counter(pa-step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold);
  font-size: 0.78rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Confirmation ticks. */
.ticks { margin: 0; padding-left: 0; list-style: none; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--text-mute); }
.ticks li:last-child { margin-bottom: 0; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 800; }

/* 16:9 video frame — the Vimeo embed, framed like a card. */
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #000; margin-top: 22px;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame--empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); color: var(--text-dim); font-size: 0.92rem; text-align: center; padding: 24px;
}

/* FAQ — a definition list with the same hairline divider as sections. */
.faq { margin: 0; }
.faq > div { padding: 18px 0; border-top: 1px solid var(--line); }
.faq > div:first-child { border-top: none; padding-top: 0; }
.faq dt { font-weight: 700; color: var(--text); margin: 0 0 6px; }
.faq dd { margin: 0; color: var(--text-mute); }

/* Notices. */
.notice { border-radius: 12px; padding: 22px 24px; border: 1px solid; }
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin-bottom: 0; }
.notice--warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.notice--ok   { border-color: var(--ok-line);   background: var(--ok-bg);   color: var(--ok); text-align: center; }
.notice--bad  { border-color: var(--bad-line);  background: var(--bad-bg);  color: var(--bad); font-size: 0.92rem; }
.notice--warn strong, .notice--ok strong, .notice--bad strong { color: inherit; }
.notice h2 { margin: 0 0 10px; font-size: 1.15rem; color: inherit; }
.notice .big { font-size: 1.5rem; font-weight: 800; margin: 0 0 12px; }

/* Buttons in block form + the disabled state. */
.btn--block { display: block; width: 100%; padding: 17px 34px; }
.btn[disabled], .btn--off {
  background: var(--card-2); color: var(--text-dim);
  border: 1px solid var(--line); cursor: not-allowed; filter: none;
}
.btn--off:hover { filter: none; }

/* Helper text. */
.center { text-align: center; }
.muted { color: var(--text-mute); }
.small { font-size: 0.85rem; color: var(--text-dim); }
.small a { color: var(--text-mute); }
.stack-sm { margin-top: 10px; }
.stack-md { margin-top: 22px; }
.stack-lg { margin-top: 34px; }

/* Two-up form grid, used by the onboarding upload and /contact. */
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.grid-2 .span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .span-2 { grid-column: auto; }
}
.field .hint { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--text-dim); }
.field label { margin-bottom: 6px; }

/* A form that is a page section rather than the centred opt-in card. */
form.panel {
  background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 14px; padding: 28px;
}
form.panel .btn { width: 100%; margin-top: 20px; }

/* Long-form legal / policy reading column. */
.prose { max-width: 720px; margin: 0 auto; line-height: 1.7; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 6px; font-weight: 800; }
.prose h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: 34px 0 10px; font-weight: 700; }
.prose p { color: var(--text-mute); margin: 0 0 12px; }
.prose a { color: var(--gold); }
.prose .updated { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 36px; }
.prose ul { color: var(--text-mute); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0 20px; }

/* Centred single-card pages (thank you, unsubscribed). */
.centered-page {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.centered-page .card { max-width: 520px; padding: 44px 36px; }
.centered-page h1 { font-size: 1.7rem; margin: 0 0 14px; }
.centered-page p { color: var(--text-mute); margin: 0 0 10px; }
.centered-page p:last-child { margin-bottom: 0; }

/* Header can carry one secondary action (the admin Login link on /lp and
   /sales). Bare .brand pages leave the right-hand side empty. */
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.btn-ghost {
  display: inline-block; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 16px; font-size: 0.8rem; font-weight: 600;
  color: var(--text-mute); text-decoration: none;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* A file input keeps the browser's own picker button, which needs a readable
   surface of its own on this background. */
input[type="file"] { padding: 10px 12px; color: var(--text-mute); font-size: 0.9rem; }
input[type="file"]::file-selector-button {
  background: var(--card-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 14px; margin-right: 12px;
  font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--gold); color: var(--gold); }

/* A .prose column opened by a heading should not push itself down. */
.prose > h1:first-child, .prose > h2:first-child { margin-top: 0; }

/* Footer links keep the muted footer colour but stay underlined so they
   are distinguishable without relying on colour alone. */
footer a { color: var(--text-dim); }
footer a:hover { color: var(--text-mute); }

/* The mobile step-down. The niche pages get theirs from clamp() on h1 and the
   auto-fit grids; these are the funnel-only pieces that need it. */
@media (max-width: 640px) {
  .hero { padding: 44px 0 34px; }
  section { padding: 40px 0; }
  section.tight { padding: 32px 0; }
  .card, form.panel, form.lead, .why-mail { padding: 22px 20px; }
  .centered-page .card { padding: 32px 24px; }
  .section-title { font-size: 1.45rem; }
  .section-heading { font-size: 1.35rem; }
  .sub { font-size: 1.05rem; }
  .btn { padding: 14px 24px; }
}

/* Sample postcard image (templates/_sample_postcard.html) */
.pa-sample { margin: 24px auto 28px; max-width: 760px; }
.pa-sample img { max-width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); }
.pa-sample figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.centered-page .pa-sample { margin: 8px 0 22px; }
