/*
 * Old Lyme Sewer Answers.
 *
 * The audience is homeowners, many of them older, reading this because a public
 * project is about to dig up their front yard. Everything is tuned for that:
 * large base type, high contrast, short line lengths, tappable phone numbers.
 *
 * The palette comes from the job itself. Under the APWA uniform color code,
 * sewer and drain lines are marked in green, so the marking green is the accent
 * and it is used the way paint is used on a road: thin, deliberate, structural.
 * Never as a large field, and never behind small text, where it does not carry
 * enough contrast.
 *
 * Single theme on purpose. This is a public marketing site with a printed
 * counterpart, so every color is painted explicitly rather than inherited.
 */

:root {
  /* ground and ink: cool neutrals biased very slightly green, not pure grey */
  --ground: #f2f5f2;
  --panel: #ffffff;
  --ink: #141d18;
  --ink-soft: #4c5b53;
  --ink-faint: #7d8c84;
  --line: #d5ddd6;

  /* structural dark */
  --deep: #123b2a;
  --deep-2: #0b2418;

  /* APWA sewer marking green */
  --mark: #00a651;
  --mark-ink: #08241a;
  --mark-soft: #e3f4ea;
  --mark-light: #5fd99a;

  --ok-bg: #e4f2e9;
  --ok-line: #aed4bd;
  --ok-ink: #145032;
  --err-bg: #fbeceb;
  --err-line: #e0bcb9;
  --err-ink: #7c2924;

  --radius: 4px;
  --wrap: 64rem;
  --measure: 34rem;

  --display: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: Barlow, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.6vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.1875rem; letter-spacing: -0.005em; }

p { margin: 0 0 1.05em; max-width: var(--measure); }
a { color: var(--deep); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

/* Uppercase condensed labels, set like the annotations on an engineering plan. */
.eyebrow, .label, .party dt, .direct dt, .field label, .num {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.eyebrow {
  font-size: 0.875rem;
  color: var(--mark);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
/* The short rule is the marking stripe. It is the one decorative device on the
   page and it appears in exactly one role, so it stays meaningful. */
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 3px;
  background: var(--mark);
  flex: none;
}

/* ---- header ---- */

.site-head { background: var(--deep-2); color: #fff; }
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.95rem;
  border-bottom: 3px solid var(--mark);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
}
.brand span {
  display: block;
  font-family: var(--label);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mark-light);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  font-family: var(--label);
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
/* The condensed type is small by design; the tap target should not be. Padding
   is vertical only so the header layout is unchanged. */
.nav a { color: #cfe0d6; text-decoration: none; padding-block: 0.45rem; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--mark); }

/* ---- hero ---- */

.hero {
  background: var(--deep);
  color: #fff;
  padding-block: clamp(2.75rem, 7.5vw, 4.75rem);
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero p { color: #d2e2d8; font-size: 1.1875rem; max-width: 38rem; }
.hero .actions { margin-top: 1.9rem; }

/* ---- buttons ---- */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
/* Safety paint. The one saturated element on the page. */
.btn-primary { background: var(--mark); color: var(--mark-ink); border-color: var(--mark); }
.btn-primary:hover { background: #00b95a; border-color: #00b95a; }
.btn-primary[disabled] { opacity: 0.6; cursor: default; }
.btn-ghost { border-color: rgba(255,255,255,0.45); color: #fff; background: none; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--deep); color: #fff; border-color: var(--deep); }
.btn-dark:hover { background: var(--deep-2); border-color: var(--deep-2); }
.btn-outline { border-color: var(--deep); color: var(--deep); background: none; }
.btn-outline:hover { background: #e6ede8; }

/* ---- sections ---- */

section { padding-block: clamp(2.5rem, 6vw, 3.9rem); }
section + section { border-top: 1px solid var(--line); }
.lede { font-size: 1.1875rem; color: var(--ink-soft); max-width: 40rem; }

.grid { display: grid; gap: 1.25rem; margin-top: 1.9rem; }
@media (min-width: 42rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 54rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Not everything is a card. Plain steps get a rule and nothing else; only the
   two contractors, who are the real objects on this page, get a panel. */
.step { border-top: 1px solid var(--line); padding-top: 1rem; }
.step p { margin-bottom: 0; color: var(--ink-soft); }
.step .num {
  display: block;
  font-size: 0.875rem;
  color: var(--mark);
  margin-bottom: 0.4rem;
}

/* The two halves of the job, keyed like items in a site plan legend. The whole
   point of the site is that the homeowner does not have to coordinate them. */
.party {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--mark);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.party > .label {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin: 0 0 0.3rem;
}
.party > p { color: var(--ink-soft); }
.party dl { margin: 1.15rem 0 0; font-size: 1rem; }
.party dt { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 0.9rem; }
.party dt:first-of-type { margin-top: 0; }
/* accurateconstructionllc@yahoo.com is a 31 character unbroken string and this
   column is about 280px wide on a phone, so it has to be allowed to break. */
.party dd { margin: 0.1rem 0 0; color: var(--ink); overflow-wrap: break-word; }
/* A phone number an older homeowner taps on a phone needs a real target, not a
   line of text. Negative margin keeps the visual spacing identical. */
.party dd a[href^="tel:"], .direct dd a[href^="tel:"], .site-foot a[href^="tel:"] {
  display: inline-block;
  padding-block: 0.55rem;
  margin-block: -0.4rem;
}
/* A license number is a stamp, so it is set like one. */
.party dd.stamp {
  font-family: var(--label);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.1rem 0.5rem;
  background: var(--mark-soft);
}

/* ---- pricing slot ----
   Prices were not available. Swap this block for the real table; nothing else
   on the site has to change. */
.price-pending {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mark);
  border-radius: var(--radius);
  padding: 1.6rem;
  max-width: 40rem;
  margin-top: 1.75rem;
}
.price-pending > :last-child { margin-bottom: 0; }

/* ---- FAQ ---- */

.faq { max-width: 42rem; margin-top: 1.75rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 1rem 2.25rem 1rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 0.4rem; top: 1.45rem;
  width: 0.7rem; height: 3px;
  background: var(--mark);
}
.faq summary::before {
  content: "";
  position: absolute; right: 0.7rem; top: 1.15rem;
  width: 3px; height: 0.7rem;
  background: var(--mark);
}
.faq details[open] summary::before { display: none; }
.faq details p { color: var(--ink-soft); padding-bottom: 0.4rem; }

/* ---- contact and form ---- */

.contact { background: var(--deep-2); color: #fff; border-top: none; }
.contact h2 { color: #fff; }
.contact .lede { color: #c6d8cc; }
.contact a { color: var(--mark-light); }

.contact-grid { display: grid; gap: 2.25rem; margin-top: 2rem; align-items: start; }
@media (min-width: 54rem) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }

.direct { margin: 0; }
.direct dt { font-size: 0.8125rem; color: var(--mark-light); }
.direct dd {
  margin: 0.15rem 0 1.35rem;
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.direct dd:last-child { margin-bottom: 0; }
.direct dd { overflow-wrap: break-word; }
.direct dd a { text-decoration: none; }
.direct dd a:hover { text-decoration: underline; }

form.inquiry {
  background: var(--panel);
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 4px solid var(--mark);
  padding: 1.6rem;
}
form.inquiry h3 { margin-bottom: 0.2rem; }
form.inquiry .hint { font-size: 1rem; color: var(--ink-soft); margin-bottom: 1.35rem; }
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.field .opt { text-transform: none; letter-spacing: 0; color: var(--ink-faint); }
.field input, .field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #bcc7c0;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 5.25rem; resize: vertical; }

/* Off-screen rather than display:none so bots that check computed styles still
   fill it in. */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Turnstile renders its own fixed-size iframe, so it only needs room around it. */
.turnstile { margin: 0.25rem 0 1.15rem; min-height: 65px; }

.form-note { font-size: 0.875rem; color: var(--ink-faint); margin: 0.9rem 0 0; max-width: none; }
.form-msg {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  max-width: none;
}
.form-msg.ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-ink); }
.form-msg.err { background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err-ink); }
.form-msg.wait { background: var(--mark-soft); border: 1px solid #b6ddc6; color: var(--deep); }
.form-msg.wait strong { font-family: var(--display); }

/* A disabled submit button must LOOK disabled, or people keep clicking it. */
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---- footer ---- */

.site-foot {
  background: var(--deep-2);
  color: #92a89a;
  font-size: 0.9375rem;
  padding-block: 2.25rem;
  border-top: 3px solid var(--mark);
}
.site-foot p { max-width: 46rem; }
.site-foot a { color: #cfe0d6; }
.site-foot .fine { color: #728578; margin-bottom: 0; font-size: 0.875rem; }

/* ---- 404 ---- */
.plain { padding-block: clamp(3rem, 10vw, 5.5rem); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
