/*
Theme Name: Renovator
Description: A clean, practical theme for renovation and building companies. Includes a home page, About Us, Our Services and a Contact page with a built-in enquiry form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: renovator
*/

:root {
  --ink: #16293a;
  --chalk: #f3f4f2;
  --tape: #f2c230;
  --timber: #8a5a36;
  --slate: #55656f;
  --line: #cdd2d0;
  --focus: #1f5fd1;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--chalk);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.75rem; }
p { margin: 0 0 1em; max-width: 68ch; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-header, .hero, .site-footer, .cta-band { --focus: var(--tape); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--tape); color: var(--ink); padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.4rem; font: 600 1rem/1.2 "Barlow", sans-serif;
  border: 2px solid transparent; border-radius: 2px; text-decoration: none; cursor: pointer;
}
.btn-tape { background: var(--tape); border-color: var(--tape); color: var(--ink); }
.btn-tape:hover { background: #ffd24a; border-color: #ffd24a; }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--chalk); }
.btn-ink:hover { background: #24405a; }

/* Header */
.site-header { background: var(--ink); color: var(--chalk); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { font: 700 1.9rem/1 "Barlow Condensed", sans-serif; text-decoration: none; margin-right: auto; }
.brand img { max-height: 48px; width: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.primary-nav a { text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { border-bottom-color: var(--tape); }
.nav-toggle { display: none; background: none; color: inherit; border: 2px solid currentColor; padding: 8px 14px; font: 600 1rem "Barlow", sans-serif; border-radius: 2px; }

/* Hero */
.hero { background: var(--ink) center / cover no-repeat; color: var(--chalk); padding: 96px 0 80px; }
.hero h1 { max-width: 15ch; }
.hero p { font-size: 1.25rem; max-width: 52ch; color: #dfe5e8; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.page-hero { background: var(--ink); color: var(--chalk); padding: 64px 0 56px; }
.page-hero h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4rem); }

/* The tape-measure edge */
.tape {
  height: 44px; background-color: var(--tape);
  background-image: linear-gradient(90deg, var(--ink) 2px, transparent 2px), linear-gradient(90deg, var(--ink) 2px, transparent 2px);
  background-size: 12px 12px, 60px 24px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 0;
}

/* Sections */
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }
.split { display: grid; grid-template-columns: minmax(200px, 1fr) 2.4fr; gap: 32px 56px; align-items: start; }
.split > .lead { position: sticky; top: 100px; }

.service-row {
  display: grid; grid-template-columns: minmax(200px, 1fr) 2.4fr; gap: 12px 56px;
  padding: 28px 0; border-top: 2px solid var(--ink);
}
.service-row:last-child { border-bottom: 2px solid var(--ink); }
.service-row h3 { margin: 0; }
.service-row p { color: var(--slate); }
.split .service-row { grid-template-columns: 1fr; gap: 8px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { padding-left: 22px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 3px; background: var(--timber); }

.about-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-intro .photo img { border-radius: 2px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-placeholder { aspect-ratio: 4 / 3; background: repeating-linear-gradient(135deg, #dfe3e0 0 14px, #e9ece9 14px 28px); display: grid; place-items: center; color: var(--slate); font-size: .95rem; }

.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 32px; }
.steps li { counter-increment: step; border-top: 4px solid var(--tape); padding-top: 14px; }
.steps li::before { content: counter(step); display: block; font: 700 2.6rem/1 "Barlow Condensed", sans-serif; color: var(--timber); margin-bottom: 6px; }
.steps h3 { font-size: 1.4rem; margin-bottom: .3em; }
.steps p { font-size: 1rem; color: var(--slate); margin: 0; }

.cta-band { background: var(--ink); color: var(--chalk); padding: 56px 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0; }

/* Content pages */
.entry { padding: 64px 0 80px; }
.entry-content > * { max-width: 68ch; }
.entry-content img { border-radius: 2px; }
.post-list article { padding: 24px 0; border-top: 2px solid var(--ink); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .85rem; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 2px;
}
.field textarea { min-height: 160px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.hint { font-size: .9rem; color: var(--slate); margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.notice { padding: 14px 18px; margin-bottom: 24px; border-left: 6px solid; max-width: none; }
.notice-ok { background: #e3f1e5; border-color: #2e7d32; }
.notice-err { background: #fbe7e4; border-color: #b3261e; }
.details { border-top: 2px solid var(--ink); padding-top: 20px; }
.details dt { font-weight: 600; margin-top: 18px; }
.details dd { margin: 2px 0 0; color: var(--slate); }
.details dd a { color: var(--ink); }

/* Contact Form 7 */
.contact-grid .entry-content > * { max-width: none; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7-not-valid-tip { display: block; margin-top: 4px; font-size: .9rem; color: #b3261e; }
.wpcf7-spinner { margin: 0 0 0 12px; }
body .wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 14px 18px; border: 0; border-left: 6px solid var(--slate); background: #fff; }
body .wpcf7 form.sent .wpcf7-response-output { border-left-color: #2e7d32; background: #e3f1e5; }
body .wpcf7 form.invalid .wpcf7-response-output,
body .wpcf7 form.failed .wpcf7-response-output,
body .wpcf7 form.spam .wpcf7-response-output,
body .wpcf7 form.unaccepted .wpcf7-response-output,
body .wpcf7 form.aborted .wpcf7-response-output { border-left-color: #b3261e; background: #fbe7e4; }

/* Footer */
.site-footer { background: var(--ink); color: var(--chalk); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: 1.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer p { color: #c9d2d7; }
.site-footer a { color: var(--chalk); }
.footer-note { border-top: 1px solid #3a5166; margin-top: 40px; padding-top: 20px; font-size: .9rem; color: #9fb0ba; }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .header-cta { display: none; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); padding: 8px 24px 24px; border-top: 1px solid #3a5166; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 4px; }
  .split, .service-row, .about-intro, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .split > .lead { position: static; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
