/* ===========================================================================
   roofcostbyaddress.com homepage
   Light theme only. One family (Hanken Grotesk), no monospace anywhere.
   Committed color: chalk-blue band, ink on color.
   =========================================================================== */

:root{
  /* Roofer's chalk line. The one manufactured color in the trade that
     means "this line is measured". Not contractor navy, not safety orange. */
  --chalk:        oklch(0.858 0.058 249);
  --chalk-hi:     oklch(0.935 0.030 249);
  --chalk-deep:   oklch(0.690 0.082 252);
  --chalk-edge:   oklch(0.795 0.066 250);

  --ink:          oklch(0.248 0.020 252);
  --ink-2:        oklch(0.458 0.018 252);
  --on-chalk-2:   oklch(0.392 0.024 252);   /* 4.9:1 on --chalk */

  --paper:        oklch(0.989 0.003 250);
  --paper-2:      oklch(0.964 0.006 250);
  --edge:         oklch(0.906 0.008 250);
  --edge-strong:  oklch(0.845 0.011 250);

  --shadow:       0 18px 40px -22px oklch(0.42 0.05 252 / .42),
                  0 3px 10px -4px  oklch(0.42 0.05 252 / .10);
  --shadow-high:  0 34px 60px -30px oklch(0.42 0.06 252 / .50),
                  0 5px 14px -6px  oklch(0.42 0.05 252 / .12);

  --r-sm:4px; --r:10px;
  --gutter:clamp(1.15rem,4.4vw,3.25rem);
  --measure:68ch;
  --font:"Hanken Grotesk","Helvetica Neue",Helvetica,sans-serif;
  --out:cubic-bezier(.22,1,.36,1);
}

*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--font); font-size:1.0625rem; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{margin:0;line-height:1.14;text-wrap:balance;}
h1{font-size:clamp(2.3rem,1.5rem + 3.3vw,3.85rem);font-weight:800;letter-spacing:-.035em;line-height:1.03;}
h2{font-size:clamp(1.6rem,1.28rem + 1.55vw,2.35rem);font-weight:700;letter-spacing:-.025em;}
h3{font-size:1.2rem;font-weight:700;letter-spacing:-.012em;}
p{margin:0 0 1.1rem;}
ul,ol{margin:0;padding:0;}
a{color:inherit;}
.num{font-variant-numeric:tabular-nums;}

.wrap{width:100%;max-width:1160px;margin-inline:auto;padding-inline:var(--gutter);}

/* .qa sits outside .prose on both calculator pages, so a link dropped into an
   answer inherited color and lost its underline: a link the reader cannot see.
   The two share one rule rather than each page restyling its own. */
.prose a,.qa a{
  color:var(--ink); text-decoration:underline;
  text-decoration-color:var(--chalk-deep); text-decoration-thickness:2px;
  text-underline-offset:3px; border-radius:2px;
  transition:background-color .18s var(--out);
}
.prose a:hover,.qa a:hover{background:var(--chalk-hi);}

:where(a,button,summary,input,select):focus-visible{
  outline:3px solid var(--ink); outline-offset:2px; border-radius:var(--r-sm);
}
.skip{position:absolute;left:-9999px;background:var(--ink);color:var(--chalk);
  padding:.7rem 1.1rem;border-radius:var(--r-sm);z-index:60;}
.skip:focus{left:1rem;top:1rem;}

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex;align-items:center;gap:.6rem;
  padding:.82rem 1.6rem;border:2px solid var(--ink);border-radius:999px;
  background:var(--ink);color:var(--chalk);
  font:inherit;font-weight:700;font-size:1.02rem;text-decoration:none;cursor:pointer;
  transition:transform .18s var(--out),background-color .18s var(--out),color .18s var(--out);
}
.btn:hover{background:transparent;color:var(--ink);}
.btn:active{transform:translateY(1.5px);}
.btn .tip{transition:transform .22s var(--out);}
.btn:hover .tip{transform:translateX(3px);}
/* The one call to action, and the only all-caps type on the site. DESIGN.md
   bans all-caps tracked labels and that ban still holds for labels; this is a
   single deliberate exception for the primary button, kept to one instance.
   The fill is paper because it has to read as the brightest thing on a chalk
   ground, which is the job the reference button's saturated fill was doing. */
.btn-cta{
  display:inline-flex;align-items:center;gap:.7rem;
  padding:1rem 2.1rem;border:3px solid var(--ink);border-radius:999px;
  background:var(--paper);color:var(--ink);
  font:inherit;font-weight:800;font-size:1rem;
  text-transform:uppercase;letter-spacing:.075em;
  text-decoration:none;cursor:pointer;
  transition:transform .18s var(--out),background-color .18s var(--out),
             box-shadow .18s var(--out);
}
.btn-cta:hover{background:var(--chalk-hi);transform:translateY(-2px);
  box-shadow:0 6px 0 -1px var(--ink);}

/* Inside a row the whole row is already the link, so this is a span wearing the
   button rather than a nested one, which would be invalid inside an anchor. It
   also sits on a pale ground, where a paper fill would read as no fill at all,
   so it takes chalk and lets the row keep the louder hero button as the primary. */
.btn-cta.as-tip{
  grid-column:2;grid-row:1 / span 2;align-self:center;
  background:var(--chalk);padding:.72rem 1.45rem;font-size:.875rem;border-width:2px;
}
.rows a:hover .btn-cta.as-tip{background:var(--paper);transform:translateY(-2px);
  box-shadow:0 5px 0 -1px var(--ink);}
@media (max-width:560px){
  /* two columns squeeze the sentence to a ribbon on a phone; stack instead */
  .rows a{grid-template-columns:minmax(0,1fr);}
  .btn-cta.as-tip{grid-column:1;grid-row:auto;justify-self:start;margin-top:.9rem;}
}
.btn-cta:active{transform:translateY(0);box-shadow:none;}
.btn-cta .tip{font-size:1.15rem;line-height:1;transition:transform .22s var(--out);}
.btn-cta:hover .tip{transform:translateX(4px);}

.btn-plain{background:transparent;color:var(--ink);border-color:var(--chalk-edge);}
.btn-plain:hover{background:var(--ink);color:var(--chalk);border-color:var(--ink);}

/* ---------------- the band ---------------- */
.band{background:var(--chalk);color:var(--ink);}

.masthead .wrap{display:flex;align-items:center;justify-content:space-between;
  gap:1.5rem;min-height:74px;}
/* ---- the lockup ----
   A mark drawn in SVG over live text, not an image: it stays crisp at any size,
   costs nothing to load, and the wordmark is real selectable text. Every offset
   below is in em of the logo's own font-size, measured off the original artwork,
   so the whole thing scales from one number.

   Two blues. The artwork's #6c8cbd was drawn on white and only reaches 2.23:1
   on the chalk the masthead and footer are painted in, which fails outright for
   the small blue "by". Light grounds keep the artwork color; chalk grounds get
   a darkened one at 4.55:1. */
:root{ --brand:#6c8cbd; }
.masthead, .foot{ --brand:oklch(0.466 0.075 258); }

.logo{position:relative;display:inline-block;text-decoration:none;color:var(--ink);
  font-size:1.42rem;padding-top:.42em;line-height:1;}
.logo-mk{position:absolute;display:block;left:-.288em;top:.144em;
  width:1.7615em;height:.6425em;overflow:visible;}
.logo-mk path{stroke:var(--brand);}
.logo-mk rect{fill:var(--brand);}
.logo .l1{display:block;font-weight:800;font-size:1em;line-height:1;
  letter-spacing:-.035em;position:relative;}
.logo .l2{display:block;font-weight:800;font-size:.4845em;line-height:1;
  letter-spacing:-.03em;margin-left:1.471em;margin-top:-.047em;}
.logo .l2 i{font-style:normal;color:var(--brand);}
@media (max-width:420px){.logo{font-size:1.2rem;}}
/* One `gap` fed both axes, so once the labels grew long enough to wrap the nav
   opened a 2.1rem hole between the two rows. The links carry their own 44px
   of vertical padding on a phone, which is all the separation a second row
   needs, so the row gap is zero and only the column gap is fluid. */
.menu{display:flex;align-items:center;column-gap:clamp(.8rem,2.6vw,2.1rem);
  row-gap:0;flex-wrap:wrap;}
.menu a{font-size:.97rem;font-weight:600;text-decoration:none;padding-bottom:2px;
  border-bottom:2px solid transparent;transition:border-color .18s var(--out);}
.menu a:hover{border-bottom-color:var(--ink);}
/* The nav used to hide two of its three items below 680px, which left a phone
   with no way to reach the methodology page from the header, on a site whose
   whole argument is that its rates are checkable. Measured at 390px the three
   labels need 262px and have 261, so rather than cut them the masthead wraps:
   one row where they fit, the nav on its own row where they do not. */
.masthead .wrap{flex-wrap:wrap;row-gap:.15rem;padding-block:.55rem;}
/* 28px of link is a legal tap target and a mean one. Padding raises it to 44
   without changing the type size; the hover underline moves down with it. This
   was behind a 680px query, which left a 700px tablet, still a touch device, on
   30px targets. The masthead reserves 74px and a 44px link fits inside it, so
   applying it everywhere costs the desktop header nothing. */
.menu a{padding-block:.5rem;}
@media (max-width:400px){
  .menu{width:100%;column-gap:1.1rem;padding-bottom:.2rem;}
  .menu a{font-size:.92rem;}
}

/* ---------------- hero ---------------- */
.hero .wrap{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.92fr);
  gap:clamp(2rem,5vw,4.5rem);align-items:center;
  padding-block:clamp(2.6rem,5.5vw,4.4rem) clamp(4.5rem,8vw,6.5rem);
}
@media (max-width:900px){
  .hero .wrap{grid-template-columns:1fr;padding-bottom:clamp(4rem,10vw,5rem);}
}
.lead{font-size:clamp(1.06rem,1rem + .42vw,1.27rem);color:var(--on-chalk-2);
  margin:1.1rem 0 1.9rem;max-width:44ch;}
.actions{display:flex;flex-wrap:wrap;gap:.85rem;}

/* the estimate sheet: illustration and proof are the same object */
.sheet{
  margin:0;background:#fff;border-radius:var(--r);box-shadow:var(--shadow-high);
  transform:rotate(-1.4deg);overflow:hidden;
}
.sheet-head{padding:1.15rem 1.4rem .95rem;border-bottom:1px solid var(--edge);}
.sheet-head .title{font-weight:700;font-size:1.02rem;letter-spacing:-.015em;}
.sheet-head .case{font-size:.88rem;color:var(--ink-2);margin-top:.15rem;}
.sheet-body{padding:.9rem 1.4rem 1.2rem;}
.line{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;
  padding:.42rem 0;font-size:.95rem;}
.line .what{color:var(--ink-2);}
.line .val{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;}
.line.sub{border-top:1px solid var(--edge);margin-top:.3rem;padding-top:.6rem;}
.line.sub .what{color:var(--ink);font-weight:600;}
.line.grand{border-top:2px solid var(--ink);margin-top:.5rem;padding-top:.7rem;
  font-size:1.06rem;}
.line.grand .what{color:var(--ink);font-weight:700;}
.line.grand .val{font-weight:800;}

.split{margin-top:1.1rem;}
.bar{display:flex;height:9px;border-radius:999px;overflow:hidden;background:var(--paper-2);}
.bar span{display:block;height:100%;}
.s-tear{background:var(--chalk-deep);}
.s-mat{background:var(--chalk);}
.s-lab{background:var(--ink);}
.key{list-style:none;display:flex;flex-wrap:wrap;gap:.35rem 1.05rem;
  margin-top:.6rem;font-size:.82rem;color:var(--ink-2);}
.key li{display:flex;align-items:center;gap:.35rem;}
.key i{width:9px;height:9px;border-radius:2px;display:block;}
.key b{color:var(--ink);font-variant-numeric:tabular-nums;}
.sheet-note{margin:0;padding:.85rem 1.4rem 1.1rem;background:var(--paper-2);
  font-size:.85rem;color:var(--ink-2);border-top:1px solid var(--edge);}

/* ---------------- claims panel, overlapping the band ---------------- */
.claims{margin-top:clamp(-4.4rem,-6vw,-3.4rem);position:relative;z-index:2;}
.claims ul{
  list-style:none;background:#fff;border:1px solid var(--edge);border-radius:var(--r);
  box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
}
@media (max-width:880px){.claims ul{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:520px){.claims ul{grid-template-columns:1fr;}}
.claims li{padding:1.25rem 1.4rem;border-right:1px solid var(--edge);}
.claims li:last-child{border-right:0;}
@media (max-width:880px){
  .claims li:nth-child(2n){border-right:0;}
  .claims li:nth-child(-n+2){border-bottom:1px solid var(--edge);}
}
@media (max-width:520px){
  .claims li{border-right:0;border-bottom:1px solid var(--edge);}
  .claims li:last-child{border-bottom:0;}
}
.claims b{display:block;font-size:1.02rem;font-weight:700;letter-spacing:-.015em;}
.claims span{display:block;font-size:.9rem;color:var(--ink-2);margin-top:.25rem;}

/* ---------------- sections ---------------- */
.section{padding-block:clamp(3.2rem,6.5vw,5rem);}
.heading{max-width:46ch;margin-bottom:clamp(1.8rem,3.5vw,2.6rem);}
.heading .rule{width:56px;height:5px;border-radius:3px;background:var(--chalk-deep);
  margin:1rem 0 1.1rem;}
/* balance stops a two-line standfirst dropping its last word alone onto
   line two, which happens at several of this site's breakpoints */
.heading p{color:var(--ink-2);margin:0;max-width:52ch;text-wrap:balance;}

/* rows, not a card grid */
.rows{list-style:none;border-top:1px solid var(--edge);}
/* a short bulleted list inside prose, where the page's own lists are all cards */
.plain{margin:.7rem 0 0;padding-left:1.15rem;list-style:disc;}
.plain li{margin-top:.35rem;line-height:1.6;}
.rows li{border-bottom:1px solid var(--edge);}
.rows a{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem 1.5rem;
  align-items:center;padding:1.35rem .4rem;text-decoration:none;
  transition:background-color .18s var(--out),padding-left .18s var(--out);
}
.rows a:hover{background:var(--chalk-hi);padding-left:.9rem;}
.rows .asked{font-size:1.16rem;font-weight:700;letter-spacing:-.02em;grid-column:1;}
.rows .answer{font-size:.96rem;color:var(--ink-2);grid-column:1;}
.rows .answer em{font-style:normal;font-weight:600;color:var(--ink);}
.rows .tip{grid-column:2;grid-row:1 / span 2;font-size:1.3rem;color:var(--chalk-deep);
  transition:transform .22s var(--out);}
.rows a:hover .tip{transform:translateX(4px);}

/* ---------------- info section ---------------- */
.info{background:var(--paper-2);border-block:1px solid var(--edge);}
.prose{max-width:var(--measure);}
.prose h3{margin:2.1rem 0 .55rem;}
.prose h3:first-child{margin-top:0;}
.figure{font-weight:700;}

.averages{width:100%;border-collapse:collapse;margin:1.4rem 0 1.6rem;font-size:.97rem;}
.averages caption{text-align:left;font-size:.88rem;color:var(--ink-2);
  padding-bottom:.7rem;}
.averages th{text-align:left;font-weight:600;font-size:.88rem;color:var(--ink-2);
  padding:0 1.1rem .5rem 0;border-bottom:1px solid var(--edge-strong);}
.averages td{padding:.62rem 1.1rem .62rem 0;border-bottom:1px solid var(--edge);
  vertical-align:top;}
.averages td.n{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap;}
.averages.mark-last tr:last-child td{background:var(--chalk-hi);}

.closing{margin-top:2.4rem;padding-top:1.6rem;border-top:1px solid var(--edge-strong);}
.closing p{color:var(--ink-2);}

/* ---------------- document pages (methodology, privacy, about) ---------------- */
.doc-head{padding-block:clamp(2.4rem,5vw,3.8rem) clamp(4.6rem,8vw,6.5rem);}
.doc-head h1{max-width:15ch;}
.doc-head .lead{margin-bottom:0;max-width:54ch;}

/* ---------------- footer ---------------- */
.foot{background:var(--chalk);color:var(--ink);
  padding-block:clamp(2.6rem,5vw,3.8rem) 1.9rem;}
.foot-top{display:grid;grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr));
  gap:2.2rem;padding-bottom:2rem;border-bottom:2px solid var(--chalk-edge);}
@media (max-width:720px){.foot-top{grid-template-columns:1fr;gap:1.7rem;}}
.foot-top p{margin:.8rem 0 0;max-width:36ch;color:var(--on-chalk-2);font-size:.95rem;}
.foot h4{font-size:.86rem;font-weight:700;margin-bottom:.75rem;}
.foot ul{list-style:none;display:grid;gap:.5rem;font-size:.95rem;}
.foot li a{text-decoration:none;border-bottom:1.5px solid transparent;}
.foot li span{color:var(--on-chalk-2);}
.foot li a:hover{border-bottom-color:var(--ink);}
.foot-base{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);
  gap:.7rem 2rem;padding-top:1.5rem;font-size:.85rem;color:var(--on-chalk-2);}
@media (max-width:720px){.foot-base{grid-template-columns:1fr;}}

/* ---------------- motion ---------------- */
@media (prefers-reduced-motion:no-preference){
  .enter{animation:enter .5s var(--out) backwards;animation-delay:.1s;}
}
@keyframes enter{from{opacity:0;transform:rotate(-1.4deg) translateY(12px);}}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:.001ms!important;animation-delay:-.001ms!important;
    transition-duration:.001ms!important;}
}
