/* =============================================================
   myRoofPlumber - Stylesheet
   EDIT: colours and fonts can be changed in :root below
   ============================================================= */

:root {
  /* Colour palette */
  --color-charcoal: #1b1e23;
  --color-charcoal-light: #262a31;
  --color-slate: #323841;
  --color-offwhite: #f7f6f3;
  --color-white: #ffffff;
  --color-steel: #8b96a3;
  --color-steel-light: #c6cdd4;
  --color-accent: #3d6ea5;
  --color-accent-dark: #2c517c;
  --color-accent-light: #6c97c7;
  --color-copper: #c87f43;

  /* Typography */
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container-width: 1180px;
  --header-height: 76px;
  --radius: 6px;
  --transition: 0.25s ease;
}

/* =============================================================
   RESET & BASE
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-offwhite);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-accent-light);
  outline-offset: 2px;
}

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.75em 1.5em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background-color: var(--color-accent-dark);
}

.btn-outline {
  background-color: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-large {
  font-size: 1.05rem;
  padding: 0.9em 1.75em;
}

.btn-full {
  width: 100%;
}

/* =============================================================
   HEADER / NAVIGATION
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-charcoal);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-accent {
  color: var(--color-copper);
}

.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  gap: 1.75rem;
}

.main-nav a {
  color: var(--color-steel-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.main-nav a:hover {
  color: var(--color-white);
}

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

.btn-call {
  white-space: nowrap;
}

.btn-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2em 0.45em;
  border-radius: 0.3em;
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-phone .btn-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.btn-phone .btn-label-sub {
  font-size: 0.65em;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.85;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-white);
  margin: 0 auto;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
@media (max-width: 899px) {
  .main-nav {
    display: block;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-charcoal-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .main-nav.is-open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav a {
    display: block;
    padding: 0.9rem 0;
  }

  /* Show icon + 24/7 badge on mobile to save header space */
  .btn-call-text {
    display: none;
  }

  .btn-call {
    padding: 0.5em 0.65em;
    gap: 0.35em;
  }

  .btn-call .icon {
    width: 1.4em;
    height: 1.4em;
  }

  .btn-call .btn-badge {
    font-size: 0.65em;
  }
}

@media (min-width: 900px) {
  .main-nav {
    display: block;
  }

  .hamburger {
    display: none;
  }
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 30, 35, 0.92) 0%, rgba(27, 30, 35, 0.78) 50%, rgba(44, 81, 124, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-steel-light);
  max-width: 56ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.75rem 0;
}

.hero .btn-outline {
  border-color: var(--color-white);
  color: var(--color-white);
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95rem;
  color: var(--color-steel-light);
  margin-top: 1.5rem;
}

/* =============================================================
   TRUST BAR
   ============================================================= */
.trust-bar {
  background-color: var(--color-slate);
  color: var(--color-offwhite);
  padding: 1.25rem 0;
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.9rem;
  color: var(--color-steel-light);
}

.trust-item .icon {
  color: var(--color-accent-light);
}

/* =============================================================
   GENERAL SECTION SPACING
   ============================================================= */
section {
  padding: 4.5rem 0;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-lead {
  color: var(--color-slate);
  font-size: 1.05rem;
}

/* =============================================================
   SERVICES
   ============================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: var(--color-white);
  border: 1px solid #e7e4de;
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(27, 30, 35, 0.08);
  border-color: var(--color-accent-light);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 0.5em;
}

.service-card p {
  color: var(--color-slate);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* =============================================================
   PROBLEM / SOLUTION
   ============================================================= */
.problem-solution {
  background-color: var(--color-charcoal);
  color: var(--color-offwhite);
}

.ps-grid {
  display: grid;
  gap: 2.5rem;
}

.ps-text h2,
.ps-text .eyebrow {
  color: var(--color-white);
}

.ps-text p {
  color: var(--color-steel-light);
}

.ps-list {
  display: grid;
  gap: 0.75rem;
}

.ps-list li {
  background-color: var(--color-charcoal-light);
  border-left: 3px solid var(--color-accent);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

@media (min-width: 800px) {
  .ps-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* =============================================================
   WHY CHOOSE US
   ============================================================= */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

.why-item {
  border-top: 3px solid var(--color-accent);
  padding-top: 1rem;
}

.why-item p {
  color: var(--color-slate);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* =============================================================
   PROCESS
   ============================================================= */
.process {
  background-color: var(--color-slate);
  color: var(--color-offwhite);
}

.process .section-header h2,
.process .section-header .eyebrow {
  color: var(--color-white);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.process-step {
  text-align: left;
}

.process-number {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-accent-light);
  color: var(--color-accent-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.process-step h3 {
  color: var(--color-white);
}

.process-step p {
  color: var(--color-steel-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* =============================================================
   GALLERY
   ============================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-slate);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(0deg, rgba(27, 30, 35, 0.85), transparent);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

/* =============================================================
   ABOUT
   ============================================================= */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-media img {
  border-radius: var(--radius);
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* =============================================================
   SERVICE AREAS
   ============================================================= */
.areas {
  background-color: var(--color-charcoal);
  color: var(--color-offwhite);
}

.areas .section-header h2,
.areas .section-header .eyebrow {
  color: var(--color-white);
}

.areas .section-lead {
  color: var(--color-steel-light);
}

.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.areas-list li {
  background-color: var(--color-charcoal-light);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  color: var(--color-steel-light);
}

/* =============================================================
   CONTACT / QUOTE FORM
   ============================================================= */
.contact-grid {
  display: grid;
  gap: 3rem;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.contact-meta p {
  font-size: 0.9rem;
  color: var(--color-slate);
  margin-bottom: 0.35rem;
}

.contact-form {
  background-color: var(--color-white);
  border: 1px solid #e7e4de;
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row-half {
  flex-direction: row;
  gap: 1rem;
}

.form-row-half > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

@media (max-width: 540px) {
  .form-row-half {
    flex-direction: column;
  }
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7em 0.85em;
  border: 1px solid #d4d0c8;
  border-radius: var(--radius);
  background-color: var(--color-offwhite);
  color: var(--color-charcoal);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  background-color: var(--color-white);
}

textarea {
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-slate);
  margin-bottom: 0;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-steel-light);
  padding-top: 3.5rem;
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.footer-col p {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.footer-nav h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  color: var(--color-steel-light);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--color-steel);
}

.footer-bottom .disclaimer {
  max-width: 50ch;
}

.footer-bottom p {
  margin: 0;
}

@media (min-width: 700px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* =============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger service cards slightly */
.service-grid .reveal.is-visible:nth-child(2n) {
  transition-delay: 0.05s;
}

.service-grid .reveal.is-visible:nth-child(3n) {
  transition-delay: 0.1s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
