/* Ric The Roofer – static rebuild of rictheroofer.com */

:root {
  --blue: #04b3f9;
  --purple: #a06bad;
  --pink: #ee4c9b;
  --text: #333333;
  --nav: #54595f;
  --white: #ffffff;
  --body-font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --head-font: "Inter Tight", "Inter", system-ui, -apple-system, Arial, sans-serif;
  --line: #e6e9ee;
  --soft: #f6f8fa;
  --container: 1140px;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(255, 255, 255, 0.65);
  --panel-shadow: 0 6px 28px rgba(16, 24, 40, 0.1), 0 2px 8px rgba(16, 24, 40, 0.06);
  --panel-radius: 12px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--head-font); margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 52px; font-weight: 800; line-height: 1.05; }
h2 { font-size: 32px; font-weight: 700; color: var(--purple); }
h3 { font-size: 28px; font-weight: 400; }
h4 { font-size: 22px; font-weight: 800; line-height: 1.2; }

p { margin: 0 0 14.4px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 10px;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 100; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 95px;
}
.logo img { width: 165px; height: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav a {
  display: block;
  padding: 13px 15px;
  color: var(--nav);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--blue); text-decoration: none; }

.menu-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.05);
  border: 0;
  border-radius: 3px;
  padding: 10px;
  cursor: pointer;
  color: var(--nav);
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .2s ease, background .2s ease;
}
.menu-toggle span::before,
.menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero image + blue band ---------- */
.hero-image picture { display: block; }
.hero-image img { width: 100%; aspect-ratio: 1920 / 600; object-fit: cover; }

.band {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 30px 0 40px;
}
.band h1, .band h2, .band h3 { color: var(--white); }
.band .band-sub { margin-bottom: 0; }
.band .band-title { font-size: 52px; font-weight: 800; line-height: 1.05; }
.band .band-sub { font-family: var(--body-font); font-size: 24px; font-weight: 400; line-height: 1.3; letter-spacing: 0; margin-top: 16px; opacity: .95; }
.band a { color: var(--white); white-space: nowrap; }

/* ---------- Content sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 60px 0; }

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}
.intro-grid h2 { margin-bottom: 18px; }
.intro-photo picture { display: block; }
.intro-photo img { border-radius: 8px; }

.button {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 15px 28px;
  border-radius: 6px;
  margin-top: 10px;
  transition: background .2s ease;
}
.button:hover { background: #029ad8; color: var(--white); text-decoration: none; }

.sectors { padding: 70px 0 80px; text-align: center; background: var(--soft); }
.sectors h2 { margin-bottom: 40px; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sector {
  padding: 32px 28px 22px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sector h4 { color: var(--blue); margin-bottom: 12px; }

/* Services */
.service-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-images picture { display: block; }
.service-images img { width: 100%; aspect-ratio: 700 / 450; object-fit: cover; border-radius: 8px; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 36px; }
.service {
  padding: 28px 28px 14px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.service h2 { font-size: 26px; margin-bottom: 12px; }
.services-cta { text-align: center; }

/* Gallery */
.gallery-intro { margin-bottom: 30px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery a { display: block; overflow: hidden; background: #f2f2f2; border-radius: 6px; }
.gallery picture { display: block; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery a:hover img { transform: scale(1.05); }

/* Contact */
.contact-details {
  text-align: center;
  padding: 40px 32px 32px;
  margin: 0 auto;
  max-width: 460px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.contact-details h2 { margin-bottom: 14px; }
.contact-directions { margin: 20px 0 0; margin-bottom: 0; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pink);
  text-align: center;
  padding: 30px 0;
}
.site-footer .footer-title { color: var(--white); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.site-footer .address { color: var(--white); margin-bottom: 30px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure { margin: 0; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; object-fit: contain; user-select: none; }
.lightbox-count { color: #ccc; font-size: 14px; margin-top: 12px; }
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  color: #fff;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 48px;
  padding: 0;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
body.lightbox-lock { overflow: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .band .band-title, h1 { font-size: 44px; }
  .sector { padding: 0 10px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .site-header .container { min-height: 80px; }
  .logo img { width: 130px; }

  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 14px 20px; border-top: 1px solid #eee; font-size: 16px; }

  .hero-image img { aspect-ratio: 16 / 9; }

  .band { padding: 25px 0 30px; }
  .band .band-title, h1 { font-size: 34px; line-height: 1.1; }
  .band .band-sub { font-size: 21px; line-height: 1.25; margin-top: 12px; }

  h2 { font-size: 26px; }

  .section { padding: 40px 0; }
  .section-tight { padding: 30px 0; }

  .intro-grid { grid-template-columns: 1fr; gap: 30px; }
  .intro-grid .intro-photo { max-width: 360px; margin: 0 auto; }

  .sector-grid { grid-template-columns: 1fr; gap: 16px; }
  .sectors { padding: 40px 0 50px; }
  .service-grid { grid-template-columns: 1fr; gap: 16px; }
  .service { padding: 22px 20px 8px; }
  .sector { padding: 26px 20px 16px; }
  .sectors h2 { margin-bottom: 30px; }

  .service-images { grid-template-columns: 1fr; gap: 12px; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  .lightbox-prev, .lightbox-next { top: auto; bottom: 20px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.section-tight + .section-tight { padding-top: 0; }
