/* Graham Marriner Roofing */
:root {
  --slate: #1C252B;
  --slate-2: #2B363D;
  --slate-line: #3A464D;
  --ink: #1C252B;
  --ink-2: #36424A;
  --muted: #4A565E;
  --muted-on-dark: #C9D0D4;
  --muted-on-dark-2: #AEB8BE;
  --paper: #F5F3EF;
  --paper-2: #EAE6DF;
  --line: #DCD8D0;
  --amber: #E2A13B;
  --amber-ink: #8A5A12;
  --white: #FFFFFF;
  --radius: 6px;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.dark { background: var(--slate); color: var(--paper); }
.sand { background: var(--paper-2); }

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-ink);
}
.dark .eyebrow { color: var(--amber); }
.h2 { font-weight: 800; font-size: clamp(32px, 4.2vw, 44px); line-height: 1.1; }
.lede { color: var(--muted); }
.dark .lede { color: var(--muted-on-dark); }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  padding: 14px 26px; border-radius: 4px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--amber); color: var(--slate); }
.btn-primary:hover { background: #EDB257; color: var(--slate); }
.btn-ghost { color: var(--paper); border-color: #5B6870; background: transparent; }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn-outline { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* Top bar + header */
.topbar { background: var(--slate); color: #E9ECEE; font-size: 15px; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.topbar a { color: #E9ECEE; font-weight: 600; }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.brand-sub { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-weight: 600; font-size: 17px; }
.nav a { text-decoration: none; padding: 10px 0; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); }
.header-cta { padding: 12px 20px; font-size: 16px; min-height: 44px; }
.menu-toggle {
  display: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  font: inherit; font-weight: 600; font-size: 16px;
  background: transparent; border: 1.5px solid var(--ink); border-radius: 4px; color: var(--ink); cursor: pointer;
}

@media (max-width: 900px) {
  .site-header .wrap { gap: 12px 16px; }
  .brand { gap: 10px; }
  .brand svg { width: 48px; height: 30px; }
  .brand-name { font-size: 19px; }
  .brand-sub { font-size: 12px; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--amber-ink); }
}

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-weight: 800; font-size: clamp(40px, 5.6vw, 60px); line-height: 1.04; letter-spacing: -0.02em; }
.hero .lede { font-size: 20px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 16px; color: var(--muted-on-dark); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.hero-img { flex: 1 1 420px; min-width: 0; height: 460px; width: 100%; border-radius: var(--radius); object-fit: cover; object-position: center 40%; }

/* Section heads */
.section-head { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; align-items: flex-end; }
.section-head .stack { gap: 12px; max-width: 640px; }
.section-head p { max-width: 460px; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { height: 220px; width: 100%; object-fit: cover; }
.card-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.card h3 { font-weight: 700; font-size: 24px; }
.card p { color: var(--muted); }
.card a { margin-top: auto; padding-top: 8px; font-weight: 600; }

.also { background: var(--paper-2); border-radius: var(--radius); padding: 32px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; }
.also h3 { flex: 0 1 220px; font-weight: 700; font-size: 22px; }
.also ul { margin: 0; padding: 0; list-style: none; flex: 1 1 560px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 24px; font-weight: 600; }

/* Flat roofs band */
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > .stack { flex: 1 1 460px; min-width: 0; }
.tiles { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--slate-line); border: 1px solid var(--slate-line); border-radius: var(--radius); overflow: hidden; }
.tiles > div { background: var(--slate); padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.tiles strong { font-family: var(--display); font-weight: 800; font-size: 32px; color: var(--amber); }
.tiles span { color: var(--muted-on-dark); }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Lead spotlight */
.lead-copy { flex: 1 1 380px; min-width: 0; }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-weight: 600; }
.lead-photos { flex: 1.4 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 220px 220px; gap: 16px; }
.lead-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.lead-photos img:first-child { grid-row: span 2; }
@media (max-width: 560px) {
  .lead-list { grid-template-columns: 1fr; }
  .lead-photos { grid-template-rows: 160px 160px; }
}

/* Recent work */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.work-grid figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.work-grid img { height: 300px; width: 100%; object-fit: cover; border-radius: var(--radius); }
.work-grid figcaption { font-size: 15px; color: var(--muted); }

/* About */
.about-photo { flex: 1 1 400px; min-width: 0; height: 440px; border-radius: var(--radius); overflow: hidden; position: relative; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.coming-soon { position: absolute; inset: 0; background: rgba(28, 37, 43, 0.72); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.coming-soon .eyebrow { color: var(--amber); }
.coming-soon strong { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--paper); }
.about-copy { flex: 1 1 480px; min-width: 0; }
.about-copy p { color: var(--ink-2); }
.stats { display: flex; flex-wrap: wrap; gap: 32px 48px; margin-top: 12px; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.2; }
.stats span { color: var(--muted); }

/* Contact */
.contact .split { align-items: flex-start; }
.contact-copy { flex: 1 1 420px; min-width: 0; }
.person { border: 1px solid var(--slate-line); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; }
.person b { font-family: var(--display); font-weight: 700; font-size: 19px; display: block; }
.person small { font-size: 15px; color: var(--muted-on-dark-2); }
.person a { color: var(--amber); font-weight: 600; text-decoration: none; padding: 10px 0; font-size: 20px; }
.person a:hover { text-decoration: underline; color: var(--amber); }

.quote-form { flex: 1 1 460px; min-width: 0; background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.quote-form h3 { font-weight: 700; font-size: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 18px; }
.field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.quote-form > .field { flex: none; }
.field label { font-weight: 600; font-size: 16px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid #8F897D; border-radius: 4px; background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 15px; color: var(--muted); }
.form-status { font-weight: 600; font-size: 16px; padding: 12px 14px; border-radius: 4px; }
.form-status[hidden] { display: none; }
.form-status.ok { background: #E3F0E6; color: #1E5631; }
.form-status.err { background: #F8E3DF; color: #8A2A17; }
.quote-form button[disabled] { opacity: 0.7; cursor: wait; }

/* Footer */
.site-footer { background: #141B1F; color: var(--muted-on-dark-2); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; }
.site-footer a { color: var(--muted-on-dark-2); }
.site-footer a:hover { color: var(--paper); }

/* Gallery page */
.page-intro .wrap { padding-top: 72px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; }
.page-intro h1 { font-weight: 800; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; max-width: 760px; }
.page-intro .lede { font-size: 20px; max-width: 640px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters button {
  font: inherit; font-weight: 600; font-size: 16px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1.5px solid #A9A397; background: var(--white); color: var(--ink); cursor: pointer;
}
.filters button span { color: #6B6559; margin-left: 4px; }
.filters button[aria-pressed="true"] { background: var(--slate); color: var(--paper); border-color: var(--slate); }
.filters button[aria-pressed="true"] span { color: var(--amber); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-grid figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery-grid button { padding: 0; border: 0; background: #D9DDE0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; display: block; width: 100%; }
.gallery-grid img { width: 100%; height: 260px; object-fit: cover; transition: transform .3s ease; }
.gallery-grid button:hover img { transform: scale(1.03); }
.gallery-grid figcaption { display: flex; flex-direction: column; gap: 2px; }
.gallery-grid figcaption b { font-size: 16px; }
.gallery-grid figcaption span { font-size: 14px; color: #5B6870; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 23, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 64px 16px 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 200px); object-fit: contain; border-radius: 4px; }
.lb-bar { display: flex; align-items: center; gap: 16px; color: var(--paper); flex-wrap: wrap; justify-content: center; }
.lb-caption { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 220px; }
.lb-caption span { font-size: 14px; color: var(--muted-on-dark-2); }
.icon-btn { width: 48px; height: 48px; border-radius: 999px; border: 1.5px solid #5B6870; background: transparent; color: var(--paper); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: var(--paper); }
.lb-close { position: absolute; top: 12px; right: 12px; border: 0; background: rgba(255, 255, 255, 0.12); }

.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.cta-band h2 { font-weight: 800; font-size: 34px; line-height: 1.15; }

/* Simple text pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; gap: 36px; }
  .hero-img { height: 280px; flex-basis: 100%; }
  .card-body, .also, .quote-form { padding: 22px; }
  .about-photo { height: 300px; flex-basis: 100%; }
  .work-grid img { height: 240px; }
  .gallery-grid img { height: 240px; }
  .topbar .wrap { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-grid img { transition: none; }
}
