/* FairBuild Web: "work truck" style. Plain, organized, readable on a phone. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #F8F6F1;
  --surface: #FFFFFF;
  --navy: #1C2F4A;
  --ink: #1E2430;
  --muted: #4A5363;
  --line: #D8D3C6;
  --field-border: #6B7280;
  --amber: #F2A93B;
  --amber-hover: #F6BE63; /* lighter on hover so navy text contrast goes up, not down */
  --focus: var(--navy);

  --radius: 6px;
  --measure: 40rem;
  --wide: 48rem;
  --gutter: 1.25rem;
  --space: clamp(3rem, 8vw, 5rem);

  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(28, 47, 74, 0.15);
}

a, button, input, textarea, label { touch-action: manipulation; }

[id] { scroll-margin-top: 1.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  border-top: 6px solid var(--navy);
}

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2rem, 6vw, 2.875rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 1.875rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

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

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

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--navy);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; outline-color: var(--amber); }

/* Header */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
}
.site-header .wordmark { display: block; line-height: 0; }
.site-header .wordmark img { display: block; height: 50px; width: auto; }
@media (max-width: 30rem) {
  .site-header .wordmark img { height: 40px; }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  text-decoration: none;
  font-weight: 700;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Sections */
.section { padding: var(--space) 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section > .wrap > * { max-width: var(--measure); }
.section > .wrap > .estimate { max-width: var(--wide); }

.lead { font-size: 1.25rem; color: var(--muted); max-width: 34rem; }

.hero { padding-top: clamp(2rem, 6vw, 4rem); }
.hero h1 { max-width: 36rem; }

/* Full-width photo banner at the end of the hero. Nothing is overlaid on it. */
.hero.has-banner { padding-bottom: 0; }
.banner {
  display: block;
  width: 100%;
  /* 4:1 crop: 320px tall at 1280px wide; capped at 320px on wider screens. */
  height: auto;
  max-height: 320px;
  object-fit: cover;
  margin-top: clamp(2rem, 6vw, 3.5rem);
}
/* Required photo credit (CC BY-SA 4.0): one small line, right-aligned under the banner. */
.banner-credit {
  margin: 0;
  padding: 0.35rem var(--gutter) 0.75rem;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}
.banner-credit a {
  color: inherit;
  white-space: nowrap;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.banner-credit a:hover { text-decoration-thickness: 2px; }

/* Text for screen readers only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--amber);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: inherit;
  text-decoration: none;
}
.button:hover {
  background: var(--amber-hover);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Who it's for */
.split {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (min-width: 40rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .section > .wrap > .split { max-width: var(--wide); }
}

/* Estimate sheet: the one standout element */
.estimate {
  background: var(--surface);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.5rem var(--gutter);
  margin-top: 1.5rem;
}
@media (min-width: 40rem) { .estimate { padding: 2rem 2.25rem; } }

.estimate-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--muted);
  font-size: 1rem;
}

.line-items { list-style: none; margin: 0; padding: 0; }
.line-items li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--line);
}
.line-items .item { flex: 1; min-width: 0; overflow-wrap: break-word; }
.line-items .item small { display: block; color: var(--muted); font-size: 1rem; }
.line-items .status {
  flex: none;
  font-weight: 700;
  color: var(--navy);
}
.line-items .status::before {
  content: "\2713\00a0" / "";
}

.estimate-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 4px double var(--navy);
  color: var(--navy);
  font-weight: 700;
}
.estimate-total .label { font-size: 1.25rem; }
.estimate-total .amount { font-size: clamp(1.5rem, 5vw, 2rem); }

/* After launch */
.costs { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.costs li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.costs li:last-child { border-bottom: 1px solid var(--line); }
.costs strong { color: var(--navy); }

/* Closing band */
.band {
  background: var(--navy);
  color: var(--bg);
  border-top: 0;
  --focus: var(--amber);
}
.band h2 { color: var(--bg); }
.band a:not(.button) { color: var(--bg); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 1rem;
}
.site-footer p { margin: 0 0 0.25rem; }
.site-footer .wordmark { font-size: 1.125rem; }

/* Contact page */
.phone-link {
  display: inline-block;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  white-space: nowrap;
}
.form { margin-top: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.field .hint { display: block; color: var(--muted); font-size: 1rem; margin-bottom: 0.35rem; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--field-border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--navy); outline-offset: 1px; }
.form .button { margin-top: 0.5rem; border-color: var(--navy); cursor: pointer; }
.form-note { color: var(--muted); font-size: 1rem; margin-top: 1rem; }

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