/* ==========================================================================
   Rimmer Roofing — Southport Roofers
   Shared stylesheet
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --bg-dark: #111117;        /* dark sections — gallery, CTA, footer */
  --bg-dark-2: #0c0c11;
  --bg-light: #f6f8fb;       /* light section background */
  --white: #ffffff;
  --text: #1c2433;           /* primary body text */
  --text-muted: #5b6678;     /* secondary text */
  --text-faint: #8a93a3;     /* footer / faint text */
  --green: #19c37d;          /* primary CTA — WhatsApp / quote buttons */
  --green-dark: #14a268;
  --blue: #7a5500;           /* warm amber — accent text on light backgrounds */
  --blue-light: #F3CD45;     /* bright gold — accent on dark backgrounds */
  --blue-soft: rgba(122,85,0,0.1);  /* pale amber for icon chip backgrounds */
  --border: #e7eaf0;
  --card: #ffffff;
  --gold: #f5b50a;           /* star ratings */
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 24px rgba(16, 24, 40, 0.08);
  --radius: 14px;
  --radius-lg: 18px;
  --maxw: 1160px;
  --header-h: 72px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 {
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}
/* accent used in inner-page heroes (dark backgrounds) — bright gold */
.accent { color: var(--blue-light); }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--light { background: var(--bg-light); }
.section--dark { background: var(--bg-dark); color: #e9edf5; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
/* bright gold eyebrow in dark sections */
.section--dark .eyebrow { color: var(--blue-light); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.02rem; }
.section--dark .section-head p { color: #aeb6c4; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); box-shadow: 0 8px 20px rgba(25,195,125,.3); }
.btn--outline { background: #111117; color: var(--blue-light); border-color: var(--blue-light); }
.btn--outline:hover { background: var(--blue-light); color: #181818; border-color: var(--blue-light); }
.btn--blue { background: #111117; color: var(--blue-light); border-color: var(--blue-light); border-width: 1.5px; }
.btn--blue:hover { background: var(--blue-light); color: #181818; }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #111117;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand__logo { height: 60px; width: auto; display: block; }
@media (max-width: 760px) { .brand__logo { height: 51px; } }
.brand__mark { display: none; }
.brand__mark svg { width: 20px; height: 20px; }
.brand__name { font-family: "Poppins", sans-serif; font-weight: 400; font-size: 1.1rem; letter-spacing: 0.04em; color: var(--blue-light); }
.brand__name span { color: var(--blue-light); }

.main-nav ul { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  color: #c8cfdc;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color .15s ease;
}
.main-nav a:hover, .main-nav a.active { color: #fff; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; width: 22px; background: #fff; border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: #fff;
  overflow: hidden;
}
/* hero background image: /images/southport-roofers-1.webp */
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)),
    url("../images/southport-roofers-1.webp");
  background-size: cover;
  background-position: center;
}
.hero__inner { position: relative; padding: 96px 0 104px; max-width: 680px; }
/* Fixed-height page heroes so there's no jump navigating between pages */
.hero--page .hero__inner {
  min-height: 320px;
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); margin-bottom: 18px; color: #fff; }
.hero h1 .accent { color: var(--blue-light); }  /* gold accent in hero headings */
.hero p { font-size: 1.08rem; color: #c3cad7; margin-bottom: 30px; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Home hero — centred, uppercase, all-white title */
.hero--home .hero__inner { max-width: 840px; margin: 0 auto; text-align: center; padding: 160px 0 180px; }
.hero--home h1 { text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(2.3rem, 5.6vw, 3.6rem); }
.hero--home .hero__title-sub {
  display: block;
  font-size: 0.46em;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fff;
  margin-top: 12px;
}
.hero--home p { margin-left: auto; margin-right: auto; }
.hero--home .hero__cta { justify-content: center; }
.hero__badge {
  display: inline-block;
  background: #111117;
  color: var(--blue-light);
  border: 1px solid var(--blue-light);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ==========================================================================
   Stats bar — below hero on home page
   ========================================================================== */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.stats-bar__inner {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 36px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 10px;
  flex: none;
}
.stat-item__icon svg { width: 22px; height: 22px; }
.stat-item__text strong { display: block; font-size: 1.25rem; font-family: "Poppins", sans-serif; font-weight: 700; color: var(--text); }
.stat-item__text span { font-size: 0.82rem; color: var(--text-muted); }

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 11px;
  margin-bottom: 16px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; }
.card__link { color: var(--blue); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.card__link:hover { gap: 9px; }

/* feature card */
.feature { text-align: left; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery__item {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: linear-gradient(135deg, #3a332b, #564d42);
  position: relative;
  overflow: hidden;
  margin: 0;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery__item:hover img { transform: scale(1.05); }

/* ==========================================================================
   Reviews
   ========================================================================== */
.review { display: flex; flex-direction: column; gap: 14px; }
.stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }
.review p { color: var(--text-muted); font-size: 0.95rem; font-style: italic; }
.review__author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.review__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 0.9rem;
}
.review__name { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.review__loc { font-size: 0.8rem; color: var(--text-faint); }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 24px; font-size: 1rem; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: "Inter", sans-serif;
}
.faq-q .faq-icon { flex: none; transition: transform .25s ease; color: var(--blue); }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a__inner { overflow: hidden; padding: 0 24px 22px; color: var(--text-muted); font-size: 0.96rem; }

/* ==========================================================================
   Services page — service blocks with images
   ========================================================================== */
.service-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.service-block.featured { border-color: rgba(243,205,69,.5); box-shadow: 0 10px 30px rgba(122,85,0,.12); }

/* Two-column layout: image | content */
.service-block--has-img {
  display: grid;
  grid-template-columns: 280px 1fr;
}
.service-block__img {
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-2));
  position: relative;
}
.service-block__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.service-block--has-img:hover .service-block__img img { transform: scale(1.04); }
.service-block__body { padding: 30px; }

.service-block__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.service-block__title { display: flex; align-items: center; gap: 14px; }
.service-block__title h3 { font-size: 1.3rem; }
.tag { font-size: 0.74rem; font-weight: 600; padding: 5px 11px; border-radius: 100px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.tag--green { background: rgba(25,195,125,.13); color: var(--green-dark); }
.service-block p.lead { color: var(--text-muted); margin-bottom: 18px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin-bottom: 22px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; color: var(--text); }
.check svg { color: var(--green); flex: none; width: 18px; height: 18px; }

/* ==========================================================================
   About / timeline
   ========================================================================== */
.timeline { max-width: 820px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-50%); }
.tl-item { position: relative; width: 50%; padding: 0 40px 44px; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }
.tl-item .tl-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; box-shadow: var(--shadow-sm); }
.tl-item .tl-year { font-family: "Poppins", sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--blue); }
.tl-item h4 { font-size: 1.05rem; margin: 2px 0 8px; }
.tl-item p { color: var(--text-muted); font-size: 0.92rem; }
.tl-item::after {
  content: ""; position: absolute; top: 8px; width: 14px; height: 14px;
  background: var(--blue); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--border);
}
.tl-item:nth-child(odd)::after { right: -7px; }
.tl-item:nth-child(even)::after { left: -7px; }

/* mission/vision */
.mv-card { text-align: center; }
.mv-card .card__icon { margin: 0 auto 16px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(122,85,0,.12);
}
textarea { resize: vertical; min-height: 120px; }
.form-note { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-top: 14px; }
.form-note a { color: var(--blue); font-weight: 600; }

.contact-info-card { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info-card .card__icon { margin: 0; flex: none; }
.contact-info-card h4 { font-size: 1rem; margin-bottom: 3px; }
.contact-info-card p, .contact-info-card a { color: var(--text-muted); font-size: 0.93rem; }
.contact-info-card a.link { color: var(--blue); font-weight: 600; }

.contact-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.channel-card { text-align: left; }
.channel-card.whatsapp .card__icon { background: rgba(25,195,125,.13); color: var(--green-dark); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: var(--bg-dark); color: #fff; text-align: center; padding: 72px 0; }
.cta-band h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 14px; color: #fff; }
.cta-band h2 .accent { color: #fff; }  /* CTA heading is all-white */
.cta-band p { color: #aeb6c4; margin-bottom: 28px; max-width: 540px; margin-left: auto; margin-right: auto; }
.cta-band .hero__cta { justify-content: center; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.legal-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 26px; box-shadow: var(--shadow-sm); }
.legal-block h3 { font-size: 1.1rem; margin-bottom: 10px; }
.legal-block p { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 8px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bg-dark); color: #aeb6c4; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer .brand { margin-bottom: 16px; }
.footer-about p { font-size: 0.92rem; color: #8a93a3; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.92rem; color: #aeb6c4; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; margin-bottom: 6px; color: #aeb6c4; }
.footer-contact svg { color: var(--green); flex: none; margin-top: 3px; width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.84rem; color: #6b7585; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs { font-size: 0.84rem; color: #aeb6c4; margin-bottom: 14px; }
.breadcrumbs a { color: var(--blue-light); }
.breadcrumbs span { color: #c3cad7; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 940px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .service-block--has-img { grid-template-columns: 1fr; }
  .service-block__img { height: 220px; }
  .stat-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid var(--border); padding: 18px 24px; }
  .stat-item:nth-child(even) { border-left: 1px solid var(--border); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 760px) {
  /* serve smaller hero image on mobile — drop southport-roofers-1-mobile.webp (800×800 centre crop) into /images/ */
  .hero__bg {
    background-image:
      linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)),
      url("../images/southport-roofers-1-mobile.webp");
    background-position: center center;
  }
  .hero--home .hero__inner { padding: 80px 0 90px; }
  .section { padding: 60px 0; }
  .hero--page .hero__inner { min-height: 240px; padding: 40px 0; }
  /* 16px prevents iOS Safari from auto-zooming when a field is focused */
  input, select, textarea { font-size: 16px; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255,255,255,.08);
    transform: translateY(-120%);
    transition: transform .28s ease;
    padding: 18px 24px 26px;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-channels { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  /* timeline collapses to single column */
  .timeline::before { left: 9px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 32px 38px; }
  .tl-item::after { left: 2px !important; right: auto !important; }
  .service-block__head { flex-direction: column; }
  .stat-item { flex: 0 0 100%; border-left: none !important; border-right: none !important; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
}
@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
}
