/* JB Contractors — plymouthroofer.co.uk
   Palette: slate / chalk / JB blue / signal red. Type: Barlow Condensed (display) + Barlow (text). */
:root {
  --slate: #1E2A38;
  --slate-deep: #121A24;
  --chalk: #F4F3EE;
  --white: #FFFFFF;
  --blue: #1A4DB3;
  --blue-deep: #143C8C;
  --red: #D63B1F;
  --ink: #1B2430;
  --mute: #5B6474;
  --line: #D9D7CF;
  --pitch: 44px;             /* roof-pitch cut depth */
  --w: 1200px;
  --gutter: 24px;
  --r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--chalk); color: var(--ink);
  font-family: "Barlow", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 700; line-height: 1.05;
  letter-spacing: -0.005em; color: var(--ink); margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }
.lede { font-size: 1.2rem; color: var(--mute); max-width: 62ch; }
.measure { max-width: 68ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; padding: .85em 1.4em;
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em;
  border-radius: var(--r); text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: #B83118; color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- header ---------- */
.topbar { background: var(--slate-deep); color: #C9D1DC; font-size: .92rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar span + span { margin-left: 22px; }
.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .wrap { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 56px; height: 56px; border-radius: 4px; }
.brand b { font-family: "Barlow Condensed", sans-serif; font-size: 1.55rem; font-weight: 700; line-height: 1; display: block; }
.brand small { display: block; color: var(--mute); font-size: .85rem; line-height: 1.1; margin-top: 3px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: var(--r); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--chalk); }
.header .btn { margin-left: 8px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--ink); border-radius: var(--r); padding: 8px 12px; font: inherit; font-weight: 600; }
.mobile-nav { display: none; background: var(--white); border-bottom: 1px solid var(--line); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 14px var(--gutter); border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }

/* ---------- hero ---------- */
.hero { position: relative; color: var(--white); background: var(--slate); isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(18,26,36,.94) 0%, rgba(18,26,36,.78) 45%, rgba(18,26,36,.25) 100%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .9fr); gap: 48px; align-items: end; padding-top: 88px; padding-bottom: calc(72px + var(--pitch)); }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .lede { color: #DCE3EC; font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-areas { margin-top: 36px; color: #B7C2D0; font-size: 1rem; }
.hero-areas b { color: var(--white); font-weight: 600; }
.pitch-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--pitch)), 0 100%); }
.pitch-top { clip-path: polygon(0 var(--pitch), 100% 0, 100% 100%, 0 100%); }

/* call card */
.callcard { background: var(--white); color: var(--ink); border-radius: var(--r); padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.callcard h2 { font-size: 1.35rem; margin-bottom: 6px; }
.callcard .num { display: block; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 2.6rem; color: var(--red); text-decoration: none; line-height: 1; margin: 6px 0 14px; letter-spacing: .01em; }
.callcard ul { list-style: none; padding: 0; margin: 0 0 18px; color: var(--mute); }
.callcard li { padding: 7px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.callcard li::before { content: ""; width: 10px; height: 10px; background: var(--blue); flex: none; transform: translateY(-1px) skewY(-8deg); }
.callcard .btn { width: 100%; justify-content: center; }

/* ---------- facts strip ---------- */
.facts { background: var(--slate); color: var(--white); margin-top: calc(-1 * var(--pitch)); position: relative; z-index: 1; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 28px var(--gutter); }
.facts div { border-left: 3px solid var(--blue); padding-left: 14px; }
.facts b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; font-weight: 700; }
.facts span { color: #B7C2D0; font-size: .95rem; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-dark { background: var(--slate); color: #DCE3EC; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-white { background: var(--white); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 40px; }
.section-head p { margin: 0; color: var(--mute); max-width: 56ch; }
.section-dark .section-head p { color: #B7C2D0; }

/* services grid */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc { position: relative; display: block; text-decoration: none; color: var(--white); background: var(--slate-deep); border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; }
.svc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.svc:hover img { transform: scale(1.04); }
.svc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,26,36,.95) 0%, rgba(18,26,36,.35) 45%, rgba(18,26,36,0) 70%); }
.svc div { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 1; }
.svc h3 { color: var(--white); margin: 0 0 4px; font-size: 1.45rem; }
.svc p { margin: 0; color: #C9D1DC; font-size: .95rem; }
.svc-list { columns: 2; gap: 40px; margin-top: 32px; padding: 0; list-style: none; }
.svc-list li { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--line); }
.svc-list a { text-decoration: none; color: var(--ink); font-weight: 500; }
.svc-list a:hover { color: var(--blue); }

/* two-up feature */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.feature.flip > :first-child { order: 2; }
.feature figure { margin: 0; position: relative; }
.feature figure img { border-radius: var(--r); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.feature figure img + img { position: absolute; width: 42%; right: -20px; bottom: -28px; border: 6px solid var(--chalk); aspect-ratio: 1; }
.section-white .feature figure img + img { border-color: var(--white); }
.feature h2 { max-width: 16ch; }
.feature .checks { list-style: none; padding: 0; margin: 20px 0 28px; }
.feature .checks li { padding: 8px 0 8px 30px; position: relative; border-top: 1px solid var(--line); }
.feature .checks li::before { content: ""; position: absolute; left: 0; top: 15px; width: 14px; height: 8px; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(-45deg); }

/* process (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 3px solid var(--blue); counter-reset: step; }
.steps > div { padding: 26px 22px 0 0; counter-increment: step; }
.steps > div + div { padding-left: 22px; border-left: 1px solid rgba(255,255,255,.14); }
.steps h3::before { content: counter(step); display: inline-block; font-size: .95rem; background: var(--blue); color: var(--white); width: 26px; height: 26px; border-radius: 50%; text-align: center; line-height: 26px; margin-right: 10px; vertical-align: 3px; }
.steps p { color: #B7C2D0; margin: 0; }

/* before / after */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ba { background: var(--white); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.ba-frame { position: relative; aspect-ratio: 4/3; overflow: hidden; user-select: none; --pos: 50%; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: var(--white); transform: translateX(-50%); pointer-events: none; }
.ba-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: var(--white); font: 700 1.4rem/44px "Barlow Condensed", sans-serif; text-align: center; letter-spacing: 3px; padding-left: 3px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-label { position: absolute; top: 12px; padding: 4px 10px; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: .95rem; color: var(--white); background: rgba(18,26,36,.75); border-radius: 3px; pointer-events: none; }
.ba-label.l { left: 12px; } .ba-label.r { right: 12px; background: var(--blue); }
.ba-cap { padding: 16px 20px 20px; }
.ba-cap h3 { font-size: 1.25rem; margin-bottom: 4px; }
.ba-cap p { margin: 0; color: var(--mute); font-size: .95rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r); background: var(--slate-deep); }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; color: var(--white); font-size: .9rem; background: linear-gradient(to top, rgba(18,26,36,.9), rgba(18,26,36,0)); }

/* areas */
.areas { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.areas ul { list-style: none; padding: 0; margin: 0; columns: 2; gap: 24px; }
.areas li { padding: 6px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.areas h3 { font-size: 1.3rem; }

/* contact band */
.contact-band { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-band iframe { width: 100%; height: 100%; min-height: 380px; border: 0; border-radius: var(--r); display: block; }
.nap { list-style: none; padding: 0; margin: 0 0 24px; }
.nap li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.nap li span { color: var(--mute); }
.nap a { text-decoration: none; font-weight: 600; }
.form { display: grid; gap: 14px; background: var(--white); padding: 24px; border-radius: var(--r); border: 1px solid var(--line); }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form textarea, .form select { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--chalk); color: var(--ink); width: 100%; }
.form textarea { min-height: 120px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form small { color: var(--mute); }

/* ---------- inner pages ---------- */
.page-hero { position: relative; color: var(--white); background: var(--slate); isolation: isolate; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(18,26,36,.95) 0%, rgba(18,26,36,.75) 55%, rgba(18,26,36,.35) 100%); }
.page-hero .wrap { padding-top: 64px; padding-bottom: calc(48px + var(--pitch)); }
.page-hero h1 { color: var(--white); max-width: 18ch; }
.page-hero .lede { color: #DCE3EC; }
.crumbs { font-size: .92rem; color: #B7C2D0; margin-bottom: 18px; }
.crumbs a { color: var(--white); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; margin-top: calc(-1 * var(--pitch) + 24px); position: relative; z-index: 1; }
.article { background: var(--white); border-radius: var(--r); padding: 40px; border: 1px solid var(--line); }
.article .lede { color: var(--ink); font-size: 1.18rem; border-left: 4px solid var(--blue); padding-left: 18px; margin-bottom: 28px; }
.article h2 { font-size: 1.9rem; margin-top: 1.6em; }
.article h3 { font-size: 1.3rem; margin-top: 1.2em; }
.article ul { padding-left: 1.2em; }
.article li { margin-bottom: .35em; }
.article img.lead-img { border-radius: var(--r); margin-bottom: 28px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.faq { margin-top: 40px; border-top: 3px solid var(--blue); padding-top: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.3rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--mute); max-width: 68ch; }
.aside { position: sticky; top: 100px; display: grid; gap: 20px; align-self: start; }
.aside .callcard { box-shadow: none; border: 1px solid var(--line); }
.aside nav { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.aside nav h3 { font-size: 1.2rem; margin-bottom: 8px; }
.aside nav a { display: block; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.aside nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.aside nav a:hover { color: var(--blue); }

/* projects list */
.projects { display: grid; gap: 28px; }
.project { display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.project:nth-child(even) > figure { order: 2; }
.project figure { margin: 0; }
.project img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.project div { padding: 32px; }
.project p:last-child { margin: 0; }
.project .tag { color: var(--blue); font-weight: 600; font-size: .95rem; margin-bottom: 8px; }

/* ---------- footer ---------- */
.cta-band { background: var(--blue); color: var(--white); }
.cta-band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { margin: 0; color: #DCE3EC; }
.cta-band .btn-red { font-size: 1.35rem; }
.footer { background: var(--slate-deep); color: #B7C2D0; font-size: .95rem; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.footer h3 { color: var(--white); font-size: 1.15rem; }
.footer a { color: #DCE3EC; text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 4px 0; }
.footer address { font-style: normal; line-height: 1.7; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.12); }
.footer .legal .wrap { display: flex; justify-content: space-between; gap: 16px; padding: 18px var(--gutter); font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .svc-grid, .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure:first-child { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .areas { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .aside { position: static; grid-template-columns: 1fr 1fr; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav, .header .btn-red { display: none; }
  .menu-toggle { display: inline-block; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(18,26,36,.9) 0%, rgba(18,26,36,.85) 100%); }
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip > :first-child { order: 0; }
  .feature figure img + img { display: none; }
  .ba-grid, .contact-band, .project { grid-template-columns: 1fr; }
  .project:nth-child(even) > figure { order: 0; }
  .section-head { grid-template-columns: 1fr; }
  .cta-band .wrap { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .topbar span:not(:first-child) { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .svc-grid, .svc-list, .areas, .areas ul, .facts .wrap, .form .row, .aside, .footer .wrap { grid-template-columns: 1fr; columns: 1; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:first-child { grid-column: span 2; }
  .article { padding: 24px; }
  :root { --pitch: 28px; }
  .footer .legal .wrap { flex-direction: column; }
}

/* tidy-ups */
.aside .callcard .num { font-size: 2.1rem; }
@media (max-width: 860px) {
  .topbar .wrap > div { display: none; }
  .topbar .wrap { justify-content: center; }
  .brand small { display: none; }
  .brand b { font-size: 1.35rem; }
}
