/* ─────────────────────────────────────────────────────────────────
   CARDOZA · PROJECT INTAKE
   Two skins driven by [data-skin]:
     dark  — Dallas Civic editorial (night, magnolia red, Playfair italic)
     light — warm paper, friendlier for new founders
   ───────────────────────────────────────────────────────────────── */

:root {
  --f-display: "Playfair Display", serif;
  --f-body: "Inter Tight", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* ── Skin: DARK ─────────────────────────────────────────────────── */
[data-skin="dark"] {
  --bg: #0E0B0A; --bg-2: #171311; --panel: #161210; --panel-2: #1E1815;
  --ink: #F5EFE3; --ink-2: #C7BFB0; --muted: #8C8475;
  --line: #2A241F; --line-2: #3A332C;
  --accent: #E63226; --accent-2: #FF4632; --accent-soft: rgba(230,50,38,.12);
  --field: #100C0B; --field-line: #332C26;
  --radius: 4px; --radius-lg: 6px;
  --shadow: 0 24px 60px rgba(0,0,0,.5);
  --headline-style: italic;
  --page-grad: radial-gradient(ellipse at 70% -10%, rgba(230,50,38,.10), transparent 55%);
}
/* ── Skin: LIGHT ────────────────────────────────────────────────── */
[data-skin="light"] {
  --bg: #F4F1EA; --bg-2: #ECE7DC; --panel: #FFFFFF; --panel-2: #FBF9F4;
  --ink: #1A1714; --ink-2: #58514A; --muted: #8A8377;
  --line: #E5DFD1; --line-2: #D8D0BE;
  --accent: #C0372B; --accent-2: #D6452C; --accent-soft: rgba(192,55,43,.08);
  --field: #FBF9F4; --field-line: #DED7C7;
  --radius: 12px; --radius-lg: 18px;
  --shadow: 0 18px 50px rgba(60,45,30,.12);
  --headline-style: normal;
  --page-grad: radial-gradient(ellipse at 70% -10%, rgba(192,55,43,.05), transparent 55%);
}

* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--f-body); letter-spacing: -.002em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: #fff; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

.app { min-height: 100vh; background: var(--page-grad); }

/* ── Top bar / skin switch ──────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 22px; width: auto; display: block; }
[data-skin="dark"] .brand img { filter: invert(1) brightness(1.6) sepia(.3); opacity: .92; }
.brand .tag { font: 500 10px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--panel); }
.seg button {
  border: 0; background: transparent; color: var(--muted);
  font: 500 11px/1 var(--f-body); letter-spacing: .04em;
  padding: 8px 14px; border-radius: 999px; transition: .18s ease;
}
.seg button.on { background: var(--accent); color: #fff; }
.seg .lbl { font: 500 10px/1 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-right: 10px; align-self: center; }

/* ── Layout ─────────────────────────────────────────────────────── */
.wrap { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) clamp(18px, 4vw, 32px) 120px; }
.wrap.wide { max-width: 920px; }

/* Progress */
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.steps .dot { display: flex; align-items: center; gap: 10px; }
.steps .n {
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  font: 500 11px/1 var(--f-mono); border: 1px solid var(--line-2); color: var(--muted);
  transition: .2s ease;
}
.steps .dot.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps .dot.done .n { border-color: var(--accent); color: var(--accent); }
.steps .t { font: 500 11px/1 var(--f-body); letter-spacing: .02em; color: var(--muted); }
.steps .dot.on .t { color: var(--ink); }
.steps .bar { flex: 1; height: 1px; background: var(--line); }

/* Headings */
.eyebrow { font: 500 11px/1 var(--f-body); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
h1.title { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.022em; margin: 0 0 16px; text-wrap: balance; }
h1.title em { font-style: normal; font-family: var(--f-body); font-weight: 600; color: var(--accent); }
.sub { color: var(--ink-2); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.55; max-width: 54ch; margin: 0; }

.section-h { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 4px; letter-spacing: -.018em; }
.q-label { font: 500 12px/1 var(--f-body); letter-spacing: .04em; color: var(--muted); margin: 0 0 14px; text-transform: uppercase; }

/* ── Service picker cards ───────────────────────────────────────── */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 28px; }
.svc {
  text-align: left; border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--radius-lg); padding: 22px; transition: .2s ease; position: relative; overflow: hidden;
}
.svc:hover { border-color: var(--line-2); transform: translateY(-2px); }
.svc.on { border-color: var(--accent); background: var(--accent-soft); }
.svc .mark { font-size: 20px; color: var(--accent); line-height: 1; }
.svc h3 { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: 22px; margin: 14px 0 8px; color: var(--ink); }
.svc p { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.svc .check { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line-2); display: grid; place-items: center; color: #fff; font-size: 12px; transition: .2s ease; }
.svc.on .check { background: var(--accent); border-color: var(--accent); }

/* ── Adaptive question blocks ───────────────────────────────────── */
.svc-block { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: clamp(22px, 3vw, 32px); margin-bottom: 16px; }
.svc-block > header { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.svc-block > header .mark { color: var(--accent); font-size: 18px; }
.svc-block > header h3 { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: 24px; margin: 0; }
.qgroup { margin-bottom: 26px; }
.qgroup:last-child { margin-bottom: 0; }

.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt {
  border: 1px solid var(--field-line); background: var(--field); color: var(--ink-2);
  border-radius: 999px; padding: 11px 18px; font-size: 14px; transition: .16s ease; display: inline-flex; align-items: center; gap: 8px;
}
.opt:hover { border-color: var(--line-2); color: var(--ink); }
.opt.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.opt .tick { font-size: 12px; opacity: .8; }

/* ── Form fields (about you) ────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font: 500 12px/1 var(--f-body); letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--field); color: var(--ink);
  border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: 13px 15px; outline: none; transition: .16s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px){ .grid-2 { grid-template-columns: 1fr; } }

.switch-row { display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--panel); margin-bottom: 16px; }
.switch { flex: 0 0 auto; width: 46px; height: 27px; border-radius: 999px; background: var(--field-line); border: 0; position: relative; transition: .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 999px; background: #fff; transition: .2s ease; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(19px); }
.switch-row .txt strong { display: block; font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.switch-row .txt span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ── Buttons / nav ──────────────────────────────────────────────── */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.btn { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 14px 26px; font: 500 12px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; transition: .18s ease; }
.btn:hover { color: var(--ink); border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-text { background: none; border: 0; color: var(--accent); font: 500 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 8px 0; }

/* ── Confirmation ───────────────────────────────────────────────── */
.confirm { text-align: center; padding: clamp(40px, 8vw, 90px) 0 20px; }
.confirm .pega { width: clamp(120px, 22vw, 200px); margin: 0 auto 32px; }
.confirm .pega img { width: 100%; height: auto; display: block; }
[data-skin="dark"] .confirm .pega img { filter: drop-shadow(0 16px 32px rgba(230,50,38,.35)); }
.confirm h1 { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 16px; letter-spacing: -.02em; }
.confirm p { color: var(--ink-2); max-width: 46ch; margin: 0 auto; line-height: 1.6; }

.owner-toggle { display: inline-flex; align-items: center; gap: 10px; margin: 40px auto 0; padding: 10px 18px; border: 1px dashed var(--line-2); border-radius: 999px; color: var(--muted); font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; background: none; }
.owner-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ── Owner summary ──────────────────────────────────────────────── */
.owner { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 40px; }
.owner-banner { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 28px; }
.owner-banner .dotmark { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); flex: 0 0 auto; }
.owner-banner span { font: 500 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.owner-banner b { color: var(--accent); }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 30px; }
.meta-row .m { font-size: 13px; color: var(--ink-2); }
.meta-row .m b { color: var(--ink); font-weight: 600; }

/* Estimator A — Ledger */
.ledger { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ledger .svc-row { padding: 20px clamp(18px, 3vw, 28px); border-bottom: 1px solid var(--line); }
.ledger .svc-row:last-of-type { border-bottom: 0; }
.ledger .sh { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ledger .sh .nm { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.ledger .sh .nm .mark { color: var(--accent); font-size: 15px; }
.ledger .sh .sub-amt { font: 500 14px/1 var(--f-mono); color: var(--ink); }
.ledger .item { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; font-size: 13px; color: var(--ink-2); }
.ledger .item .amt { font-family: var(--f-mono); color: var(--muted); white-space: nowrap; }
.ledger .total { background: var(--panel-2); padding: 22px clamp(18px, 3vw, 28px); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ledger .total .lab { font: 500 11px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ledger .total .big { font-family: var(--f-mono); font-weight: 500; font-size: clamp(22px, 4vw, 30px); color: var(--ink); }
.ledger .total .mo { font: 500 12px/1 var(--f-mono); color: var(--accent); margin-top: 6px; }

/* Estimator B — Cards / dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dcard { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.dcard .top { display: flex; align-items: center; justify-content: space-between; }
.dcard .nm { font-family: var(--f-display); font-style: var(--headline-style); font-weight: 500; font-size: 18px; display: flex; align-items: center; gap: 9px; }
.dcard .nm .mark { color: var(--accent); font-size: 14px; }
.dcard .chip { font: 500 13px/1 var(--f-mono); background: var(--accent); color: #fff; padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.dcard .chip.mo { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.dcard ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dcard li { font-size: 12.5px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; }
.dcard li .a { font-family: var(--f-mono); color: var(--muted); }
.dash-total { margin-top: 14px; border: 1px solid var(--accent); border-radius: var(--radius-lg); background: var(--accent-soft); padding: clamp(20px, 3vw, 28px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.dash-total .lab { font: 500 11px/1.5 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dash-total .quote { font-family: var(--f-mono); font-weight: 500; font-size: clamp(24px, 5vw, 34px); color: var(--ink); }
.dash-total .quote small { font-family: var(--f-body); font-size: 13px; color: var(--muted); letter-spacing: 0; }
.dash-total .dep { text-align: right; }
.dash-total .dep .k { font: 500 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dash-total .dep .v { font-family: var(--f-mono); font-size: 18px; color: var(--accent); margin-top: 6px; }

.est-switch { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.est-switch .lbl { font: 500 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.disclaimer { margin-top: 20px; font-size: 12px; color: var(--muted); line-height: 1.5; }


/* Submit error surfaced by the intake app (validation + failed POST). */
.form-error{margin:16px 0 0;padding:12px 16px;border:1px solid #E63226;border-radius:8px;background:rgba(230,50,38,.08);color:#E63226;font:500 13px/1.5 "Inter Tight",sans-serif}
