/* PaintNetwork public frontend design system */

:root {
  --ink: #12233d;
  --ink-2: #1e3a5f;
  --brand: #1d5fb0;
  --brand-dark: #164a8a;
  --accent: #e9a23b;
  --accent-dark: #c97f1e;
  --bg: #f6f7fa;
  --surface: #ffffff;
  --border: #e1e5eb;
  --border-strong: #c7ccd6;
  --text: #1a2233;
  --text-muted: #5b6472;
  --success-bg: #eaf7f0;
  --success-text: #1f8a57;
  --danger: #c23b3b;
  --danger-bg: #fdecec;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(18, 35, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(18, 35, 61, 0.08);
  --shadow-lg: 0 20px 45px rgba(18, 35, 61, 0.14);

  --container: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 5.5vw + 0.5rem, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.15rem, 1.5vw + 0.5rem, 1.4rem); font-weight: 600; }

p { margin: 0 0 1em; color: var(--text); }
p.lede { font-size: clamp(1.05rem, 1vw + 0.85rem, 1.2rem); color: var(--text-muted); }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

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

@media (min-width: 640px) {
  .container { padding-inline: 32px; }
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}

.brand:hover { text-decoration: none; }

.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn { display: none; }

@media (min-width: 640px) {
  .header-actions .btn { display: inline-flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
  min-height: 48px;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn--secondary:hover { border-color: var(--ink); background: var(--surface); }

.btn--ghost {
  background: transparent;
  color: var(--brand);
  padding: 10px 16px;
  min-height: auto;
}

.btn--block { width: 100%; }
.btn--lg { padding: 17px 30px; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn--primary:hover { transform: none; }
}

/* ---------- Hero / marketplace split ---------- */

.hero {
  padding-block: 48px 40px;
  background:
    radial-gradient(1200px 400px at 100% -10%, rgba(29, 95, 176, 0.08), transparent),
    var(--bg);
}

@media (min-width: 900px) {
  .hero { padding-block: 76px 56px; }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: rgba(29, 95, 176, 0.08);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  margin-bottom: 18px;
}

.hero__title { max-width: 18ch; }

.hero__lede { max-width: 52ch; }

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

@media (min-width: 480px) {
  .hero__actions { flex-direction: row; }
}

/* Two-path split: customer path primary, painter path secondary */

.paths {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 760px) {
  .paths { grid-template-columns: 1.3fr 1fr; align-items: stretch; }
}

.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.path-card--primary {
  border-color: rgba(29, 95, 176, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

.path-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.path-card--primary .path-card__icon { background: rgba(29, 95, 176, 0.12); color: var(--brand-dark); }
.path-card--secondary .path-card__icon { background: rgba(233, 162, 59, 0.16); color: var(--accent-dark); }

.path-card p { color: var(--text-muted); }

.path-card__cta { margin-top: auto; padding-top: 16px; }

/* ---------- How it works steps ---------- */

.steps {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Section shells ---------- */

.section { padding-block: 44px; }
.section--muted { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { max-width: 60ch; margin-bottom: 8px; }

/* ---------- Coverage chips (areas overview on homepage) ---------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.site-footer a { color: var(--text-muted); }

/* ================= Forms ================= */

.form-page {
  padding-block: 32px 60px;
}

.form-shell {
  max-width: 640px;
  margin-inline: auto;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

@media (min-width: 640px) {
  .form-card { padding: 40px; }
}

.form-header { text-align: left; margin-bottom: 24px; }
.form-header p { color: var(--text-muted); margin-bottom: 0; }

.form-progress-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.field {
  margin-bottom: 20px;
}

.field label,
.field legend {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 6px;
  padding: 0;
}

.field .required-mark { color: var(--danger); margin-left: 2px; }

.field .hint {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.input,
select.input,
textarea.input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.input { min-height: 110px; resize: vertical; }

.input:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 95, 176, 0.14);
}

.field.has-error .input,
.field.has-error select.input,
.field.has-error textarea.input {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}

.field-error::before { content: "⚠ "; }

fieldset.field { border: none; padding: 0; margin: 0 0 22px; }

/* Selection grid used for services + areas: replaces the giant checkbox wall */

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 520px) {
  .option-grid { grid-template-columns: repeat(3, 1fr); }
}

.option-grid--areas { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 480px) {
  .option-grid--areas { grid-template-columns: repeat(3, 1fr); }
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  margin: 0;
}

.option input:checked + label {
  border-color: var(--brand);
  background: rgba(29, 95, 176, 0.08);
  color: var(--brand-dark);
}

.option input:focus-visible + label {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.option-group {
  margin-bottom: 16px;
}

.option-group__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Single-select variant rendered as a native select for very long lists on tiny screens is handled inline in views when needed */

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.consent-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand);
}

.consent-row label { font-weight: 400; font-size: 0.88rem; color: var(--text-muted); margin: 0; }

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-errors {
  background: var(--danger-bg);
  border: 1px solid rgba(194, 59, 59, 0.25);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.form-errors ul { margin: 6px 0 0; padding-left: 20px; }

.form-explainer {
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  margin-top: 24px;
}

.form-explainer h3 { font-size: 1rem; margin-bottom: 10px; }

.form-explainer ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-explainer li { margin-bottom: 6px; }

/* ---------- Confirmation / thank-you pages ---------- */

.confirm-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  padding-block: 60px;
}

.confirm-card {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  box-shadow: var(--shadow-md);
}

.confirm-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}

.confirm-card p { color: var(--text-muted); }

.confirm-card .btn { margin-top: 20px; }
