/* PDX Roof Guys */
:root {
  --ink: #16232b;
  --muted: #52616a;
  --line: #d9dcd6;
  --bg: #f6f4ef;
  --paper: #ffffff;
  --slate: #1d3440;
  --slate-2: #284756;
  --mist: #e7eef0;
  --cedar: #c2541c;
  --cedar-dark: #a3430f;
  --moss: #4d6b3c;
  --red: #a8322a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 35, 43, .06), 0 10px 30px rgba(22, 35, 43, .10);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--ink); background: var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: var(--slate-2); }
a:hover { color: var(--cedar-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h1 em { font-family: var(--serif); font-style: italic; font-weight: 700; color: var(--cedar); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cedar); outline-offset: 2px; }
legend:focus { outline: none; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(800px, 100% - 40px); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 2px solid transparent;
  font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: progress; }
.btn-accent { background: var(--cedar); color: #fff; }
.btn-accent:hover { background: var(--cedar-dark); color: #fff; }
.btn-dark { background: var(--slate); color: #fff; }
.btn-dark:hover { background: var(--slate-2); color: #fff; }
.btn-light { background: #fff; color: var(--slate); }
.btn-light:hover { background: var(--mist); color: var(--slate); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 10px 4px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; }
.btn-link:hover { color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--slate); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 36px; height: 36px; color: #f0a46b; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; letter-spacing: -.01em; }
.brand-text small { font-size: .78rem; color: #b9cbd2; }
.header-actions { display: flex; gap: 10px; }
.header-actions .btn { min-height: 42px; padding: 0 16px; font-size: .95rem; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(29, 52, 64, .97), rgba(29, 52, 64, .92)),
    repeating-linear-gradient(105deg, transparent 0 22px, rgba(255, 255, 255, .05) 22px 23px);
  color: #fff; padding: 48px 0 64px;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: var(--bg);
  clip-path: polygon(0 100%, 0 70%, 18% 30%, 36% 70%, 50% 20%, 64% 70%, 82% 35%, 100% 70%, 100% 100%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 36px; align-items: start; }
.eyebrow { margin: 0 0 .7em; font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--cedar); }
.hero .eyebrow { color: #f0a46b; }
.lead { font-size: 1.15rem; color: #d6e2e6; max-width: 34em; }
.checks { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; font-weight: 600; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Estimator */
.hero-tool { display: grid; gap: 16px; }
.est {
  background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 20px 18px; scroll-margin-top: 84px;
}
.est-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.est-title { margin: 0; font-weight: 800; font-size: 1.05rem; }
.est-count { margin: 0; font-size: .88rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.est-bar { height: 6px; background: var(--mist); border-radius: 6px; margin: 10px 0 12px; overflow: hidden; }
.est-bar span { display: block; height: 100%; width: 12.5%; background: var(--cedar); border-radius: 6px; transition: width .3s ease; }
.est-note { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.est-noscript { background: #fff4e5; padding: 12px; border-radius: 8px; }

.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { padding: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.25; margin-bottom: 6px; }
.hint { font-size: .92rem; color: var(--muted); margin-bottom: 14px; }

.opts { display: grid; gap: 8px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input, .chip input, .check input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span {
  display: grid; gap: 2px; padding: 12px 14px 12px 46px; border: 2px solid var(--line); border-radius: 10px;
  transition: border-color .15s, background-color .15s; position: relative;
}
.opt > span::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  border: 2px solid #9aa6ab; border-radius: 50%; background: #fff;
}
.opt strong { font-weight: 700; }
.opt small { color: var(--muted); font-size: .86rem; }
.opt:hover > span { border-color: #9fb3bb; }
.opt input:checked + span { border-color: var(--cedar); background: #fdf3ed; }
.opt input:checked + span::before { border-color: var(--cedar); background: var(--cedar); box-shadow: inset 0 0 0 4px #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--cedar); outline-offset: 2px; }
.opts-pitch { grid-template-columns: 1fr 1fr; }
.opts-pitch .opt > span { padding: 12px; text-align: center; justify-items: center; }
.opts-pitch .opt > span::before { display: none; }
.opts-pitch svg { width: 64px; height: 28px; margin-bottom: 4px; }
.opts-pitch svg path { fill: none; stroke: var(--slate-2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.opts-pitch input:checked + span svg path { stroke: var(--cedar); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { cursor: pointer; }
.chip span { display: inline-block; padding: 9px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .95rem; }
.chip:hover span { border-color: #9fb3bb; }
.chip input:checked + span { border-color: var(--cedar); background: #fdf3ed; color: var(--cedar-dark); }
.chip input:focus-visible + span { outline: 3px solid var(--cedar); outline-offset: 2px; }

.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-weight: 700; font-size: .92rem; }
.field small { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 1.05rem var(--sans); color: var(--ink);
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus { border-color: var(--slate-2); outline: none; box-shadow: 0 0 0 3px rgba(40, 71, 86, .2); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 60px; }
.input-suffix em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); }
.field-inline { max-width: 260px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }

.check { position: relative; display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; cursor: pointer; font-size: .95rem; font-weight: 600; }
.check span::before {
  content: ""; flex: none; display: inline-block; width: 22px; height: 22px; margin-right: 10px; vertical-align: -5px;
  border: 2px solid #9aa6ab; border-radius: 6px; background: #fff center/14px no-repeat;
}
.check input:checked + span::before {
  border-color: var(--cedar); background-color: var(--cedar);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check input:focus-visible + span::before { outline: 3px solid var(--cedar); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: .78rem; line-height: 1.45; color: var(--muted); margin: 0 0 12px; }

.form-status { margin: 0; font-size: .92rem; font-weight: 600; color: var(--red); }
.form-status.is-on { margin-top: 12px; }
.est-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.est-nav [data-next] { margin-left: auto; min-width: 130px; }

/* Result */
.result:focus { outline: none; }
.res-kicker { margin: 4px 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--moss); }
.res-range { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; color: var(--slate); line-height: 1.1; }
.res-range span { font-size: .55em; font-weight: 600; color: var(--muted); }
.res-head { font-size: 1.35rem; }
.res-small { font-size: .86rem; color: var(--muted); }
.res-math { display: grid; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.res-math div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: .92rem; }
.res-math div + div { border-top: 1px solid var(--line); }
.res-math dt { color: var(--muted); }
.res-math dd { margin: 0; font-weight: 700; text-align: right; }
.res-next { background: var(--mist); border-radius: 10px; padding: 14px 16px 4px; margin: 16px 0; }
.res-next h3 { margin-bottom: .35em; }
.res-compare, .res-list { list-style: none; padding: 0; margin: 0; }
.res-compare li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.res-compare li:last-child { border-bottom: 0; }
.res-list li { position: relative; padding: 0 0 8px 22px; }
.res-list li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--cedar); }

/* Leak box */
.leak-box { background: var(--cedar); color: #fff; border-radius: var(--radius); padding: 18px 20px; }
.leak-box h2 { font-size: 1.25rem; margin-bottom: .3em; }
.leak-box p { font-size: .95rem; color: #fde9dc; margin-bottom: .9em; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: #ecebe4; }
.section-dark { background: var(--slate); color: #fff; }
.section-dark .eyebrow { color: #f0a46b; }
.section-dark a { color: #f6c39d; }
.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 46em; }

.steps-3 { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; counter-reset: s; }
.steps-3 li { position: relative; background: var(--paper); border-radius: var(--radius); padding: 24px 22px 10px 76px; box-shadow: 0 1px 2px rgba(22, 35, 43, .06); counter-increment: s; }
.steps-3 li::before {
  content: counter(s); position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--slate); color: #fff; font-weight: 800;
}
.steps-3 p { color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); background: var(--paper); box-shadow: 0 1px 2px rgba(22, 35, 43, .06); }
.price-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: .98rem; }
.price-table th, .price-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { background: var(--slate); color: #fff; font-size: .85rem; letter-spacing: .03em; }
.price-table tbody th { font-weight: 700; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table td:nth-child(3) { font-weight: 700; white-space: nowrap; }
.math { background: var(--paper); border-left: 4px solid var(--cedar); border-radius: 0 10px 10px 0; padding: 16px 20px 6px; margin-bottom: 24px; font-size: .98rem; }
.math-small { font-size: .9rem; color: var(--muted); }

.cards { display: grid; gap: 16px; margin-top: 28px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 22px 22px 8px; box-shadow: 0 1px 2px rgba(22, 35, 43, .06); }
.card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card p { color: var(--muted); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #f4e7d9; color: var(--cedar-dark); }
.tag-blue { background: #dde9ee; color: var(--slate-2); }
.tag-green { background: #e2ecdb; color: var(--moss); }
.tag-red { background: #f6dedb; color: var(--red); }

.standards { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.standards li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 18px 20px; color: #cfdde2; }
.standards strong { display: block; color: #fff; font-size: 1.08rem; margin-bottom: 4px; }

.areas { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.areas li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .95rem; }

.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--paper); border-radius: 12px; padding: 0 20px; box-shadow: 0 1px 2px rgba(22, 35, 43, .06); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--cedar); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

.cta-band { background: var(--cedar); color: #fff; text-align: center; padding: 64px 0; }
.cta-band p { color: #fde9dc; font-size: 1.1rem; }
.cta-band .btn-accent { background: var(--slate); }
.cta-band .btn-accent:hover { background: var(--slate-2); }

.site-footer { background: #10202a; color: #a9bcc4; padding: 48px 0 110px; font-size: .9rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #d3e1e6; }
.privacy { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 24px; padding-top: 20px; }
.privacy h2 { font-size: 1rem; color: #fff; margin-bottom: .4em; }
.copy { margin-top: 20px; color: #7f939b; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 244, 239, .96); border-top: 1px solid var(--line);
  transition: transform .2s ease;
}
.sticky-cta.is-away { transform: translateY(110%); }

@media (min-width: 720px) {
  .steps-3 { grid-template-columns: repeat(3, 1fr); }
  .steps-3 li { padding: 76px 22px 10px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .standards { grid-template-columns: 1fr 1fr; }
  .est { padding: 26px 26px 20px; }
}
@media (min-width: 980px) {
  .hero { padding: 64px 0 110px; }
  .hero-grid { grid-template-columns: 1fr 470px; gap: 56px; }
  .hero-copy { padding-top: 28px; }
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: 48px; }
}
@media (max-width: 520px) {
  .brand-text small { display: none; }
  .header-actions .btn-ghost { display: none; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
