/* Ivor Building & Carpentry. Clean and corporate: white and light grey bands, black text,
   the van livery's gold on the main action and the logo only. Mobile first.
   Colours come from /_lbw/theme.css (--yellow, --ink), with fallbacks here. */
:root {
  --yellow: #e9b22a;
  --yellow-dark: #d29c14;
  --ink: #1b1b1b;
  --text: #2b2d31;
  --muted: #5b616b;
  --line: #e3e5e8;
  --grey: #f5f6f7;
  --white: #fff;
  --head: Montserrat, Inter, Arial, sans-serif;
  --body: Inter, Arial, sans-serif;
  --radius: 6px;
  --wrap: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 400 17px/1.65 var(--body); }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--yellow-dark); outline-offset: 3px; }
input, textarea { caret-color: var(--ink); }

h1, h2, h3 { font-family: var(--head); color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 800; }
h2 { font-size: 28px; line-height: 1.2; font-weight: 800; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
.lead, .lead p { font-size: 19px; line-height: 1.6; color: var(--text); }
@media (min-width: 960px) {
  h1 { font-size: 52px; line-height: 1.08; }
  h2 { font-size: 38px; }
  h3 { font-size: 21px; }
  .lead, .lead p { font-size: 20px; }
}

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 50; padding: 12px 16px; background: var(--ink); color: var(--white); }
.skip:focus { top: 12px; }

/* Buttons: one shape, gently rounded. Gold is the one main action. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px;
  border: 2px solid var(--yellow); border-radius: var(--radius); background: var(--yellow); color: var(--ink);
  font: 700 16px/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; }
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
/* Stand-in for Ivor's logo (a gold tile with black roof peaks, from the van livery), drawn
   in CSS until the original artwork is supplied. */
.logo-mark { position: relative; flex: none; width: 40px; height: 40px; border-radius: 7px; background: var(--yellow); overflow: hidden; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; bottom: 10px; width: 0; height: 0; border-style: solid; border-color: transparent transparent var(--ink) transparent; }
.logo-mark::before { left: 5px; border-width: 0 9px 13px 9px; }
.logo-mark::after { left: 15px; border-width: 0 10px 19px 10px; }
.logo-text { display: grid; line-height: 1.1; }
.logo-text strong { font: 800 20px/1.05 var(--head); letter-spacing: 0.01em; text-transform: uppercase; }
.logo-text > span { font: 600 13px/1.3 var(--body); color: var(--muted); }
.menu-toggle {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  font: 600 15px/1 var(--body); color: var(--ink); cursor: pointer;
}
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--text); }
.nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 959px) {
  /* Without the script the links stay visible as a wrapped row. With it, the menu is a
     full-screen sheet with a close button where the Menu button was. */
  .nav { width: 100%; flex-wrap: wrap; gap: 0 18px; padding-bottom: 10px; }
  .has-js .nav { display: none; }
  .has-js .nav.is-open {
    position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: stretch; gap: 0;
    width: auto; padding: 84px 20px 28px; background: var(--white); overflow-y: auto; overscroll-behavior: contain;
  }
  .has-js .nav a:not(.btn) { min-height: 64px; border-bottom: 1px solid var(--line); font: 700 24px/1.2 var(--head); letter-spacing: -0.01em; color: var(--ink); }
  .has-js .nav .btn { margin-top: 28px; min-height: 56px; font-size: 17px; }
  .menu-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--grey); cursor: pointer; }
  .menu-close::before, .menu-close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px; background: var(--ink); border-radius: 1px; transform: rotate(45deg); }
  .menu-close::after { transform: rotate(-45deg); }
  .menu-close:hover { background: var(--line); }
  html.menu-open { overflow: hidden; }
}
@media (min-width: 960px) { .menu-close { display: none; } }
@media (min-width: 960px) { .menu-toggle { display: none; } .top-inner { min-height: 80px; } }

/* ------------------------------------------------------------------ hero */
.hero-inner { display: grid; gap: 32px; padding: 36px 0 40px; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 16px; max-width: 34em; }
.hero .actions { margin-top: 28px; }
.hero .actions .btn { flex: 1 1 auto; }
.hero-proof { margin-top: 14px; font-size: 15px; color: var(--muted); }
.hero-proof a { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; }
.hero-photo { border-radius: 10px; overflow: hidden; background: var(--grey); aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding: 72px 0 80px; }
  .hero .actions .btn { flex: 0 0 auto; }
  .hero-photo { aspect-ratio: 5 / 4; }
}

.facts { background: var(--ink); color: var(--white); }
.facts-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; padding: 28px 0; }
.facts li { display: grid; gap: 2px; align-content: start; }
.facts strong { font: 800 18px/1.25 var(--head); color: var(--yellow); }
.facts span { font-size: 14.5px; line-height: 1.45; color: #d6d7da; }
@media (min-width: 960px) {
  .facts-inner { grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 32px 0; }
  .facts strong { font-size: 21px; }
  .facts span { font-size: 15px; }
}

/* ---------------------------------------------------------------- bands */
.band { padding: 64px 0; }
.band-grey { background: var(--grey); }
.band-ink { background: var(--ink); color: #e4e5e7; }
.band-ink h2 { color: var(--white); }
.band h2 + * { margin-top: 28px; }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; }
.head-row h2 + * { margin-top: 0; }
.head-row + * { margin-top: 24px; }
.intro { display: grid; gap: 14px; }
.intro h2 + * { margin-top: 0; }
.intro-text p { max-width: 40em; color: var(--muted); }
.band-ink .intro-text p { color: #c9cbcf; }
.intro + * { margin-top: 32px; }
@media (min-width: 960px) {
  .band { padding: 104px 0; }
  .band h2 + * { margin-top: 44px; }
  .head-row + *, .intro + * { margin-top: 44px; }
  .intro { grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; }
}

/* Services: a ruled list in columns, not cards. */
.services { display: grid; border-top: 2px solid var(--ink); }
.services li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.services p { margin-top: 4px; color: var(--muted); }
@media (min-width: 640px) { .services { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
@media (min-width: 960px) { .services { grid-template-columns: repeat(3, 1fr); column-gap: 48px; } .services li { padding: 28px 0; } }

/* Work */
.work { display: grid; gap: 40px; }
.project-photo { border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.project-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.4s ease; }
.project:hover .project-photo img { scale: 1.03; }
.project h3 { margin-top: 18px; }
.project p { margin-top: 6px; color: var(--muted); }
.project .caption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: #6b7079; }
@media (min-width: 760px) { .work { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (min-width: 1100px) { .work { grid-template-columns: repeat(4, 1fr); gap: 28px; } }

/* Reviews */
.reviews { display: grid; gap: 20px; }
.review { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.review blockquote p { font-size: 18px; line-height: 1.6; color: var(--ink); }
.review blockquote p::before { content: "\201C"; }
.review blockquote p::after { content: "\201D"; }
.review figcaption { display: grid; gap: 2px; font-size: 15px; line-height: 1.45; padding-top: 14px; border-top: 3px solid var(--yellow); }
.review figcaption strong { color: var(--ink); }
.review figcaption span { color: var(--muted); }
@media (min-width: 960px) { .reviews { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* Steps: a real sequence, so it is numbered. */
.steps { display: grid; gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 24px; background: var(--white); border-radius: 10px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 50%; background: var(--yellow); color: var(--ink); font: 800 16px/1 var(--head); }
.steps p { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* About */
.about { display: grid; gap: 32px; }
.about-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--grey); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.about-text h2 + * { margin-top: 20px; }
.about-more { margin-top: 16px; color: var(--muted); }
.about-more p + p, .lead p + p { margin-top: 12px; }
.ticks { margin-top: 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 32px; font-weight: 600; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 3px solid var(--yellow-dark); border-bottom: 3px solid var(--yellow-dark); transform: rotate(-45deg); }
@media (min-width: 960px) { .about { grid-template-columns: 5fr 6fr; gap: 72px; align-items: center; } .about-photo { aspect-ratio: 4 / 5; } }

/* FAQ */
.faq { display: grid; gap: 28px; }
.faq h2 + * { margin-top: 0; }
.faq-list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid #d9dce0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 14px 0; font: 600 17px/1.4 var(--body); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 40px 20px 0; color: var(--muted); max-width: 44em; }
@media (min-width: 960px) { .faq { grid-template-columns: 4fr 7fr; gap: 72px; align-items: start; } .faq summary { font-size: 18px; } }

/* --------------------------------------------------------- quote builder */
.quote { display: grid; gap: 32px; }
.quote-intro h2 + * { margin-top: 16px; }
.contact-lines { margin-top: 24px; display: grid; gap: 6px; color: #c9cbcf; }
.contact-lines a { color: var(--white); font-weight: 600; }
.quote-form { display: grid; gap: 24px; padding: 24px 20px; background: var(--white); border-radius: 12px; color: var(--text); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 10px; font: 700 16px/1.3 var(--body); color: var(--ink); }
.chips label { position: relative; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #cfd3d8; border-radius: 999px;
  font: 600 15px/1.2 var(--body); color: var(--text); background: var(--white); transition: border-color 0.15s, background-color 0.15s;
}
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chips input:focus-visible + span { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.fields { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font: 700 16px/1.3 var(--body); color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); font-size: 15px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #c4c9cf; border-radius: var(--radius);
  background: var(--white); color: var(--ink); font: 400 16px/1.4 var(--body);
}
.field input::placeholder { color: #737882; }
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }
.quote-out { padding: 16px 18px; border-radius: var(--radius); background: var(--grey); }
.quote-out[hidden] { display: none; }
.quote-out-label { font: 700 14px/1.3 var(--body); color: var(--muted); margin-bottom: 4px; }
.quote-message { display: block; font-size: 16px; color: var(--ink); white-space: pre-line; }
.quote-form .actions .btn { flex: 1 1 100%; }
.quote-note { font-size: 15px; font-weight: 600; color: var(--ink); }
.quote-note[hidden] { display: none; }
@media (min-width: 960px) {
  .quote { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
  .quote-form { padding: 36px; }
  .fields { grid-template-columns: 1fr 2fr; align-items: start; }
  .quote-form .actions .btn { flex: 0 0 auto; }
}

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 15px; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 12px; }
.foot h2 { font: 700 15px/1.4 var(--body); letter-spacing: 0; color: var(--ink); margin-bottom: 6px; }
.foot-cols a { display: inline-flex; min-height: 34px; align-items: center; color: var(--text); text-underline-offset: 3px; }
.foot-cols a:hover { color: var(--ink); }
.foot-small { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 14px; }
.foot-small a { color: var(--text); }
.credits p { font-size: 13px; line-height: 1.55; max-width: 80ch; }
@media (min-width: 960px) {
  .foot-cols { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .foot-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Heading font (Logo, colours and font > Heading font). */
.font-simple { --head: Inter, Arial, sans-serif; }
.font-classic { --head: Merriweather, Georgia, serif; }
.font-classic h1, .font-classic h2, .font-classic h3 { letter-spacing: -0.01em; }
/* An uploaded logo replaces the drawn gold square. */
.logo-img img { width: auto; height: 44px; max-width: 120px; object-fit: contain; }
