/* DG Roofing: site styles. Charcoal, orange and olive with Bookman type, as on the original site. */

@font-face {
  font-family: "Bookman DG";
  src: url("../fonts/bookman-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Bookman DG";
  src: url("../fonts/bookman-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --charcoal: #2a2525;
  --charcoal-deep: #1f1b1b;
  --charcoal-raised: #352f2f;
  --line: #4a4242;
  --orange: #f68935;       /* 6.2:1 on charcoal */
  --orange-hover: #ffa25a;
  --olive: #656b50;        /* white text 5.6:1 */
  --olive-deep: #545a41;
  --text: #f4f0ea;
  --muted: #cfc7bc;        /* 9:1 on charcoal */
  --font: "Bookman DG", "Bookman Old Style", "URW Bookman", Georgia, serif;
  --wrap: 75rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --header-h: 4.75rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--font);
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 0.6em; font-weight: 700; line-height: 1.15; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.6rem + 3.2vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
p, li { max-width: 68ch; }

a { color: var(--orange); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--orange-hover); text-decoration-thickness: 2px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.lead { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); color: var(--text); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.7rem 1.1rem; background: var(--orange); color: var(--charcoal); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  border: 2px solid var(--orange); border-radius: 3px;
  background: var(--orange); color: var(--charcoal);
  font: 700 1rem/1.2 var(--font); letter-spacing: 0.02em; text-decoration: none;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--charcoal); text-decoration: none; }
.btn--outline { background: transparent; color: var(--orange); }
.btn--outline:hover { background: var(--orange); color: var(--charcoal); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--charcoal-deep);
  border-bottom: 1px solid #00000040;
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.logo { flex: none; margin-right: auto; }
.logo img { width: auto; height: 4.2rem; }
.nav-toggle, .header-call { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a, .site-nav button {
  display: block; padding: 0.55rem 0.8rem;
  border: 0; background: none; color: var(--text);
  font: 400 1rem/1.3 var(--font); text-decoration: none; cursor: pointer;
}
.site-nav a:hover, .site-nav button:hover { color: var(--orange); }
.site-nav a[aria-current="page"] { color: var(--orange); text-decoration: underline; text-underline-offset: 0.35em; }
.has-sub { position: relative; }
.has-sub > button { display: inline-flex; align-items: center; gap: 0.35rem; }
.has-sub > button svg { width: 0.7rem; height: 0.7rem; fill: currentColor; transition: transform .2s; }
.has-sub > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 12rem;
  padding: 0.4rem 0; background: var(--charcoal-deep);
  border: 1px solid var(--line); border-top: 3px solid var(--orange);
  box-shadow: 0 12px 30px -12px #000;
}
.sub, .js .sub[hidden] { display: none; }
.js .sub:not([hidden]) { display: block; }
.sub a { padding: 0.6rem 1.1rem; }
.header-cta { flex: none; }
.header-cta .btn { min-height: 2.75rem; padding: 0.55rem 1.1rem; }

@media (max-width: 960px) {
  :root { --header-h: 4.25rem; }
  .site-header .wrap { gap: 0.6rem; }
  .logo img { height: 3.1rem; }
  .header-cta { display: none; }
  .js .nav-toggle, .header-call {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    min-width: 2.9rem; min-height: 2.9rem; padding: 0 0.75rem;
    border: 2px solid var(--orange); border-radius: 3px;
    background: transparent; color: var(--orange);
    font: 700 0.95rem/1 var(--font); text-decoration: none; cursor: pointer;
  }
  .header-call { background: var(--orange); color: var(--charcoal); }
  .header-call:hover { color: var(--charcoal); background: var(--orange-hover); }
  .header-call svg, .nav-toggle svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
  .site-nav { flex-basis: 100%; }
  .js .site-nav { position: absolute; top: 100%; left: 0; right: 0; flex-basis: auto; background: var(--charcoal-deep); border-bottom: 3px solid var(--orange); box-shadow: 0 20px 30px -20px #000; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .js .site-nav[hidden] { display: none; }
  .site-header .wrap { flex-wrap: wrap; }
  .js .site-header .wrap { flex-wrap: nowrap; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a, .site-nav button { padding: 0.85rem 0.25rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
  .has-sub > button { display: flex; justify-content: space-between; }
  .sub { position: static; margin: 0.35rem 0 0.6rem 0.5rem; padding: 0 0 0 1rem; border: 0; border-left: 3px solid var(--orange); box-shadow: none; background: none; }
  .sub a { padding: 0.65rem 0.25rem; font-size: 1rem; color: var(--muted); border-bottom-color: #3d3535; }
  .sub li:last-child a { border-bottom: 0; }
  .sub a[aria-current="page"] { color: var(--orange); }
}
@media (max-width: 380px) { .header-call .label { display: none; } }

/* Hero (home) */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) var(--section); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.9rem); }
.hero .lead { color: var(--muted); }
.collage { position: relative; padding: 0 0 18% 0; }
.collage img { box-shadow: 0 30px 60px -25px #000; }
.collage .c1 { width: 82%; aspect-ratio: 1; object-fit: cover; }
.collage .c2 { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; object-fit: cover; border: 6px solid var(--charcoal); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .collage { max-width: 34rem; }
}

/* Facts strip */
.facts { background: var(--charcoal-deep); border-block: 1px solid var(--line); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.facts li { padding: 1.6rem var(--gutter); border-left: 1px solid var(--line); max-width: none; }
.facts li:first-child { border-left: 0; }
.facts strong { display: block; color: var(--orange); font-size: 1.35rem; line-height: 1.2; margin-bottom: 0.25rem; }
.facts span { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 640px) { .facts li { border-left: 0; border-top: 1px solid var(--line); } .facts li:first-child { border-top: 0; } }

/* Photo with olive panel */
.feature { position: relative; padding-block: var(--section); }
.feature .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
.feature-photo { grid-column: 1 / span 8; grid-row: 1; }
.feature-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-panel { grid-column: 7 / span 6; grid-row: 1; position: relative; padding: clamp(1.75rem, 1rem + 3vw, 3.25rem); background: var(--olive); color: #fff; box-shadow: 0 30px 60px -30px #000; }
.feature-panel a { color: #fff; }
.feature-panel a:hover { color: #fff; }
.feature-panel :focus-visible { outline-color: #fff; }
.feature-panel p:last-child { margin-bottom: 0; }
.text-link { font-weight: 700; }
@media (max-width: 860px) {
  .feature .wrap { display: block; }
  .feature-panel { margin: -3rem 0 0 var(--gutter); }
}

/* Services */
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section-head p { color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem); }
.card { position: relative; display: flex; flex-direction: column; background: var(--charcoal-raised); max-width: none; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.card .card-img { overflow: hidden; }
.card:hover img { transform: scale(1.04); }
.card-body { padding: 1.25rem 1.3rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 0.35rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a { color: var(--orange); }
.card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 0.9rem; }
.card .more { margin-top: auto; color: var(--orange); font-size: 0.95rem; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* Areas */
.areas { background: var(--olive); color: #fff; }
.areas p { color: #fff; }

/* Contact band */
.cta-band { background: var(--charcoal-deep); border-top: 3px solid var(--orange); }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem 4rem; align-items: center; }
.cta-band h2 { margin-bottom: 0.4em; }
.cta-band p { color: var(--muted); margin-bottom: 0; }
.cta-band .btn-row { margin-top: 0; justify-content: flex-end; }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } .cta-band .btn-row { justify-content: flex-start; } }

/* Page header (inner pages) */
.page-header { position: relative; padding-block: clamp(4rem, 3rem + 6vw, 8.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); background: var(--charcoal-deep) center 60% / cover no-repeat; isolation: isolate; }
.page-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #1f1b1bb3 0%, #1f1b1bd9 100%); }
.page-header img.bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.page-header h1 { margin-bottom: 0.3em; }
.page-header p { color: var(--text); font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); margin: 0; }
.breadcrumb { margin-bottom: 1rem; font-size: 0.95rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--muted); }
.breadcrumb a { color: var(--text); }
.breadcrumb [aria-current] { color: var(--muted); }

/* Two-column content */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.split--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split img { width: 100%; object-fit: cover; box-shadow: 0 30px 60px -30px #000; }
.split .photo-tall { aspect-ratio: 4 / 5; }
.split .photo-wide { aspect-ratio: 4 / 3; }
@media (max-width: 860px) { .split, .split--flip { grid-template-columns: 1fr; } .split--flip > :first-child { order: 2; } }

.ticks { list-style: none; margin: 1.5rem 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.9rem; margin-bottom: 0.55rem; }
.ticks li::before { content: ""; position: absolute; left: 0.15rem; top: 0.5em; width: 0.95rem; height: 0.55rem; border-left: 3px solid var(--orange); border-bottom: 3px solid var(--orange); transform: rotate(-45deg); }

.callout { margin-top: 2rem; padding: 1.5rem 1.6rem; border-left: 4px solid var(--orange); background: var(--charcoal-raised); }
.callout h2, .callout h3 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.callout p { color: var(--muted); }
.callout .btn-row { margin-top: 1.1rem; }

/* Gallery */
.gallery-section { background: var(--charcoal-deep); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: 0.5rem; } }
.gallery li { max-width: none; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: var(--charcoal-raised); cursor: zoom-in; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s, opacity .35s; }
.gallery button:hover img { transform: scale(1.05); opacity: 0.9; }
.gallery button:focus-visible { outline-offset: 2px; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #120f0ff2; color: var(--text); }
.lightbox::backdrop { background: #000000c0; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem var(--gutter); }
.lb-count { color: var(--muted); font-size: 0.95rem; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 clamp(0.5rem, 4vw, 4.5rem); }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px #000; }
.lb-caption { margin: 0 auto; padding: 0.9rem var(--gutter) 1.2rem; max-width: 60rem; text-align: center; color: var(--text); }
.lb-btn { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border: 2px solid var(--orange); border-radius: 3px; background: var(--charcoal-deep); color: var(--orange); cursor: pointer; }
.lb-btn:hover { background: var(--orange); color: var(--charcoal); }
.lb-btn svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: clamp(0.25rem, 1vw, 1rem); }
.lb-next { right: clamp(0.25rem, 1vw, 1rem); }

/* Other services */
.other-services ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Contact page */
.contact-options { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-options li { max-width: none; padding: 1.5rem; background: var(--charcoal-raised); border-top: 3px solid var(--orange); }
.contact-options h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact-options p { margin: 0 0 0.3rem; }
.contact-options .big { font-size: 1.25rem; font-weight: 700; }
.contact-options .note { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) { .contact-options { grid-template-columns: 1fr; } }

/* Form */
.form-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 4vw, 5rem); }
@media (max-width: 860px) { .form-wrap { grid-template-columns: 1fr; } }
.enquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .enquiry { grid-template-columns: 1fr; } }
.field label { font-weight: 700; }
.field .hint { color: var(--muted); font-size: 0.92rem; font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 0.75rem 0.85rem;
  border: 2px solid #8a8079; border-radius: 3px;
  background: var(--charcoal-deep); color: var(--text);
  font: 400 1.05rem/1.5 var(--font);
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.field [aria-invalid="true"] { border-color: #ff8a80; }
.field-error { color: #ffb4ab; font-size: 0.95rem; }
.field-error:empty { display: none; }
.req { color: var(--orange); }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.95rem; margin: 0; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { grid-column: 1 / -1; padding: 1rem 1.2rem; border-left: 4px solid #ff8a80; background: #3b2a2a; }
.form-status[hidden] { display: none; }
.form-status p { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Prose pages */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }

/* Footer */
.site-footer { background: var(--charcoal-deep); border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.site-footer h2 { font-size: 1.1rem; color: var(--orange); margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--orange); }
.site-footer address { font-style: normal; color: var(--muted); }
.footer-logo img { height: 4.5rem; width: auto; margin-bottom: 1rem; }
.footer-about { color: var(--muted); }
.social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social a { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 3px; color: var(--text); }
.social a:hover { border-color: var(--orange); color: var(--orange); }
.social svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.footer-legal { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.footer-legal p { margin: 0; max-width: 52rem; }
/* The PetroMedia credit and its "Website feedback" button: side by side, and stacked neatly when they wrap */
.footer-legal p { flex: 1 1 24rem; }
.footer-legal > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-legal > div > .pm-fb { margin-left: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Mobile call bar */
.call-bar { display: none; }
@media (max-width: 960px) {
  .call-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 3fr 2fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .call-bar a { display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 3.4rem; padding: 0 0.5rem; white-space: nowrap; font-size: 0.98rem; background: var(--charcoal-deep); color: var(--text); font-weight: 700; text-decoration: none; }
  .call-bar a:first-child { background: var(--orange); color: var(--charcoal); }
  .call-bar svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
  body { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
}

/* 404 / thank you */
.notice { min-height: 55vh; display: grid; align-content: center; }

.h3 { font-size: 1.3rem; }
.hero h1 { font-size: clamp(3.2rem, 2rem + 5vw, 6rem); }
.h1-sub { display: block; margin-top: 0.9rem; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.7rem); line-height: 1.3; color: var(--orange); letter-spacing: 0; }

/* Very narrow phones: keep both call-bar buttons on screen */
@media (max-width: 360px) { .call-bar a { font-size: 0.9rem; gap: 0.3rem; } .call-bar a:last-child svg { display: none; } }

/* Respect reduced-motion settings: no zooming photos or animated transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover img, .gallery button:hover img { transform: none; }
}
