/* Porch to Roof. Colours, type, spacing and corners come from sprint/brand/brand-guide/tokens.json.
   Rules followed: green leads, orange is a small accent, blue is never used here, flat colour, borders not shadows. */
:root {
  --green: #1E4D3A; --green-shade: #163A2B; --orange: #E87722; --orange-text: #A44E0C;
  --cream: #FBF5E8; --porch-white: #F2E9CD; --sand: #E0C9A0; --sand-shade: #B79A70;
  --ink: #14201A; --ink-soft: #4F5C55;
  --display: "Alfa Slab One", "Rockwell Extra Bold", Rockwell, Georgia, serif;
  --script: Yellowtail, "Brush Script MT", cursive;
  --heading: "Zilla Slab", Rockwell, Georgia, serif;
  --text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;
  --r-sm: 4px; --r-md: 8px; --r-lg: 16px;
  --measure: 68ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s6); }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 27px; padding-bottom: 60px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green-shade); text-decoration-color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: var(--r-sm); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s4); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--cream); padding: var(--s2) var(--s4); z-index: 20; }

h1, h2, h3 { font-family: var(--heading); color: var(--green); margin: 0; text-wrap: balance; }
h1 { font-size: 34px; line-height: 40px; font-weight: 700; }
h2 { font-size: 28px; line-height: 34px; font-weight: 700; margin-bottom: var(--s4); }
h3 { font-size: 22px; line-height: 28px; font-weight: 600; margin: var(--s8) 0 var(--s2); }
p, ul, ol { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: var(--s2); }
li::marker { color: var(--sand-shade); }
ol li::marker { color: var(--green); font-weight: 700; }
strong { font-weight: 700; }
small { font-size: 14px; line-height: 21px; color: var(--ink-soft); font-weight: 400; }

/* buttons: one main action, green with cream text */
.btn { display: inline-block; font: 700 17px/24px var(--text); padding: var(--s3) var(--s6); border-radius: var(--r-md); border: 2px solid var(--green); background: var(--green); color: var(--cream); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-shade); border-color: var(--green-shade); color: var(--cream); }
.btn-line { background: transparent; color: var(--green); }
.btn-line:hover { background: var(--porch-white); color: var(--green-shade); }
.btn-small { padding: var(--s2) var(--s4); font-size: 16px; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0; }

/* header */
.site-head { background: var(--cream); border-bottom: 2px solid var(--green); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-top: var(--s3); padding-bottom: var(--s3); }
.logo img { width: 190px; }
.head-cta { display: flex; align-items: center; gap: var(--s4); }
.head-phone { display: none; font: 700 22px/28px var(--text); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.nav { background: var(--green); }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 700; display: block; padding: var(--s3) 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.nav-wide { display: none; }
.nav-fold summary { color: var(--cream); font-weight: 700; padding: var(--s3) 0; cursor: pointer; list-style: none; }
.nav-fold summary::-webkit-details-marker { display: none; }
.nav-fold summary::after { content: " +"; }
.nav-fold[open] summary::after { content: " \2212"; }
.nav-fold ul { padding-bottom: var(--s3); border-top: 1px solid var(--green-shade); }

/* hero */
.hero { padding: var(--s8) 0 var(--s6); border-bottom: 1px solid var(--sand-shade); }
.hero-text > * { max-width: var(--measure); }
.lead { font-size: 20px; line-height: 30px; margin-top: var(--s4); }
.hero-art { margin-top: var(--s6); max-width: 360px; }
.tagline { font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--green); font-size: 26px; line-height: 30px; margin: var(--s6) 0 0; letter-spacing: 0.01em; }
.tagline span { display: block; }

/* sections */
.sec { padding: var(--s12) 0 0; }
.sec:last-of-type { padding-bottom: var(--s12); }
.sec > .wrap > *:not(.table-wrap):not(.cards):not(.cols):not(.form) { max-width: var(--measure); }
.sec > .wrap > h2 { max-width: 24em; }

/* tables: sand stripes, hairlines */
.table-wrap { overflow-x: auto; margin: 0 0 var(--s6); border: 1px solid var(--sand-shade); border-radius: var(--r-md); max-width: 860px; background: var(--cream); }
table { border-collapse: collapse; width: 100%; font-size: 17px; }
th, td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--sand-shade); }
thead th { background: var(--green); color: var(--cream); font-weight: 700; border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--porch-white); }
tbody tr:last-child td { border-bottom: 0; }
td:last-child { font-variant-numeric: tabular-nums; }

/* home: the three lead jobs */
.cards { display: grid; gap: var(--s4); }
.card { background: var(--porch-white); border: 2px solid var(--green); border-radius: var(--r-md); padding: var(--s6); display: flex; flex-direction: column; }
.card h3 { margin-top: 0; }
.card p { margin-bottom: var(--s3); }
.card p:has(> strong:only-child) { font-size: 22px; line-height: 28px; color: var(--green); margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--sand-shade); font-variant-numeric: tabular-nums; }
.card p:last-child { margin-bottom: 0; }
.card p:last-child a { font-weight: 700; }
.cols p { font-family: var(--heading); font-size: 22px; line-height: 28px; color: var(--green); margin: var(--s6) 0 var(--s2); }
.cols p strong { font-weight: 600; }
.cols ul { list-style: none; padding: 0; border-top: 1px solid var(--sand-shade); }
.cols li { padding: var(--s3) 0; margin: 0; border-bottom: 1px solid var(--sand-shade); }
.cols li a { font-weight: 700; }

/* the promise: the one solid green panel */
.sec-promise > .wrap { background: var(--green); color: var(--cream); border-radius: var(--r-lg); padding: var(--s8) var(--s6); max-width: 1088px; }
.sec-promise h2, .sec-promise a, .sec-promise strong { color: var(--cream); }
.sec-promise a:hover { color: var(--porch-white); }
.sec-promise ol { list-style: none; padding: 0; counter-reset: p; }
.sec-promise ol li { counter-increment: p; padding: var(--s4) 0 var(--s4) 56px; position: relative; border-top: 1px solid rgba(251, 245, 232, 0.35); margin: 0; }
.sec-promise ol li::before { content: counter(p); position: absolute; left: 0; top: var(--s4); width: 40px; height: 40px; border-radius: 999px; background: var(--orange); color: var(--ink); font: 400 20px/40px var(--display); text-align: center; }
.sec-promise ol li strong:first-child { font-family: var(--heading); font-size: 22px; }
.sec-promise li::marker { color: var(--cream); }

/* questions */
.sec-faq h3 { padding-top: var(--s6); border-top: 1px solid var(--sand-shade); margin-top: var(--s6); }
.sec-faq h3:first-of-type { border-top: 0; padding-top: 0; margin-top: var(--s4); }
.sec-short > .wrap { background: var(--porch-white); border: 2px solid var(--green); border-radius: var(--r-md); padding: var(--s6); max-width: 760px; margin-left: var(--s4); margin-right: var(--s4); width: auto; }
.sec-short h2 { font-size: 22px; line-height: 28px; }
.sec-close > .wrap { border-top: 2px solid var(--green); padding-top: var(--s8); }

/* quote form */
.form { max-width: 720px; background: var(--porch-white); border: 2px solid var(--green); border-radius: var(--r-md); padding: var(--s6); }
.field { display: block; margin-bottom: var(--s4); }
.field > span, .form-head, legend { display: block; font-weight: 700; margin-bottom: var(--s2); padding: 0; }
.field input, .field textarea { width: 100%; font: 400 17px/27px var(--text); color: var(--ink); background: var(--cream); border: 2px solid var(--sand-shade); border-radius: var(--r-sm); padding: var(--s2) var(--s3); }
.field input:focus, .field textarea:focus { border-color: var(--green); outline: 3px solid var(--orange); outline-offset: 1px; }
.field.bad input { border-color: var(--orange-text); }
.field.bad > span::after { content: "  Please fill this in."; color: var(--orange-text); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.ticks legend { font-family: var(--heading); font-size: 20px; color: var(--green); font-weight: 600; border-top: 1px solid var(--sand-shade); width: 100%; padding-top: var(--s3); }
.tick { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s2) 0; cursor: pointer; }
.tick input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.radios { display: flex; flex-wrap: wrap; gap: 0 var(--s6); }
.radios legend { width: 100%; }
.form-head { margin-top: var(--s6); }
.form-note { font-size: 16px; color: var(--ink-soft); }
.panel { background: var(--cream); border: 2px solid var(--green); border-radius: var(--r-md); padding: var(--s6); margin-top: var(--s6); }
.panel h3 { margin-top: 0; }
pre { white-space: pre-wrap; font: 400 16px/24px var(--text); background: var(--porch-white); border: 1px solid var(--sand-shade); border-radius: var(--r-sm); padding: var(--s3); }

/* footer */
.site-foot { background: var(--green); color: var(--cream); margin-top: var(--s16); padding: var(--s12) 0 var(--s8); }
.site-foot a { color: var(--cream); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.foot-top { display: grid; gap: var(--s8); }
.site-foot h2 { color: var(--cream); font: 700 13px/16px var(--text); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--s3); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: var(--s2); }
.foot-tag { font-family: var(--heading); font-size: 20px; margin: var(--s4) 0; }
.foot-phone { font: 700 28px/32px var(--text); font-variant-numeric: tabular-nums; }
.foot-area { margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid rgba(251, 245, 232, 0.35); max-width: var(--measure); }
.foot-legal { font-size: 14px; margin: 0; opacity: 0.9; }

/* phone bar: call, text and quote always in reach */
.bar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1.6fr; background: var(--cream); border-top: 2px solid var(--green); z-index: 10; }
.bar a { text-align: center; padding: var(--s4) var(--s2); font-weight: 700; text-decoration: none; color: var(--green); border-right: 1px solid var(--sand-shade); }
.bar .bar-main { background: var(--green); color: var(--cream); border-right: 0; }

@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  h1 { font-size: 40px; line-height: 46px; }
  .logo img { width: 300px; }
  .head-phone { display: block; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .foot-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .sec { padding-top: var(--s16); }
  .hero { padding: var(--s12) 0; }
  .hero-home .hero-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--s12); align-items: center; }
  .hero-art { margin: 0; max-width: none; }
  .tagline { font-size: 34px; line-height: 38px; }
  .sec-promise > .wrap { padding: var(--s12); }
  .cols { columns: 2; column-gap: var(--s12); max-width: 980px; }
  .cols > p, .cols > ul { break-inside: avoid; }
  .cols > p:first-child { margin-top: 0; }
}
@media (min-width: 1000px) {
  .nav-fold { display: none; }
  .nav-wide { display: flex; gap: var(--s6); justify-content: space-between; }
  .foot-top { grid-template-columns: 1.5fr repeat(4, 1fr); }
  .cols { columns: 3; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-head .nav, .bar, .actions, .site-foot { display: none; } body { background: #fff; } }
