/* THE LOOK OF EVERY PAGE.
   Change the colors here and the whole site updates. */
:root {
  --navy: #0f2a44;      /* main dark color (header, headings) */
  --navy-2: #1d3d5f;
  --accent: #f59e0b;    /* orange buttons and highlights */
  --accent-dark: #d97706;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --white: #ffffff;
  --green: #15803d;
  --green-bg: #dcfce7;
  --yellow-bg: #fef3c7;
  --gray-bg: #e5e7eb;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--navy-2); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Header / menu ---------- */
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { color: var(--white); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu a { color: #cbd5e1; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.menu a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.menu a.active { color: var(--white); background: rgba(255,255,255,.14); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: var(--navy); font-weight: 700; text-decoration: none;
       padding: 14px 24px; border-radius: 10px; border: 0; font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); }

/* ---------- Sections ---------- */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #e2e8f0; padding: 72px 0 80px; }
.hero h1 { color: var(--white); max-width: 760px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: #cbd5e1; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 12px; }

.section { padding: 64px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 48px 0 36px; }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 680px; margin: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.8rem; margin-bottom: 8px; }
.step-num { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--navy);
            font-weight: 800; align-items: center; justify-content: center; margin-bottom: 12px; }

/* Phone-text example */
.sms { background: #e9eef5; border-radius: 18px 18px 18px 4px; padding: 12px 16px; max-width: 420px; font-size: .95rem; color: var(--text); }
.sms.me { background: var(--accent); color: var(--navy); border-radius: 18px 18px 4px 18px; margin-left: auto; }
.sms-thread { display: flex; flex-direction: column; gap: 10px; background: var(--white); border: 1px solid var(--line);
              border-radius: var(--radius); padding: 20px; max-width: 480px; }
.sms-label { font-size: .75rem; color: var(--muted); }

/* Pricing */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--accent); }
.price-card .tag { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--navy); font-weight: 700;
                   font-size: .75rem; padding: 2px 10px; border-radius: 20px; }
.price { font-size: 2.4rem; font-weight: 800; color: var(--navy); line-height: 1; margin: 8px 0 4px; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* FAQ */
details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px; }
details summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details[open] summary { margin-bottom: 8px; }

/* CTA band */
.cta { background: var(--navy); color: #cbd5e1; border-radius: var(--radius); padding: 40px; text-align: center; }
.cta h2 { color: var(--white); }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
label { display: block; font-weight: 600; margin-bottom: 16px; color: var(--navy); }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 16px; font-family: inherit;
        border: 1px solid #cbd5e1; border-radius: 10px; background: var(--white); color: var(--text); }
input:focus, textarea:focus { outline: 3px solid rgba(245,158,11,.35); border-color: var(--accent); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check-row input { width: auto; margin-top: 5px; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.notice { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; }
.notice.ok { background: var(--green-bg); color: var(--green); }
.notice.error { background: var(--red-bg); color: var(--red); }

/* ---------- Contractor app ---------- */
.app-header { background: var(--white); border-bottom: 1px solid var(--line); }
.app-header .logo { color: var(--navy); }
.app-header .menu a { color: var(--muted); }
.app-header .menu a:hover { color: var(--navy); background: var(--bg); }
.app-header .menu a.active { color: var(--navy); background: var(--yellow-bg); }
.app-main { padding: 32px 0 64px; }
.app-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.app-title h1 { font-size: 1.8rem; margin: 0; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .num { font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .label { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.table-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
     background: var(--bg); padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge.waiting { background: var(--yellow-bg); color: #92400e; }
.badge.replied { background: var(--green-bg); color: var(--green); }
.badge.opted_out { background: var(--gray-bg); color: #374151; }
.small { font-size: .85rem; color: var(--muted); }
.err { color: var(--red); }
.reply { color: var(--green); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: 40px 0; margin-top: 0; font-size: .95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #cbd5e1; text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: var(--white); }

/* Legal pages */
.legal h1 { font-size: 2rem; }
.legal h3 { margin-top: 1.6em; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 44px 0; }
  .cta { padding: 28px 20px; }
  .menu a { padding: 6px 8px; font-size: .9rem; }
  /* Quote table becomes stacked cards on phones */
  .table-card table, .table-card tbody, .table-card tr, .table-card td { display: block; width: 100%; }
  .table-card thead { display: none; }
  .table-card tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table-card td { border: 0; padding: 4px 16px; }
}
