/*
Theme Name: Asset Roofing
Author: Mako Digital
Description: Custom theme for Asset Roofing Limited — Wigan-based, family-run roofers.
Version: 1.0
*/

/* ============================================================
   ASSET ROOFING — SITEWIDE STYLES (mobile-first)
   Page-specific styles live inline in each page template.
   Breakpoints: 600 / 900 / 1200
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #000;
  background: #fff;
  padding-bottom: 62px; /* clearance for mobile call bar */
  -webkit-font-smoothing: antialiased;
}

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

a { color: #e31e24; text-decoration: none; }
a:hover { color: #b81519; }

h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p  { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link */
.ar-skip {
  position: absolute; left: -9999px; top: auto;
  background: #e31e24; color: #fff;
  padding: 10px 16px; z-index: 9999;
}
.ar-skip:focus { left: 8px; top: 8px; }

/* ============================================================
   HEADER
   ============================================================ */
.ar-header {
  position: sticky; top: 0; z-index: 100;
  background: #000;
  height: 64px;
  display: flex; align-items: center;
  transition: box-shadow .2s ease;
}
.ar-header.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.4); }

.ar-header-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}

.ar-logo img { height: 44px; width: auto; }

.ar-burger {
  background: transparent; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; padding: 0;
}
.ar-burger span {
  display: block; width: 26px; height: 3px; background: #fff;
  transition: transform .25s ease, opacity .25s ease;
}
.ar-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.ar-burger.open span:nth-child(2) { opacity: 0; }
.ar-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.ar-nav {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: #000;
  padding: 30px 20px;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.ar-nav.open { transform: translateX(0); }
.ar-nav ul { list-style: none; padding: 0; margin: 0 0 20px; }
.ar-nav li { border-bottom: 1px solid #1f1f1f; }
.ar-nav a {
  display: block; padding: 18px 0;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ar-nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #e31e24; color: #fff;
  padding: 14px 22px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 16px;
}
.ar-nav-cta:hover { background: #b81519; color: #fff; }

body.nav-open { overflow: hidden; }

/* ============================================================
   BUTTONS (sitewide)
   ============================================================ */
.ar-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: #e31e24;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 0; cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.ar-btn:hover {
  background: #b81519; color: #fff; transform: translateY(-1px);
}
.ar-btn--ghost {
  background: transparent; color: #fff; border: 2px solid #fff;
}
.ar-btn--ghost:hover { background: #fff; color: #000; }
.ar-btn--dark { background: #000; color: #fff; }
.ar-btn--dark:hover { background: #2a2a2a; color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.ar-footer {
  background: #000;
  color: #c9c9c9;
  padding: 50px 0 0;
}
.ar-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.ar-footer h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e31e24;
  display: inline-block;
}
.ar-footer-list { list-style: none; padding: 0; margin: 0; }
.ar-footer-list li { padding: 6px 0; }
.ar-footer-list a { color: #c9c9c9; }
.ar-footer-list a:hover { color: #e31e24; }
.ar-footer-list i { color: #e31e24; margin-right: 8px; width: 18px; }

.ar-footer-logo { max-width: 180px; margin-bottom: 14px; }
.ar-footer-tag { font-size: .95rem; color: #aaa; }

.ar-footer-bottom {
  margin-top: 30px;
  border-top: 1px solid #1f1f1f;
  padding: 20px;
  text-align: center;
  font-size: .85rem;
}
.ar-footer-bottom p { margin: 4px 0; }
.ar-built a { color: #e31e24; }

/* ============================================================
   MOBILE STICKY CALL BAR
   ============================================================ */
.ar-mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 62px;
  display: flex;
  z-index: 99;
  border-top: 2px solid #e31e24;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ar-mobile-bar a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
}
.ar-mb-call { background: #e31e24; }
.ar-mb-wa   { background: #25D366; }
.ar-mb-call:hover { background: #b81519; color: #fff; }
.ar-mb-wa:hover   { background: #1ebe57; color: #fff; }

/* ============================================================
   600px+  (large phone / small tablet)
   ============================================================ */
@media (min-width: 600px) {
  .container, .ar-header-inner, .ar-footer-inner { padding-left: 28px; padding-right: 28px; }
}

/* ============================================================
   900px+  (tablet / desktop nav kicks in)
   ============================================================ */
@media (min-width: 900px) {
  body { padding-bottom: 0; }

  .ar-header { height: 78px; }
  .ar-logo img { height: 54px; }
  .ar-burger { display: none; }

  .ar-nav {
    position: static;
    transform: none;
    background: transparent;
    padding: 0;
    display: flex; align-items: center; gap: 24px;
    overflow: visible;
  }
  .ar-nav ul {
    display: flex; gap: 6px; margin: 0;
  }
  .ar-nav li { border: 0; }
  .ar-nav a {
    padding: 10px 14px;
    font-size: 1rem;
    color: #fff;
    border-bottom: 2px solid transparent;
  }
  .ar-nav a:hover { border-bottom-color: #e31e24; color: #fff; }
  .ar-nav-cta { margin-top: 0; padding: 12px 20px; font-size: 1rem; }

  .ar-mobile-bar { display: none; }

  .ar-footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 0 36px;
  }
  .ar-footer-bottom {
    display: flex; justify-content: space-between;
  }
  .ar-footer-bottom p { margin: 0; }

  .container, .ar-header-inner { padding-left: 36px; padding-right: 36px; }
}

/* ============================================================
   1200px+ (desktop)
   ============================================================ */
@media (min-width: 1200px) {
  .container, .ar-header-inner, .ar-footer-inner { padding-left: 40px; padding-right: 40px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
}