/* Loft Insulation Installers: blue, black and white.
   Sharp corners, blueprint grid, uppercase labels. Manrope for headings and
   buttons only; body text uses the system sans stack. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/manrope-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/manrope-latin-800.woff2') format('woff2');
}

:root {
  --ink: #0B1220;
  --ink-2: #1E293B;
  --blue: #1D4ED8;      /* text, links and buttons on white (6.7:1) */
  --blue-hover: #1E3A8A;
  --bright: #3B82F6;    /* shapes, and text on ink (5.6:1) */
  --sky: #DBE7FF;
  --tint: #EEF3FF;
  --line: #CBD5E1;
  --muted: #475569;     /* secondary text on white (7.6:1) */
  --white: #FFFFFF;
  --head: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1180px;
  --gap: clamp(1rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 3px solid var(--bright); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gap), 780px); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 0.75rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1rem;
}
.label::before { content: ''; width: 28px; height: 3px; background: currentColor; }
.on-ink .label, .label--light { color: var(--bright); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.on-ink .lead { color: #CBD5E1; }

/* Buttons: square, solid, with an arrow that nudges on hover. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.95rem 1.4rem;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  border-radius: 0;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 150ms ease;
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: var(--white); }
.btn svg { transition: transform 150ms ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.on-ink .btn--outline { color: var(--white); border-color: var(--white); }
.on-ink .btn--outline:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Top bar and header */
.topbar { background: var(--ink); color: #CBD5E1; font-size: 0.9rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar a { color: var(--white); font-weight: 700; text-decoration: none; display: inline-flex; gap: 0.4rem; align-items: center; }
.topbar a:hover { color: var(--bright); }
.topbar__note { margin: 0; }

.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__text { display: flex; flex-direction: column; font-family: var(--head); line-height: 1; }
.brand__name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; text-transform: uppercase; }
.brand__sub { font-weight: 700; font-size: 0.68rem; letter-spacing: 0.42em; color: var(--blue); margin-top: 0.3rem; text-transform: uppercase; }
.on-ink .brand, .on-ink .brand:hover { color: var(--white); }
.on-ink .brand__sub { color: var(--bright); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current='page'] { border-bottom-color: var(--blue); }
.nav .btn { display: inline-flex; margin-left: 0.6rem; padding: 0.7rem 1.1rem; color: var(--white); border-bottom-width: 2px; }
.nav .btn:hover { color: var(--white); }

.menu { display: none; }
.menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--head);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }

@media (max-width: 880px) {
  .nav--desktop { display: none; }
  .menu { display: block; }
  .menu .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gap) 1.25rem; }
  .menu .nav ul { flex-direction: column; align-items: stretch; }
  .menu .nav a { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
  .menu .nav .btn { margin: 1rem 0 0; justify-content: center; padding: 0.95rem; }
  .topbar__note { display: none; }
  .topbar .wrap { justify-content: center; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--tint { background: var(--tint); }
.on-ink { background: var(--ink); color: var(--white); }
.on-ink a:not(.btn) { color: var(--bright); }
.grid-bg {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.12) 1px, transparent 1px);
  background-size: 40px 40px;
}
.section__head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head--split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }

/* Roofline divider between sections */
.roofline { display: block; width: 100%; height: 28px; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.hero__copy { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero h1 span { color: var(--bright); }
.hero__art { align-self: end; }
.hero__art img { width: 100%; }
.hero__facts { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; color: #CBD5E1; font-size: 0.95rem; }
.hero__facts li { display: inline-flex; gap: 0.45rem; align-items: center; }
.hero__facts svg { color: var(--bright); }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 0; }
  .hero__art { max-width: 420px; }
}

/* Rating strip */
.rating { background: var(--blue); color: var(--white); }
.rating .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: center; justify-content: space-between; min-height: 64px; padding-block: 0.75rem; }
.rating p { margin: 0; font-weight: 700; }
.rating__score { font-family: var(--head); font-weight: 800; font-size: 1.5rem; margin-right: 0.4rem; }
.rating a { color: var(--white); font-weight: 700; }

/* Service cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.card { background: var(--white); position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); }
.card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card__art { background: var(--tint); border-bottom: 1px solid var(--line); }
.card__art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__num { font-family: var(--head); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.16em; color: var(--blue); margin-bottom: 0.4rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 1rem; }
.card__more { margin-top: auto; display: inline-flex; gap: 0.4rem; align-items: center; font-family: var(--head); font-weight: 800; font-size: 0.9rem; color: var(--blue); }
.card::after { content: ''; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.card:hover::after, .card:focus-within::after { transform: scaleX(1); }
.card:hover h3 { color: var(--blue); }

.group + .group { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 3px solid var(--ink); padding-bottom: 0.6rem; margin-bottom: 1.25rem; }
.group__head h2, .group__head h3 { margin: 0; }
.group__head p { margin: 0; color: var(--muted); }

/* Promises */
.promises { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem; }
.promise__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--blue); color: var(--white); margin-bottom: 1rem; }
.on-ink .promise__icon { background: var(--bright); color: var(--ink); }
.promise p { color: var(--muted); margin: 0; }
.on-ink .promise p { color: #CBD5E1; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.step { counter-increment: step; padding: 1.5rem 1.5rem 0 0; position: relative; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--head);
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bright);
  margin-bottom: 0.8rem;
}
.step::after { content: ''; position: absolute; top: -2px; left: 0; width: 48px; height: 3px; background: var(--bright); }
.step p { color: #CBD5E1; margin: 0; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr 1fr; gap: 1.5rem 0; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Split block */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split__art { border: 1px solid var(--line); background: var(--tint); }
.split > .panel { align-self: stretch; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.6rem; }
.ticks li { display: flex; gap: 0.7rem; align-items: flex-start; }
.ticks svg { flex: none; color: var(--blue); margin-top: 0.2rem; }
.on-ink .ticks svg { color: var(--bright); }

/* Service page */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.crumbs { font-size: 0.88rem; margin-bottom: 1.25rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: '/'; margin-right: 0.4rem; color: #64748B; }
.on-ink .crumbs { color: #CBD5E1; }
.spec { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.spec__side { position: sticky; top: 100px; border: 2px solid var(--ink); padding: 1.5rem; background: var(--white); }
.spec__side h2 { font-size: 1.25rem; }
.spec__side p { color: var(--muted); }
.spec__side .btn { width: 100%; justify-content: center; margin-bottom: 0.6rem; }
@media (max-width: 880px) { .spec { grid-template-columns: 1fr; } .spec__side { position: static; } }
.note { border-left: 4px solid var(--blue); background: var(--tint); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.note p { margin: 0; }
.suits { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }

/* FAQs */
.faqs { border-top: 2px solid var(--ink); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--blue); transition: transform 150ms ease; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 1.15rem; margin: 0; max-width: 70ch; }

/* Guarantee and finance */
.panel { border: 2px solid var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--white); }
.panel--blue { border-color: var(--blue); }
.small-print { font-size: 0.85rem; color: var(--muted); max-width: 90ch; }
.on-ink .small-print { color: #94A3B8; }

/* Quote banner */
.cta { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta h2 { margin: 0 0 0.3rem; }
.cta p { margin: 0; color: #CBD5E1; }
.cta__phone { font-family: var(--head); font-weight: 800; font-size: 1.4rem; color: var(--white); text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; }
.on-ink a.cta__phone { color: var(--white); }
.on-ink a.cta__phone:hover { color: var(--bright); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-item { background: var(--white); padding: 1.5rem; }
.contact-item__label { font-family: var(--head); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.4rem; }
.contact-item__value { font-family: var(--head); font-weight: 800; font-size: 1.25rem; text-decoration: none; word-break: break-word; }
.quote-frame { width: 100%; border: 0; min-height: 860px; background: transparent; display: block; }
.form-pending { border: 2px dashed var(--blue); padding: 2rem; background: var(--white); }

/* Legal pages */
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }

/* Footer */
.footer { padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: 0.95rem; border-top: 6px solid var(--blue); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer h2 { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: #94A3B8; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer a:not(.btn) { color: var(--white); text-decoration: none; }
.footer a:not(.btn):hover { color: var(--bright); text-decoration: underline; }
.footer__about { color: #CBD5E1; margin-top: 1rem; max-width: 34ch; }
.social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.3); }
.social a:hover { border-color: var(--bright); }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 2.5rem; padding-top: 1.5rem; color: #94A3B8; font-size: 0.85rem; }
.footer__legal p { margin: 0 0 0.6rem; }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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