/* Tyler Grid — one stylesheet, system fonts, mobile first (375px), widened at 768px. */

:root {
  --ink: #0f1b2d;
  --ink-2: #3a4657;
  --paper: #f7f6f2;
  --card: #ffffff;
  --line: #dcd9d0;
  --accent: #1f7a6d;
  --accent-ink: #17604f;
  --accent-soft: #e4f0ed;
  --bubble-in: #e9e7e0;
  --error: #a3261b;
  --radius: 6px;
  --wrap: 1100px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 5vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img, svg { display: block; max-width: 100%; }
ul, ol { padding-left: 1.2em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand-name { font-weight: 800; letter-spacing: .16em; font-size: .95rem; line-height: 1.1; }
.brand-tag { display: none; font-size: .72rem; letter-spacing: .02em; opacity: .75; font-weight: 400; }
.site-nav { display: none; }
.site-header .btn { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.site-header .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.site-header .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 22px;
  border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  font: 700 1.02rem/1.2 var(--font); text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--card); }
.kicker { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .6em; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { padding: 32px 0 48px; }
.hero .eyebrow { font-size: .9rem; font-weight: 600; color: var(--accent-ink); margin-bottom: .8em; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 40em; }
.hero-cta { margin: 24px 0 14px; }
.hero-call { margin: 0 0 14px; font-size: 1rem; }
.hero-call a { font-weight: 700; }
.hero-note { font-size: .92rem; color: var(--ink-2); max-width: 34em; }

/* Example phone conversation */
.phone {
  margin: 32px auto 0; max-width: 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 14px 14px 18px;
}
.phone-label { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--ink-2); padding: 2px 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.phone-label strong { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--accent-ink); }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 16px; margin: 0 0 8px; font-size: .95rem; line-height: 1.4; }
.msg-who { display: block; font-size: .72rem; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.msg-out { background: var(--accent); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-in { background: var(--bubble-in); color: var(--ink); border-bottom-left-radius: 4px; }

/* ---------- Leaks ---------- */
.leaks { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.leak { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.section-alt .leak { background: var(--paper); }
.leak svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.leak h3 { margin-bottom: .3em; }
.leak p { margin: 0; color: var(--ink-2); }
.closing { font-weight: 600; max-width: 40em; }

/* ---------- What Tyler Grid does ---------- */
.does { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; }
.does li { padding: 16px 0 16px 40px; border-top: 1px solid var(--line); position: relative; }
.does li:last-child { border-bottom: 1px solid var(--line); }
.does li::before {
  content: ""; position: absolute; left: 6px; top: 22px; width: 8px; height: 15px;
  border: solid var(--accent); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.does strong { display: block; }
.does span { color: var(--ink-2); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.steps strong { display: block; margin-bottom: 2px; }
.steps span { color: var(--ink-2); }

/* ---------- Pricing ---------- */
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 24px 0 18px; }
.price-row { display: grid; gap: 2px; padding: 16px 18px; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-row dt { font-weight: 700; }
.price-row dd { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.price-row dd b { color: var(--ink); font-size: 1.15rem; }
.section-alt .price-card { background: var(--paper); }

/* ---------- About ---------- */
.about { display: grid; gap: 24px; }
.about-photo { width: 100%; max-width: 280px; aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bubble-in); object-fit: cover; }
.about .call { font-weight: 700; }

/* ---------- Never ---------- */
.never { list-style: none; padding: 0; margin: 20px 0 0; }
.never li { padding: 12px 0 12px 36px; border-top: 1px solid var(--line); position: relative; }
.never li:last-child { border-bottom: 1px solid var(--line); }
.never li::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 16px; height: 2.5px; background: var(--ink);
  transform: translateY(-50%) rotate(45deg);
}
.never li::after {
  content: ""; position: absolute; left: 6px; top: 50%; width: 16px; height: 2.5px; background: var(--ink);
  transform: translateY(-50%) rotate(-45deg);
}

/* ---------- FAQ ---------- */
.faq { margin-top: 20px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 700; position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--accent-ink);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

/* ---------- Form ---------- */
.form-section h2 { margin-bottom: .3em; }
.audit-form { margin-top: 24px; max-width: 560px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: .98rem; padding: 0; }
.field .hint { font-weight: 400; color: var(--ink-2); font-size: .9rem; }
.req { color: var(--error); }
input[type=text], input[type=tel], input[type=email], input[type=url], select {
  width: 100%; min-height: 50px; padding: 10px 12px;
  border: 1.5px solid #b9b5aa; border-radius: var(--radius); background: #fff; color: var(--ink);
  font: inherit; font-size: 17px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.audit-form input:user-invalid, .audit-form select:user-invalid { border-color: var(--error); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.choice { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 1.5px solid #b9b5aa; border-radius: var(--radius); background: #fff; cursor: pointer; font-weight: 400; }
.field .choice { padding: 0 18px 0 14px; font-weight: 400; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.consent label { font-weight: 700; }
.consent p { grid-column: 2; margin: 0; font-size: .88rem; color: var(--ink-2); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { font-size: .88rem; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d6dae0; padding: 40px 0 120px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .7em; }
.site-footer .brand-line { color: #fff; font-weight: 700; letter-spacing: .04em; }

/* ---------- Sticky mobile bar (shown by site.js) ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(247, 246, 242, .97); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .2s ease;
}
.sticky-bar.is-visible { transform: translateY(0); }
.sticky-bar .btn { min-height: 48px; padding: 10px; }
@media (prefers-reduced-motion: reduce) { .sticky-bar { transition: none; } }

/* ---------- Simple pages (thanks, privacy, 404, /audit) ---------- */
.page { padding: 40px 0 64px; }
.page .wrap { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }
.prose li { margin-bottom: .4em; }
.draft-banner { background: #fff4d6; border: 1px solid #e6c766; color: #5b4300; padding: 12px 14px; border-radius: var(--radius); font-size: .92rem; margin-bottom: 24px; }
.placeholder { background: #fff4d6; outline: 1px dashed #c9a43a; padding: 0 2px; }

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .brand-tag { display: block; }
  .leaks { grid-template-columns: 1fr 1fr; }
  .price-row { grid-template-columns: 220px 1fr; gap: 16px; align-items: baseline; }
}

@media (min-width: 768px) {
  :root { --gutter: 28px; }
  body { font-size: 18px; }
  .site-nav { display: flex; gap: 22px; }
  .site-nav a { color: #fff; text-decoration: none; font-size: .92rem; opacity: .85; }
  .site-nav a:hover { opacity: 1; color: #fff; }
  .site-header .wrap { min-height: 68px; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
  .phone { margin: 0 0 0 auto; }
  .btn-hero { width: auto; display: inline-flex; padding: 14px 28px; }
  .section { padding: 80px 0; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 64px 18px 18px; }
  .does { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .does li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .pricing-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
  .pricing-grid .price-card { margin-top: 0; }
  .about { grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
  .sticky-bar { display: none; }
  .site-footer { padding-bottom: 48px; }
}

@media (min-width: 1000px) {
  .leaks { grid-template-columns: repeat(4, 1fr); }
}
