/* ============================================================
   DDK Roofing Leeds Ltd — concept preview
   Mobile-first. Slate + brick, joint lines instead of shadows.
   No external assets: system font stack, local images only.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Palette: roofing slate, Leeds brick, lime-mortar paper */
  --slate-950: #141b21;
  --slate-900: #1b232a;
  --slate-800: #26313a;
  --slate-700: #33404b;
  --mist: #b9c4cb;
  --paper: #f0efe9;
  --white: #ffffff;
  --ink: #232b32;
  --body: #454f58;
  --line: #dcd8ce;
  --line-dark: #3a4750;
  --brick: #b3432b;
  --brick-deep: #93331f;
  --brick-light: #e08663;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Fluid type — safe from 360px to 1440px */
  --fs-h1: clamp(2.125rem, 1.3rem + 3.4vw, 3.625rem);
  --fs-h2: clamp(1.625rem, 1.4rem + 1.5vw, 2.375rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.45vw, 1.3125rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);

  --w-content: 68rem;
  --focus: var(--brick);
}

/* Dark surfaces swap the focus ring colour */
.topbar,
.hero,
.trust-strip,
.dark,
.site-footer,
.call-bar {
  --focus: var(--brick-light);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--paper);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--brick); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transform: translateY(-120%);
  background: var(--brick);
  color: var(--white);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 4px 0;
  text-decoration: none;
  transition: transform 150ms ease;
}
.skip-link:focus { transform: none; }

.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-brick { background: var(--brick); color: var(--white); }
.btn-brick:hover, .btn-brick:active { background: var(--brick-deep); }
.btn-ghost { border-color: rgba(185, 196, 203, 0.55); color: var(--white); }
.btn-ghost:hover, .btn-ghost:active { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

/* Image frames — the "cut slate" corner is the one repeated shape */
.framed {
  overflow: hidden;
  border-radius: 4px;
  background: var(--slate-800);
}
.framed img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.clipped {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

/* ---------- Sticky top block: preview banner + header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
}
.preview-banner {
  background: var(--slate-950);
  border-bottom: 3px solid var(--brick);
  color: var(--mist);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.4rem 1rem;
  line-height: 1.4;
}

.site-header {
  position: relative;
  background: var(--slate-900);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 60px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}
.mark { width: 2rem; height: 2rem; flex: none; }
.mark-peak { stroke: var(--brick); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mark-walls { stroke: var(--mist); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wordmark-name {
  display: block;
  color: var(--white);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
.wordmark-sub {
  display: block;
  color: var(--mist);
  font-size: 0.6875rem;
  line-height: 1.3;
  white-space: nowrap;
}

.site-nav ul { display: grid; gap: 0.25rem; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--mist);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:active { color: var(--white); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  color: var(--mist);
  cursor: pointer;
}
.nav-toggle .icon { width: 1.375rem; height: 1.375rem; }
.nav-toggle:hover, .nav-toggle:active { color: var(--white); border-color: var(--mist); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--brick);
  border-radius: 4px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.header-call:hover, .header-call:active { background: var(--brick-deep); }
.header-call span { white-space: nowrap; }

/* Mobile nav panel — collapses under the header */
@media (max-width: 767.98px) {
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--slate-900);
    border-bottom: 1px solid var(--line-dark);
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1rem;
  }
  .site-nav:not([hidden]) { animation: nav-in 150ms ease both; }
  .site-nav li + li { border-top: 1px solid var(--slate-700); }
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .wordmark-name { font-size: 1.0625rem; }
  .wordmark-sub { font-size: 0.75rem; }
  .header-call { font-size: 0.9375rem; padding: 0.625rem 1rem; }
  .site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1.75rem);
  }
  .site-nav a { min-height: 44px; }
  /* Menu may carry [hidden] from a narrow viewport — keep it visible on desktop */
  .site-nav[hidden] { display: block; }
}

@keyframes nav-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--slate-900);
  color: var(--white);
  isolation: isolate;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 27, 33, 0.62) 0%, rgba(20, 27, 33, 0.9) 62%, rgba(20, 27, 33, 0.96) 100%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding-block: clamp(3rem, 8vw, 4.5rem) clamp(2.5rem, 6vw, 4rem);
}
.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.hero-sub {
  font-size: var(--fs-lead);
  font-weight: 600;
  color: var(--white);
  max-width: 44ch;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.hero-trust {
  font-size: 0.875rem;
  color: var(--mist);
  max-width: 60ch;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 768px) {
  .hero-overlay {
    background: linear-gradient(90deg, rgba(20, 27, 33, 0.96) 0%, rgba(20, 27, 33, 0.86) 52%, rgba(20, 27, 33, 0.45) 100%);
  }
  .hero-inner {
    justify-content: center;
    min-height: min(88vh, 46rem);
  }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--slate-800);
  border-bottom: 1px solid var(--line-dark);
  padding-block: 0.875rem;
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1.75rem;
  row-gap: 0.5rem;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9375rem;
}
.trust-list .icon { color: var(--brick-light); width: 1.125rem; height: 1.125rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.25rem); }
.band-white {
  background: var(--white);
  border-block: 1px solid var(--line);
}
.section-head h2,
.areas h2,
.faq h2,
.contact h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.75rem;
  max-width: 26ch;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 55ch;
}
.dark h2 { color: var(--white); }
.dark .lead { color: var(--mist); }

/* ---------- Services ---------- */
.section-intro {
  display: grid;
  gap: 1.5rem;
}
.section-intro .framed { aspect-ratio: 16 / 10; }
.cards-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  transition: border-color 150ms ease;
}
.card:hover, .card:focus-within { border-color: var(--brick); }
.card-icon { color: var(--brick); width: 1.75rem; height: 1.75rem; }
.card h3 {
  font-size: var(--fs-h3);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0.875rem 0 0.5rem;
}
.card p { font-size: 1rem; line-height: 1.6; }
.card a {
  color: var(--brick);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card a:hover, .card a:active { color: var(--brick-deep); }

@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .section-intro {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
  }
  .section-intro .framed { aspect-ratio: 4 / 3; }
}
@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Why us ---------- */
.why-us { background: var(--slate-900); }
.why-grid {
  display: grid;
  gap: 2rem;
}
.why-photo { aspect-ratio: 4 / 3; }
.check-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.check-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.check-list .icon {
  color: var(--brick-light);
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
}
.check-list div { line-height: 1.55; max-width: 62ch; }
.check-list strong { color: var(--white); }
@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 3rem;
  }
}

/* ---------- How it works — the roofline: steps rise to the guarantee ---------- */
.how-photo { aspect-ratio: 16 / 10; margin-top: 1.5rem; }
.steps {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem 1.25rem 1.5rem;
}
.step-num {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  background: var(--brick);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.875rem;
}
.step h3 {
  font-size: var(--fs-h3);
  color: var(--ink);
  margin-bottom: 0.375rem;
}
.step p { font-size: 1rem; line-height: 1.55; }
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .how-photo { aspect-ratio: 21 / 10; }
}
@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    gap: 1.25rem;
    /* offset steps so the run rises like a raking roofline */
    margin-bottom: 4rem;
  }
  .step:nth-child(1) { transform: translateY(3.75rem); }
  .step:nth-child(2) { transform: translateY(2.5rem); }
  .step:nth-child(3) { transform: translateY(1.25rem); }
  .step:nth-child(4) { transform: translateY(0.375rem); }
  .step:nth-child(5) { transform: translateY(-0.75rem); }
}

/* ---------- Areas ---------- */
.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.75rem;
}
.area-chips li {
  padding: 0.625rem 1.125rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
}
.area-chips li.chip-home {
  background: var(--brick);
  border-color: var(--brick);
  color: var(--white);
}
.areas-note {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 48rem; }
.faq-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 150ms ease;
}
.faq-item[open] { border-color: var(--brick); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 {
  flex: 1;
  font-size: var(--fs-h3);
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.chev {
  color: var(--brick);
  width: 1.25rem; height: 1.25rem;
  flex: none;
  transition: transform 150ms ease;
}
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-item p {
  padding: 0 1.125rem 1.125rem;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 68ch;
}

/* ---------- Contact ---------- */
.contact { background: var(--slate-900); }
.contact-grid {
  display: grid;
  gap: 2.5rem;
}
.contact-cards {
  display: grid;
  gap: 0.875rem;
  margin-top: 1.75rem;
}
.contact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.875rem;
  align-items: center;
  padding: 1rem 1.125rem;
  background: var(--slate-800);
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 150ms ease;
}
.contact-card:hover, .contact-card:active { border-color: var(--brick-light); }
.contact-card .icon { grid-row: 1 / 3; color: var(--brick-light); width: 1.5rem; height: 1.5rem; }
.contact-label { grid-column: 2; grid-row: 1; color: var(--mist); font-size: 0.8125rem; }
.contact-value { grid-column: 2; grid-row: 2; color: var(--white); font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.contact-where {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.25rem 0.25rem 0;
  color: var(--mist);
  font-size: 0.9375rem;
}
.contact-where .icon { color: var(--brick-light); width: 1.25rem; height: 1.25rem; flex: none; margin-top: 0.125rem; }

.survey-form {
  background: var(--white);
  border-radius: 4px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}
.survey-form h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.375rem;
}
.form-hint {
  color: var(--body);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}
.field { margin-bottom: 1.125rem; }
.field label {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}
.req { color: var(--brick); }
.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1px solid #c9c3b7;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible {
  border-color: var(--brick);
}
.survey-form .btn { width: 100%; }
.form-note {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: #f6e7e1;
  border: 1px solid var(--brick);
  border-radius: 4px;
  color: #7a2a18;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.form-note a {
  color: var(--brick-deep);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 5fr 6fr;
    gap: 3rem;
    align-items: start;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate-950);
  color: var(--mist);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
.footer-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 800;
  font-size: 1.0625rem;
  margin-bottom: 0.75rem;
}
.footer-name .mark { width: 1.75rem; height: 1.75rem; }
.footer-blurb {
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 42ch;
}
.footer-nav h3, .footer-contact h3 {
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-nav ul, .footer-contact ul {
  display: grid;
  gap: 0.625rem;
}
.footer-nav a, .footer-contact a {
  color: var(--mist);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-nav a:hover, .footer-nav a:active,
.footer-contact a:hover, .footer-contact a:active {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
}
.footer-contact .icon { color: var(--brick-light); width: 1.125rem; height: 1.125rem; flex: none; }
.footer-bottom {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-dark);
  padding-block: 1.25rem;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.8125rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
}

/* ---------- Sticky mobile call bar ---------- */
.call-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 60px;
  padding: 0.5rem 1rem;
  padding-bottom: 0.5rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  background: var(--brick);
  border-top: 4px solid var(--slate-950);
  color: var(--white);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}
.call-bar:active { background: var(--brick-deep); }
.call-bar .icon { width: 1.375rem; height: 1.375rem; }

@media (max-width: 767.98px) {
  .call-bar { display: flex; }
  body {
    padding-bottom: 64px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
