/* Integrity Inspecting Engineers — site styles */
:root {
  /* brand colours carried over from the original IIE site */
  --navy: #062B52;       /* primary */
  --navy-2: #1E3F5F;
  --steel: #3D5975;
  --paint: #EDCD1F;      /* theme yellow, used only for defect markers */
  --paint-deep: #C9AE12;
  --slate: #062B52;
  --slate-2: #3B3A3A;    /* body charcoal */
  --render: #F7F7F7;     /* light grey */
  --white: #FFFFFF;
  --mute: #757575;
  --line: #C6C6C6;
  --crack: #A3261B;
  /* drawing */
  --wall: #FFFFFF; --mortar: #D9DEE3; --glass: #DCE5EE; --ink: #062B52;
  --wrap: 1180px;
  --r: 4px;
  --f: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--white); color: var(--slate-2); font-family: var(--f); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; display: block; }
a { color: var(--slate); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--steel); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; border-radius: 2px; }
.site-head :focus-visible, .hero :focus-visible, .site-foot :focus-visible { outline-color: var(--white); }
h1, h2, h3 { color: var(--navy); font-stretch: 112%; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 760; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 680; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 720px; }
.narrow-text { max-width: 62ch; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--slate-2); max-width: 58ch; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--white); color: var(--navy); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .6em 1.15em; border-radius: var(--r); font-weight: 700; font-stretch: 105%; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 1rem; line-height: 1.2; }
.btn:hover { text-decoration: none; }
.btn-paint { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-paint:hover { background: var(--navy-2); border-color: var(--navy-2); }
.site-head .btn-paint, .hero .btn-paint { background: var(--white); color: var(--navy); border-color: var(--white); }
.site-head .btn-paint:hover, .hero .btn-paint:hover { background: var(--render); border-color: var(--render); }
.btn-line { background: transparent; color: inherit; border-color: currentColor; }
.btn-line:hover { background: rgba(127,140,145,.14); }
.btn-big { min-height: 52px; padding: .75em 1.4em; font-size: 1.05rem; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.14); }
.head-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; color: var(--white); text-decoration: none; line-height: 1; }
.brand:hover { text-decoration: none; }
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 5px; text-transform: uppercase; font-stretch: 125%; }
.wm-1 { font-size: 1.02rem; font-weight: 500; letter-spacing: .06em; white-space: nowrap; }
.wm-2 { font-size: .64rem; font-weight: 500; letter-spacing: .52em; margin-right: -.52em; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.main-nav a { color: var(--white); text-decoration: none; font-weight: 550; font-size: .98rem; }
.main-nav a:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,.6); text-decoration-thickness: 2px; }
.head-cta { display: flex; align-items: center; gap: 16px; }
.tel { color: var(--white); font-weight: 700; text-decoration: none; white-space: nowrap; }
.head-cta .btn { min-height: 40px; padding: .45em .95em; }
@media (max-width: 980px) { .main-nav { display: none; } .head-cta { margin-left: auto; } }
@media (max-width: 560px) {
  .tel { display: none; }
  .wm-1 { font-size: .8rem; } .wm-2 { font-size: .52rem; }
  .head-row { gap: 12px; }
}

/* hero */
.hero { background: var(--navy); color: var(--white); padding: 56px 0 64px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 80px 0 88px; } }
.hero h1 { max-width: 16ch; }
.hero .lede { color: #DCE4EC; }
.hero h1 { color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero .btn-line { color: var(--white); }
.creds { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: .95rem; color: #DCE4EC; }
.creds li { padding-left: 22px; position: relative; }
.creds li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; border: 2px solid var(--white); border-radius: 50%; }
@media (max-width: 480px) { .creds { grid-template-columns: 1fr; } }

/* the condition record — signature element */
.record { margin: 0; }
.record-sheet { background: var(--white); color: var(--slate); border-radius: var(--r); padding: 14px 16px 18px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 24px 48px -24px rgba(0,0,0,.6); }
.record-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--mute); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.record-top span:first-child { font-weight: 700; color: var(--slate); }
.record-svg { width: 100%; height: auto; }
.record-log { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: .9rem; line-height: 1.4; }
.record-log li { display: grid; grid-template-columns: auto 1fr; align-items: start; }
.record-log b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; margin-right: 8px; background: var(--paint); border: 1.5px solid var(--slate); border-radius: 11px; font-size: .78rem; }
@media (prefers-reduced-motion: no-preference) {
  .cracks path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.1s ease-out forwards; }
  .cracks path:nth-child(2) { animation-delay: .35s; }
  .cracks path:nth-child(3) { animation-delay: .7s; }
  .marks g { opacity: 0; animation: pop .3s ease-out forwards; }
  .marks g:nth-child(1) { animation-delay: 1.1s; } .marks g:nth-child(2) { animation-delay: 1.4s; } .marks g:nth-child(3) { animation-delay: 1.7s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { to { opacity: 1; } }
}

/* sections */
.section { padding: 64px 0; }
@media (min-width: 800px) { .section { padding: 88px 0; } }
.section-alt { background: var(--render); }
.page-top { padding-top: 48px; }
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } .split-head { position: sticky; top: 104px; } }
.split-head p { color: var(--slate-2); max-width: 46ch; }
.h-small { font-size: 1.1rem; margin-top: 1.6em; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ticks li { padding: 16px 0 16px 34px; border-top: 1px solid var(--line); position: relative; }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 16px; height: 9px; border-left: 3px solid var(--slate); border-bottom: 3px solid var(--slate); transform: rotate(-45deg); }
.ticks b { font-weight: 700; }
.ticks-tight li { padding: 10px 0 10px 34px; }
.ticks-tight li::before { top: 16px; }

.when-grid { display: grid; gap: 2px; margin-top: 28px; background: var(--line); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 700px) { .when-grid { grid-template-columns: 1fr 1fr; } }
.when { background: var(--white); padding: 28px; }
.when p { margin: 0; color: var(--slate-2); }

.steps { list-style: none; counter-reset: s; margin: 32px 0 0; padding: 0; display: grid; gap: 28px 40px; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; position: relative; padding-top: 56px; border-top: 2px solid var(--slate); }
.steps li::before { content: counter(s); position: absolute; top: 14px; left: 0; width: 30px; height: 30px; display: grid; place-items: center; background: var(--navy); color: var(--white); font-weight: 700; font-size: .95rem; border-radius: 50%; }
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--slate-2); }

.area-list { list-style: none; margin: 0; padding: 0; }
.split .area-list, .band .area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 28px; }
.split .area-list a, .band .area-list a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 1.1rem; text-decoration: none; }
.split .area-list a::after, .band .area-list a::after { content: ""; width: 9px; height: 9px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); }
.split .area-list a:hover, .band .area-list a:hover { color: var(--slate); background: linear-gradient(var(--navy), var(--navy)) left bottom / 100% 3px no-repeat; }

.band { padding: 56px 0; background: var(--render); }
.band h2 { font-size: 1.5rem; }
.article-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 800px) { .article-list { grid-template-columns: repeat(3, 1fr); } }
.article-list a { display: flex; flex-direction: column; height: 100%; gap: 8px; padding: 22px; background: var(--white); border-radius: var(--r); border-top: 4px solid var(--slate); text-decoration: none; }
.article-list a:hover { border-top-color: var(--steel); }
.ac-title { font-weight: 720; font-stretch: 108%; font-size: 1.15rem; line-height: 1.25; }
.ac-intro { color: var(--slate-2); font-size: .97rem; }
.article-list time { margin-top: auto; font-size: .85rem; color: var(--mute); }
.k-pages .page-top + .cta-band, .page-top .article-list a { border: 1px solid var(--line); border-top: 4px solid var(--slate); }

/* CTA band */
.cta-band { background: var(--render); padding: 48px 0; border-top: 1px solid var(--line); }
.cta-row { display: grid; gap: 20px; align-items: center; }
@media (min-width: 860px) { .cta-row { grid-template-columns: 1fr auto; } }
.cta-band h2 { margin-bottom: .25em; }
.cta-band p { margin: 0; max-width: 56ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* long-form documents */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 16px 72px; }
@media (min-width: 700px) { .doc { padding: 40px 32px 88px; } }
.doc-head { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 3px solid var(--navy); }
.byline { font-size: .92rem; color: var(--mute); margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 24px; font-size: .9rem; color: var(--mute); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--mute); }
.prose { font-size: 1.08rem; line-height: 1.7; }
.prose h2 { font-size: 1.55rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--navy); }

/* FAQ */
.faq { max-width: 760px; margin: 56px auto 72px; }
.doc .faq { margin: 48px 0 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 680; font-size: 1.08rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 24px; width: 10px; height: 10px; border-right: 2.5px solid var(--slate); border-bottom: 2.5px solid var(--slate); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details div { padding: 0 0 18px; color: var(--slate-2); max-width: 64ch; }
.faq details div p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } html { scroll-behavior: auto; } }

/* form */
.quote-form { background: var(--white); border: 2px solid var(--slate); border-radius: var(--r); padding: 24px 18px; }
@media (min-width: 600px) { .quote-form { padding: 32px; } }
.quote-form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.quote-form legend { font-weight: 750; font-stretch: 110%; font-size: 1.15rem; padding: 0; margin-bottom: 14px; }
.quote-form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 22px; }
.f-row { display: grid; gap: 0 18px; }
@media (min-width: 600px) { .f-row { grid-template-columns: 1fr 1fr; } }
.f { margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.f label { font-weight: 620; font-size: .97rem; }
.f input, .f select, .f textarea { font: inherit; font-size: 1rem; color: var(--slate); background: var(--white); border: 1.5px solid #8C9A9E; border-radius: var(--r); padding: 11px 12px; min-height: 46px; width: 100%; }
.f input[type=file] { padding: 9px; background: var(--render); border-style: dashed; }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 3px solid #9DB4CC; outline-offset: 0; border-color: var(--slate); box-shadow: none; }
.f input:user-invalid, .f select:user-invalid { border-color: var(--crack); }
.hint { font-size: .87rem; color: var(--mute); }
.f-submit { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin: 8px 0 0; }
.f-submit .btn { width: 100%; }
@media (min-width: 600px) { .f-submit .btn { width: auto; } }
.hp { position: absolute; left: -9999px; }
.split-form { align-items: start; }

/* footer */
.site-foot { background: var(--navy); color: #DCE4EC; padding: 56px 0 24px; font-size: .97rem; }
.site-foot a { color: var(--white); }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-wm { color: var(--white); align-items: flex-start; margin-bottom: 1.2em; }
.foot-h { font-weight: 700; color: var(--white); margin-bottom: .6em; }
.site-foot .area-list li { margin-bottom: 6px; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .87rem; }
.foot-base p { margin: 0; }

/* logo */
.brand { align-items: center; gap: 12px; }
.brand-logo { height: 46px; width: auto; flex: none; }
.foot-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 1em; }
.foot-brand img { height: 64px; width: auto; }
.foot-brand .foot-wm { margin: 0; }
@media (max-width: 560px) { .brand-logo { height: 38px; } .brand { gap: 9px; } }
@media (max-width: 380px) { .brand .wordmark { display: none; } }

/* grouped service areas */
.area-groups { display: grid; gap: 8px 40px; }
@media (min-width: 700px) { .area-groups { grid-template-columns: 1fr 1fr; } }
.area-group h3 { font-size: 1rem; margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.split .area-group .area-list, .band .area-group .area-list { grid-template-columns: 1fr; }

/* photos */
.photo { margin: 0 0 1.6em; }
.photo img { width: 100%; height: auto; border-radius: var(--r); background: var(--render); }
.photo figcaption { font-size: .9rem; color: var(--mute); margin-top: 8px; line-height: 1.45; }
.prose .photo { margin: 1.6em 0; }
.section-tight { padding-top: 0; }
.section-lede { max-width: 62ch; color: var(--slate-2); }
.photo-grid { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 700px) { .photo-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } .photo-grid .photo img { aspect-ratio: 4 / 3; object-fit: cover; } }
.photo-grid .photo { margin: 0; }
.head-cta .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .head-cta .btn { font-size: .88rem; padding: .45em .7em; min-height: 40px; }
  .wm-1 { font-size: .74rem; letter-spacing: .04em; } .wm-2 { font-size: .5rem; }
  .brand-logo { height: 34px; }
}

/* smaller wordmark: the logo leads */
.site-head .brand-logo { height: 52px; }
.site-head .wm-1 { font-size: .74rem; letter-spacing: .05em; }
.site-head .wm-2 { font-size: .48rem; letter-spacing: .5em; margin-right: -.5em; }
.site-head .wordmark { gap: 4px; opacity: .92; }
.foot-brand img { height: 72px; }
.foot-brand .wm-1 { font-size: .72rem; }
.foot-brand .wm-2 { font-size: .46rem; }
@media (max-width: 480px) {
  .site-head .brand-logo { height: 42px; }
  .site-head .wm-1 { font-size: .62rem; } .site-head .wm-2 { font-size: .42rem; }
}
@media (max-width: 380px) { .site-head .wordmark { display: none; } }

/* thank-you page */
.steps-compact { grid-template-columns: 1fr !important; gap: 20px; margin-top: 16px; }
.steps-compact li { padding-top: 48px; }
.k-pages .split .article-list { grid-template-columns: 1fr; }
.k-pages .split .article-list a { border: 1px solid var(--line); border-top: 4px solid var(--navy); }
