/* =========================================================================
   Lindaran — visual system
   Grounded in the painting trade: the paint chip is the structural device.
   Palette is drop-cloth canvas + deep slate ink + painter's-tape blue.
   Type: Archivo (headings, industrial/signage) + Public Sans (UI, body).
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Public+Sans:wght@400;500;600&display=swap');

:root {
  --canvas:      #EDEFF1;   /* drop cloth */
  --surface:     #FFFFFF;
  --surface-2:   #F5F7F8;
  --ink:         #16242E;   /* deep slate, not tinted black */
  --ink-2:       #46585F;
  --ink-3:       #7A8A91;
  --line:        #D6DCE0;
  --tape:        #2A75BB;   /* painter's tape blue */
  --tape-dark:   #1F5A91;
  --tape-wash:   #E8F0F8;
  --money:       #1E6B4F;
  --money-wash:  #E4F1EB;
  --flag:        #B45309;   /* needs a walkthrough */
  --flag-wash:   #FBF0E2;
  --stop:        #B3261E;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 2px rgba(22,36,46,.08), 0 8px 24px -16px rgba(22,36,46,.3);
  --maxw:        1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 16px/1.55 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
h1, h2, h3, h4, .brandmark {
  font-family: Archivo, system-ui, sans-serif; font-weight: 700;
  letter-spacing: -0.021em; line-height: 1.15; margin: 0 0 .5rem;
}
h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1rem; max-width: 68ch; }
a  { color: var(--tape-dark); }
small, .small { font-size: .875rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--tape); outline-offset: 2px; border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }
.narrow { max-width: 620px; }
.stack > * + * { margin-top: 1.1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- top bar ---------- */
.topbar { background: var(--ink); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 1rem; }
.brandmark { color: #fff; text-decoration: none; font-size: 1.12rem; display: flex; align-items: center; gap: .5rem; }
/* The logo is a paint chip: a stack of three tones of one hue. */
.chip-logo { width: 15px; height: 26px; border-radius: 2px; overflow: hidden; display: block; flex: none; }
.chip-logo i { display: block; height: 33.34%; }
.chip-logo i:nth-child(1) { background: #8FC0E8; }
.chip-logo i:nth-child(2) { background: #4A92D0; }
.chip-logo i:nth-child(3) { background: var(--tape); }
.topnav { display: flex; gap: 1.1rem; align-items: center; }
.topnav a { color: #C9D6DD; text-decoration: none; font-size: .94rem; font-weight: 500; }
.topnav a:hover, .topnav a[aria-current] { color: #fff; }
@media (max-width: 559px) {
  .topbar .wrap { height: auto; min-height: 52px; flex-wrap: wrap; padding-top: .55rem; padding-bottom: .55rem; row-gap: .35rem; }
  .topnav { width: 100%; gap: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .topnav a { white-space: nowrap; font-size: .92rem; padding: .3rem 0; }
}

/* ---------- cards & panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card.pad-lg { padding: 1.6rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); font-weight: 600; }
.panel-body { padding: 1.1rem; }
main { padding: 1.75rem 0 4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1rem/1 'Public Sans', sans-serif; padding: .8rem 1.15rem; min-height: 46px;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  background: var(--tape); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--tape-dark); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { background: none; color: var(--ink-2); border-color: transparent; padding-inline: .5rem; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-money { background: var(--money); } .btn-money:hover { background: #17533D; }
.btn-danger { background: var(--surface); color: var(--stop); border-color: #E3BDBA; }
.btn-lg { font-size: 1.08rem; padding: 1rem 1.5rem; min-height: 54px; width: 100%; }
@media (min-width: 560px) { .btn-lg { width: auto; } }
.row > .btn-lg { flex: 1 1 auto; width: auto; }
@media (min-width: 560px) { .row > .btn-lg { flex: 0 0 auto; } }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.hint { font-size: .85rem; color: var(--ink-3); font-weight: 400; margin: -.1rem 0 .35rem; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: .72rem .8rem; font: 400 1rem 'Public Sans', sans-serif;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); min-height: 46px;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--tape); }
.field + .field { margin-top: 1rem; }
.inline-field { display: grid; grid-template-columns: 1fr 130px; gap: .75rem; align-items: center; }
.inline-field label { margin: 0; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; cursor: pointer; padding: .5rem 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--tape); }

/* Big tappable choices — painters and homeowners are on phones. */
.choices { display: grid; gap: .6rem; }
@media (min-width: 560px) { .choices.two-up { grid-template-columns: 1fr 1fr; } }
.choice {
  display: flex; gap: .8rem; align-items: center; padding: .95rem 1rem; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); font-weight: 500;
}
.choice:hover { border-color: var(--tape); }
.choice input { width: 22px; height: 22px; flex: none; accent-color: var(--tape); }
.choice:has(input:checked) { border-color: var(--tape); background: var(--tape-wash); }
.choice .sub { display: block; font-weight: 400; font-size: .87rem; color: var(--ink-2); }

/* ---------- paint chip: the product's signature element ---------- */
.chips { display: grid; gap: .9rem; }
@media (min-width: 760px) { .chips { grid-template-columns: repeat(3, 1fr); } }
.chip {
  display: block; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left;
  width: 100%; padding: 0; font-family: inherit; color: inherit;
}
.chip:hover { border-color: var(--tape); }
.chip:has(input:checked) { border-color: var(--tape); box-shadow: 0 0 0 3px var(--tape-wash); }
.chip-swatch { height: 74px; display: flex; align-items: flex-end; padding: .55rem .8rem; color: #fff; }
.chip:nth-child(1) .chip-swatch { background: #8FC0E8; color: #12303F; }
.chip:nth-child(2) .chip-swatch { background: #4A92D0; }
.chip:nth-child(3) .chip-swatch { background: #1F5A91; }
.chip-swatch span { font-family: Archivo, sans-serif; font-weight: 700; font-size: 1rem; }
.chip-body { display: block; padding: .9rem 1rem 1.1rem; }
.chip-price { display: block; font-family: Archivo, sans-serif; font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; }
.chip-blurb { display: block; font-size: .9rem; color: var(--ink-2); margin: .35rem 0 0; }
.chip-pick { display: flex; align-items: center; gap: .55rem; margin-top: .9rem; font-weight: 600; font-size: .95rem; }
.chip-pick input { width: 20px; height: 20px; accent-color: var(--tape); }

/* ---------- job tickets (dashboard list) ---------- */
.ticket {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--ink-3); border-radius: var(--radius);
  padding: .95rem 1.1rem; text-decoration: none; color: inherit;
}
.ticket:hover { border-color: var(--tape); border-left-color: var(--tape); }
.ticket + .ticket { margin-top: .6rem; }
.ticket.s-new, .ticket.s-estimating, .ticket.s-priced { border-left-color: var(--flag); }
.ticket.s-sent { border-left-color: var(--tape); }
.ticket.s-booked { border-left-color: var(--money); }
.ticket.s-declined { border-left-color: var(--line); opacity: .65; }
.ticket-name { font-family: Archivo, sans-serif; font-weight: 700; font-size: 1.05rem; }
.ticket-meta { font-size: .88rem; color: var(--ink-2); }
.ticket-price { font-family: Archivo, sans-serif; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }

/* ---------- misc ---------- */
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: .2rem .5rem; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag-flag { background: var(--flag-wash); color: var(--flag); border-color: #EBD3B0; }
.tag-money { background: var(--money-wash); color: var(--money); border-color: #BFDDD0; }
.tag-tape { background: var(--tape-wash); color: var(--tape-dark); border-color: #BFD6EA; }
.notice { padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: .94rem; }
.notice.warn { background: var(--flag-wash); border-color: #EBD3B0; color: #7A3B06; }
.notice.good { background: var(--money-wash); border-color: #BFDDD0; color: #14543C; }
.notice.bad  { background: #FBECEB; border-color: #E3BDBA; color: #8C1D18; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat-n { font-family: Archivo, sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -.03em; line-height: 1; }
.stat-l { font-size: .87rem; color: var(--ink-2); margin-top: .3rem; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: .85rem; color: var(--ink-2); }
td.num, th.num { text-align: right; white-space: nowrap; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.steps { display: flex; gap: .4rem; margin-bottom: 1.5rem; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--tape); }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; }
pre { background: var(--ink); color: #DCE7EE; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .84rem; }
.copybox { display: flex; gap: .5rem; }
.copybox input { font-family: ui-monospace, monospace; font-size: .85rem; }
footer { padding: 2rem 0; color: var(--ink-3); font-size: .87rem; border-top: 1px solid var(--line); }

/* ---------- homeowner flow ---------- */
.ho-head { background: var(--ink); color: #fff; padding: 1.1rem 0; }
.ho-head h1 { font-size: 1.25rem; margin: 0; color: #fff; }
.ho-head .small { color: #A9BCC6; }
.progress { height: 6px; background: rgba(255,255,255,.18); }
.progress i { display: block; height: 100%; background: var(--tape); transition: width .25s ease; }
.ho-step { display: none; }
.ho-step.on { display: block; }
.photo-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .65rem; }
.slot { border: 1.5px dashed var(--line); border-radius: var(--radius); aspect-ratio: 4/3; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: .3rem; cursor: pointer;
  background: var(--surface); text-align: center; padding: .5rem; font-size: .85rem; color: var(--ink-2); position: relative; overflow: hidden; }
.slot:hover { border-color: var(--tape); color: var(--tape-dark); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .x { position: absolute; top: 4px; right: 4px; background: rgba(22,36,46,.82); color: #fff; border: 0;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.slot-plus { font-size: 1.5rem; font-family: Archivo, sans-serif; }

/* Line items on the painter's quote page: descriptions wrap, never truncate. */
.line-items td { vertical-align: top; }
.line-items textarea { min-height: 46px; resize: vertical; line-height: 1.35; }
.danger-zone { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

/* Spam trap on the homeowner form: off-screen, never seen by people. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
