/* PBJ.SOLUTIONS site styles. No external fonts or frameworks. */

:root {
  --grape-900: #2a1533;
  --grape-700: #4a2459;
  --grape-500: #6d3a83;
  --grape-100: #f1e8f5;
  --amber-500: #d9922b;
  --amber-400: #e8a845;
  --amber-100: #fbf0de;
  --ink: #1d1a1f;
  --ink-soft: #4d4752;
  --line: #e4dde8;
  --bg: #fdfcfb;
  --white: #ffffff;
  --success: #1f7a4d;
  --success-bg: #e6f4ec;
  --error: #b42318;
  --error-bg: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(42, 21, 51, 0.06), 0 8px 24px rgba(42, 21, 51, 0.06);
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--grape-500); text-underline-offset: 2px; }
a:hover { color: var(--grape-700); }

:focus-visible { outline: 3px solid var(--amber-400); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--grape-900); text-decoration: none;
}
.brand-logo { height: 44px; width: auto; display: block; }
@media (max-width: 420px) { .brand-logo { height: 36px; } }
.brand .dot { color: var(--amber-500); }
.site-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--grape-700); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--grape-900) 0%, var(--grape-700) 70%, var(--grape-500) 100%);
  color: var(--white);
  padding: 88px 0 96px;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.15; margin: 0 0 16px; max-width: 18ch; }
.hero p { font-size: 1.15rem; max-width: 56ch; color: #e9dcef; margin: 0 0 28px; }
.hero .accent { color: var(--amber-400); }

/* Buttons */
.btn {
  display: inline-block; border: 0; border-radius: var(--radius);
  padding: 12px 22px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--amber-500); color: var(--grape-900); }
.btn-primary:hover { background: var(--amber-400); color: var(--grape-900); }
.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); margin-left: 8px; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-dark { background: var(--grape-700); color: var(--white); }
.btn-dark:hover { background: var(--grape-900); color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 12px; color: var(--grape-900); }
h3 { font-size: 1.2rem; margin: 0 0 8px; color: var(--grape-900); }
.lead { color: var(--ink-soft); max-width: 60ch; margin: 0 0 36px; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--ink-soft); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--amber-100); color: var(--grape-700); font-weight: 800; margin-bottom: 16px;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; padding-left: 52px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grape-700); color: var(--white); font-weight: 700;
  display: grid; place-items: center;
}
.steps p { margin: 4px 0 0; color: var(--ink-soft); }

/* Forms */
.form-wrap { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .form-wrap { grid-template-columns: 1fr 1.3fr; } }

form.stack { display: grid; gap: 16px; }
.row-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }

label { font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 12px; border: 1px solid #cfc5d6; border-radius: 8px; background: var(--white);
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--grape-500); outline: 2px solid var(--grape-100); }

.consent {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  background: var(--grape-100); border-radius: 8px; padding: 14px;
}
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--grape-700); }
.consent label { font-weight: 400; font-size: 0.88rem; line-height: 1.5; margin: 0; color: var(--ink-soft); }

/* Honeypot: hidden from people, visible to naive bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { min-height: 1.5em; margin: 0; font-weight: 500; border-radius: 8px; }
.form-status:empty { display: none; }
.form-status[data-state="pending"] { color: var(--ink-soft); }
.form-status[data-state="success"] { color: var(--success); background: var(--success-bg); padding: 12px 14px; }
.form-status[data-state="error"] { color: var(--error); background: var(--error-bg); padding: 12px 14px; }

.fine { font-size: 0.85rem; color: var(--ink-soft); }

/* Info boxes */
.keyword-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; }
.keyword-table th, .keyword-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.keyword-table th { width: 140px; color: var(--grape-900); }
code.kw { background: var(--amber-100); color: var(--grape-900); padding: 2px 8px; border-radius: 6px; font-weight: 700; }

/* Legal / long-form pages */
.prose { max-width: 760px; }
.prose h1 { color: var(--grape-900); font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0 0 8px; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 8px; }
.prose .updated { color: var(--ink-soft); margin: 0 0 24px; }
.prose li { margin-bottom: 6px; }
.todo { background: #fff3c4; border: 1px dashed #c99a00; padding: 0 4px; border-radius: 4px; }

.page-head { padding-top: 56px; padding-bottom: 8px; }
.page-head h1 { color: var(--grape-900); font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin: 0 0 8px; }
/* A full-width container holding long-form text: keep it aligned with the
   page grid but cap the line length. */
.container.prose { max-width: var(--max); }
.container.prose > * { max-width: 760px; }

/* Footer */
.site-footer { background: var(--grape-900); color: #cdbfd4; padding: 40px 0; font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: #f0e6f4; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }

/* Admin */
.admin-table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table.admin { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.admin th, table.admin td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
table.admin td.wrap { white-space: normal; min-width: 260px; }
table.admin th { background: var(--grape-100); color: var(--grape-900); position: sticky; top: 0; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.tabs { display: flex; gap: 6px; margin: 24px 0 12px; flex-wrap: wrap; }
.tabs button { background: var(--white); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--grape-700); color: var(--white); border-color: var(--grape-700); }
[hidden] { display: none !important; }

/* Utilities (inline style attributes are blocked by the CSP) */
.pt-sm { padding-top: 16px; }
.mt-0 { margin-top: 0 !important; }

/* Header spacing on small screens: keep the logo off the top edge and the
   nav on one line. */
.site-header .container { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 480px) {
  .site-nav ul { gap: 14px; }
  .site-nav a { font-size: 0.95rem; }
}
