/* Precise Handyman — public site styles (mobile-first, no dependencies) */

:root {
  --navy: #182635;
  --navy-2: #223549;
  --orange: #e2601f;
  --orange-dark: #c34f14;
  --bg: #f7f5f1;
  --card: #ffffff;
  --text: #22303f;
  --muted: #5d6b7a;
  --line: #e3e0da;
  --green: #1e7d47;
  --red: #b03232;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(24, 38, 53, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-dark); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; text-align: center; cursor: pointer;
  font-weight: 700; font-size: 1rem; border-radius: 10px; border: 2px solid transparent;
  padding: .7rem 1.35rem; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef1f5; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.08rem; }
.btn-block { display: block; width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; }
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.15rem; color: var(--navy); text-decoration: none; white-space: nowrap;
}
.brand-mark {
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--navy); color: #fff; border-radius: 8px; font-size: 1.2rem;
}
.site-nav { display: none; align-items: center; gap: 1.1rem; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a.active, .site-nav a:not(.btn):hover { color: var(--orange-dark); }
.nav-toggle { font-size: 1.5rem; background: none; border: 0; color: var(--navy); cursor: pointer; }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 899px) {
  .site-nav.open {
    display: flex; position: absolute; inset: 100% 0 auto 0; flex-direction: column;
    align-items: stretch; background: #fff; padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.open a { padding: .45rem 0; }
  .nav-phone { order: 98; } .site-nav .btn-primary { order: 99; }
}

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #eef2f6; padding: 3.5rem 0 4rem; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3.1rem); margin-bottom: .6rem; }
.hero p.lead { font-size: 1.15rem; max-width: 40rem; color: #c9d4df; margin: 0 0 1.6rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; padding: 0; list-style: none; }
.hero-badges li { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: #dfe7ee; }
.hero-badges .tick { color: #6fc48f; font-size: 1.1rem; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-head p { color: var(--muted); margin: 0; }

/* Service cards */
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.card p { color: var(--muted); margin: 0 0 1rem; font-size: .95rem; flex: 1; }
.card .card-link { font-weight: 700; text-decoration: none; }

/* Steps */
.steps { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.step .num {
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center; margin-bottom: .7rem;
  background: var(--orange); color: #fff; font-weight: 800; border-radius: 50%;
}
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Forms */
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem; max-width: 640px;
}
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }
label.field-label { font-weight: 700; font-size: .95rem; display: block; margin-bottom: .3rem; }
.hint { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  border: 1.5px solid #cfd6dd; border-radius: 8px; padding: .7rem .8rem; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
textarea { min-height: 8rem; resize: vertical; }

/* Photo upload */
.photo-drop {
  display: block;
  border: 2px dashed #c4cdd6; border-radius: var(--radius); background: #fafbfc;
  padding: 1.3rem; text-align: center; cursor: pointer;
}
.photo-drop:hover { border-color: var(--orange); background: #fff8f4; }
.photo-drop strong { color: var(--navy); }
.photo-drop input { display: none; }
.photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .6rem; margin-top: .8rem; }
.photo-previews .ph { position: relative; }
.photo-previews img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-previews .rm {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 0; cursor: pointer; font-size: .8rem; line-height: 1;
}

/* Alerts / flash */
.alert { border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.alert-error { background: #fbe9e7; color: #9c2f1d; border: 1px solid #f0c4bc; }
.alert-success { background: #e6f4eb; color: #1e6b3f; border: 1px solid #bfe0cc; }

/* Honeypot — hidden from humans */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Customer documents (quote / invoice / job pages) */
.doc-wrap { max-width: 760px; margin-inline: auto; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.doc-head { background: var(--navy); color: #fff; padding: 1.4rem 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.doc-head h1 { color: #fff; font-size: 1.35rem; margin: 0; }
.doc-head .doc-num { color: #b8c5d1; font-weight: 600; }
.doc-body { padding: 1.6rem; }
.doc-meta { display: grid; gap: .35rem .8rem; grid-template-columns: max-content 1fr; margin: 0 0 1.2rem; }
.doc-meta dt { font-weight: 700; color: var(--muted); }
.doc-meta dd { margin: 0; }
table.items { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table.items th { text-align: left; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: .5rem .4rem; }
table.items td { padding: .6rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items .num { text-align: right; white-space: nowrap; }
.totals { margin-left: auto; max-width: 300px; width: 100%; }
.totals .row { display: flex; justify-content: space-between; padding: .3rem 0; }
.totals .grand { border-top: 2px solid var(--navy); font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-top: .3rem; padding-top: .55rem; }
.decide-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { background: #16613a; }
.btn-decline { background: #fff; color: #9c2f1d; border-color: #d8998e; }
.btn-decline:hover { background: #fbe9e7; }

/* Status pill */
.pill { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #e7ebef; color: var(--navy); }
.pill.approved, .pill.paid, .pill.completed, .pill.sent { background: #e6f4eb; color: #1e6b3f; }
.pill.declined, .pill.cancelled, .pill.failed { background: #fbe9e7; color: #9c2f1d; }
.pill.in_progress, .pill.scheduled, .pill.viewed { background: #e8f0fb; color: #23568f; }

/* Job timeline */
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.3rem 1.6rem; border-left: 2px solid var(--line); margin-left: .5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .25rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--orange); border: 2px solid #fff;
}
.timeline .when { color: var(--muted); font-size: .85rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin-top: .8rem; }
.gallery a img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Footer CTA + footer */
.footer-cta { background: var(--orange); color: #fff; padding: 3rem 0; text-align: center; }
.footer-cta h2 { color: #fff; }
.footer-cta p { margin: 0 0 1.3rem; color: #ffe3d2; }
.footer-cta .cta-row { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.site-footer { background: var(--navy); color: #b8c5d1; padding: 2.2rem 0 4.5rem; font-size: .95rem; }
.site-footer a { color: #dfe7ee; }
.footer-grid { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .site-footer { padding-bottom: 2.2rem; } }

/* Mobile sticky call bar */
.mobile-callbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--green); color: #fff; text-align: center; font-weight: 800;
  padding: .85rem; text-decoration: none;
}
@media (min-width: 720px) { .mobile-callbar { display: none; } }

/* Hero: text plus a mock quote card (below on mobile, right side on desktop) */
.hero-grid { display: grid; gap: 2.2rem; align-items: center; }
.hero-card {
  display: block; background: #fff; border-radius: 16px; color: var(--text);
  box-shadow: 0 18px 50px rgba(10, 18, 28, .45); padding: 1.4rem 1.5rem;
  max-width: 430px; width: 100%; margin: .4rem auto 0; justify-self: center;
}
@media (min-width: 980px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero-card { margin: 0; justify-self: end; padding: 1.5rem 1.7rem; transform: rotate(1.5deg); }
}
.hero-card .hc-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.hero-card .hc-head strong { color: var(--navy); font-size: 1.08rem; }
.hero-card .hc-badge { background: #e6f4eb; color: #1e6b3f; font-size: .76rem; font-weight: 800; border-radius: 999px; padding: .2rem .7rem; white-space: nowrap; }
.hero-card .hc-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.hero-card .hc-row span:last-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
.hero-card .hc-total { display: flex; justify-content: space-between; padding: .75rem 0 .1rem; font-weight: 800; color: var(--navy); font-size: 1.08rem; }
.hero-card .hc-btn { margin-top: .9rem; background: var(--green); color: #fff; text-align: center; font-weight: 800; border-radius: 10px; padding: .75rem; }
.hero-card .hc-note { text-align: center; color: var(--muted); font-size: .8rem; margin-top: .65rem; }

/* Quote page: form + sidebar on desktop */
.quote-layout { display: grid; gap: 1.4rem; align-items: start; }
@media (min-width: 1020px) {
  .quote-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; }
  .quote-layout .form-card { max-width: none; }
}
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; }
.side-card h3 { font-size: 1.02rem; margin-bottom: .7rem; }
.side-steps { list-style: none; margin: 0; padding: 0; }
.side-steps li { display: flex; gap: .7rem; align-items: flex-start; padding: .45rem 0; color: #3c4a59; font-size: .95rem; }
.side-steps .n { flex: 0 0 1.6rem; height: 1.6rem; display: grid; place-items: center; background: var(--orange); color: #fff; border-radius: 50%; font-weight: 800; font-size: .85rem; }

/* Service area chips */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .3rem .85rem; font-weight: 600; font-size: .9rem; color: var(--navy);
}
.chip::before { content: "\1F4CD"; font-size: .85em; }

/* "Track your job" homepage section */
.track-grid { display: grid; gap: 2.2rem; align-items: center; }
@media (min-width: 980px) { .track-grid { grid-template-columns: 1.05fr .95fr; gap: 3rem; } }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.feature-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feature-list .fi {
  flex: 0 0 2.5rem; height: 2.5rem; display: grid; place-items: center;
  background: #fdeee2; border-radius: 10px; font-size: 1.25rem;
}
.feature-list strong { display: block; color: var(--navy); margin-bottom: .1rem; }
.feature-list p { margin: 0; color: var(--muted); font-size: .95rem; }
.track-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 34px rgba(24, 38, 53, .14); padding: 1.4rem 1.5rem;
  max-width: 460px; width: 100%; margin-inline: auto;
}
.track-card .tc-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.track-card .tc-head strong { color: var(--navy); }
.tc-photos { display: flex; gap: .5rem; margin-top: .5rem; }
.tc-photos span { width: 54px; height: 54px; border-radius: 8px; display: block; border: 1px solid var(--line); }
.tc-photos span:nth-child(1) { background: linear-gradient(135deg, #dcb18c, #a9743f); }
.tc-photos span:nth-child(2) { background: linear-gradient(135deg, #9fb9c9, #5b7f96); }
.tc-photos span:nth-child(3) { background: linear-gradient(135deg, #cfc7bb, #8d857a); }

/* Roomier sections on desktop */
@media (min-width: 900px) {
  .section { padding: 4.5rem 0; }
  .section-head { margin-bottom: 2.4rem; }
}

/* Misc */
.page-title { padding: 2.6rem 0 0; }
@media (min-width: 900px) { .page-title { padding-top: 3.2rem; } }
.prose { max-width: 46rem; }
.prose p { color: #3c4a59; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.text-muted { color: var(--muted); }
