/* ------------------------------------------------------------------
   Stitch tokens, matched to bnpl-guide.stitch.money and the Stitch
   Brand Guidelines in Notion.
   ------------------------------------------------------------------ */
@font-face { font-family: "Suisse Intl"; src: url("/fonts/SuisseIntl-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Suisse Intl"; src: url("/fonts/SuisseIntl-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* Brand palette */
  --white: #ffffff;
  --paper: #fcfbfb;
  --platinum: #f5f4f4;
  --silver: #dddcdd;
  --titanium: #b5b3b6;
  --steel: #56545a;
  --graphite: #2e2b33;
  --ink: #0f0c15;
  --brand: #6e2cff;
  --indigo: #221244;
  --mist: #e3deff;
  --amber: #ff5b00;

  /* Roles */
  --bg: var(--paper);
  --raised: var(--white);
  --text: var(--ink);
  --text-2: rgba(15, 12, 21, 0.62);
  --text-3: rgba(15, 12, 21, 0.45);
  --line: rgba(15, 12, 21, 0.1);
  --edge: rgba(15, 12, 21, 0.2);
  --inset: inset -0.75px -0.75px 0.5px 0 var(--edge), inset 0.75px 0.75px 0.5px 0 var(--edge);
  --shadow: 0 1px 4px rgba(15, 12, 21, 0.04), 0 6px 24px rgba(15, 12, 21, 0.06);

  /* Result states */
  --ok: #0f6b3e;      --ok-bg: #e4f4ea;
  --bad: #a83a00;     --bad-bg: #ffe9dc;   --bad-line: var(--amber);
  --warn: var(--indigo); --warn-bg: var(--mist); --warn-line: var(--brand);

  --sans: "Suisse Intl", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-card: 20px;
  --r-sm: 12px;
  --r-pill: 999px;
  --ease: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--sans); letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4rem); line-height: 0.92; letter-spacing: -0.05em; }
h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.03em; }
h2 .sub { display: block; color: var(--text-3); }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 0.85em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--platinum); border-radius: 6px; padding: 0.1em 0.4em; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-2); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Pills and labels */
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--steel); background: var(--raised); box-shadow: var(--inset); border-radius: var(--r-pill); padding: 0.4em 1.1em 0.3em; }
.section-num { font-size: 0.85rem; font-weight: 600; color: var(--brand); margin-bottom: 0.6em; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo img { height: 21px; width: auto; }
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.85rem; color: var(--text-2); }
.site-footer a { color: var(--text-2); }
.footer-logo { height: 15px; width: auto; margin-bottom: 14px; }

/* Sections */
.hero { padding: 64px 0 48px; }
.hero h1 { margin-top: 20px; }
.lede { font-size: 1.125rem; line-height: 1.6; color: var(--text-2); max-width: 34em; }
.section { padding: 72px 0; }
.section.alt { background: var(--platinum); }

/* Forms */
input[type="text"], input[type="email"] {
  font: inherit; color: var(--text); background: var(--raised);
  border: 0; box-shadow: var(--inset); border-radius: var(--r-sm);
  padding: 0.8em 1em; width: 100%; min-width: 0; transition: box-shadow var(--ease);
}
input::placeholder { color: var(--text-3); }
input:focus { outline: none; box-shadow: 0 0 0 2px var(--brand); }
button:focus-visible, a:focus-visible, summary:focus-visible, .check input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.check-form { display: flex; gap: 10px; margin-top: 32px; padding: 8px; background: var(--raised); border-radius: var(--r-pill); box-shadow: var(--inset), var(--shadow); }
.check-form input { box-shadow: none; background: transparent; font-size: 1.05rem; border-radius: var(--r-pill); padding: 0.75em 1.1em; }
.check-form input:focus { box-shadow: none; }
.check-form:focus-within { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.hint { font-size: 0.85rem; color: var(--text-3); margin: 12px 0 0 4px; }
.form-error { color: var(--bad); font-size: 0.9rem; margin: 10px 0 0 4px; }

.btn { font: inherit; font-weight: 600; font-size: 0.95rem; border-radius: var(--r-pill); padding: 0.8em 1.5em; border: 0; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; transition: background var(--ease), color var(--ease), transform var(--ease); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--brand); color: var(--white); }
.btn-secondary { background: var(--raised); color: var(--text); box-shadow: var(--inset); }
.btn-secondary:hover { color: var(--brand); }
.btn-small { padding: 0.55em 1.1em; font-size: 0.85rem; }

/* Cards */
.card { background: var(--raised); border-radius: var(--r-card); padding: 28px; box-shadow: var(--inset); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.outcome p { margin: 16px 0 0; color: var(--text-2); font-size: 0.95rem; }

.badge { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.8rem; font-weight: 600; padding: 0.35em 0.9em 0.3em; border-radius: var(--r-pill); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-vulnerable { color: var(--bad); background: var(--bad-bg); }
.badge-unknown { color: var(--warn); background: var(--warn-bg); }

/* Result */
.result { margin-top: 28px; }
.result-card { box-shadow: var(--inset), var(--shadow); position: relative; overflow: hidden; }
.result-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line); }
.result-card.tone-ok::before { background: var(--ok); }
.result-card.tone-vulnerable::before { background: var(--bad-line); }
.result-card.tone-unknown::before { background: var(--warn-line); }
.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.result-host { font-family: var(--mono); font-size: 0.82rem; color: var(--text-3); word-break: break-all; }
.result-title { font-size: 1.5rem; letter-spacing: -0.03em; }
.result-card p:last-child { margin-bottom: 0; }

/* Lead form */
.lead { margin-top: 16px; }
.lead-title { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 0.2em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 14px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin: 0 0 6px 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 0.25em; width: 1.05em; height: 1.05em; flex: none; accent-color: var(--brand); }
.fineprint { font-size: 0.8rem; color: var(--text-3); margin: 12px 0 16px; }
.fineprint a { color: var(--text-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { background: var(--mist); box-shadow: none; }
.done p { margin: 0; color: var(--indigo); }

/* WordPress guide */
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.two-col > div:last-child { display: grid; gap: 16px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 16px 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--raised); box-shadow: var(--inset); color: var(--brand); font-weight: 600; font-size: 0.85rem; display: grid; place-items: center; }
.note { font-size: 0.92rem; background: var(--raised); border-radius: var(--r-sm); padding: 14px 16px; box-shadow: var(--inset); color: var(--text-2); }
.note strong { color: var(--text); }
.version-label { display: block; font-weight: 600; margin-bottom: 12px; }
.inline { display: flex; gap: 10px; }
.version-result { margin-top: 16px; }
.version-result p:last-child { margin-bottom: 0; }
.table-card h3 { font-size: 1.1rem; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
th { font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 32px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: -3px; font-size: 1.4rem; font-weight: 400; color: var(--text-3); transition: transform var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--text-2); }

/* Small screens */
@media (max-width: 820px) {
  .grid-3, .two-col { grid-template-columns: 1fr; }
  .two-col { gap: 28px; }
  .section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .hero { padding: 40px 0 36px; }
  .check-form { flex-direction: column; border-radius: var(--r-card); }
  .check-form input { border-radius: var(--r-sm); }
  .inline, .field-row { grid-template-columns: 1fr; flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .card { padding: 22px; }
  .site-header .pill { display: none; }
}
