/* ==========================================================================
   Pinnacle Electrical Supplies — Website26
   Brand tokens taken from the existing site:
     header  rgba(11, 84, 30, .6)   links  #eb540a   footer  #181818
     headings Maven Pro, body Open Sans
   ========================================================================== */

:root {
  /* Brand greens */
  --green-950: #062f11;
  --green-900: #0b541e;
  --green-800: #0f6a26;
  --green-700: #17802f;
  --green-600: #22903a;
  --green-100: #e7f3ea;
  --green-glass: rgba(11, 84, 30, 0.72);

  /* Accent (original link colour) */
  --orange: #eb540a;
  --orange-dark: #c74306;

  /* Neutrals */
  --ink: #282828;
  --ink-soft: #555b57;
  --line: #e4e7e5;
  --surface: #ffffff;
  --surface-alt: #f6f7f6;
  --footer-bg: #181818;
  --footer-ink: #a3a3a3;

  /* Type */
  --font-head: "Maven Pro", Arial, Helvetica, sans-serif;
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;

  /* Layout */
  --container: 1200px;
  --header-h: 96px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .05);
  --shadow-md: 0 6px 24px rgba(6, 47, 17, .12);
  --shadow-lg: 0 18px 48px rgba(6, 47, 17, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--orange-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 .75em; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--orange); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ==========================================================================
   Header (translucent green bar, overlays the hero like the original)
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: 10px;
  transition: padding .35s var(--ease);
}
.site-header__bar {
  background: var(--green-glass);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  transition: height .35s var(--ease);
}
.site-header.is-scrolled { padding-top: 0; }
.site-header.is-scrolled .site-header__bar { background: rgba(11, 84, 30, .94); box-shadow: var(--shadow-md); }
.site-header.is-scrolled .site-header__inner { height: 72px; }
.site-header.is-scrolled .brand img { height: 60px; }

.brand { display: inline-flex; align-items: center; }
.brand img { height: 84px; width: auto; transition: height .35s var(--ease); }

.nav__list { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nav__link {
  position: relative; display: block;
  padding: 10px 20px;
  font-family: var(--font-body); font-size: 17px; color: rgba(255, 255, 255, .85);
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 6px; height: 2px;
  background: #fff; border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: #fff; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .1); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 50%; width: 22px; height: 2px; margin-left: -11px;
  background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  height: clamp(420px, 62vh, 620px);
  background: var(--green-950);
  isolation: isolate;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: kenburns 18s var(--ease) forwards;
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 47, 17, .25) 0%, rgba(6, 47, 17, 0) 35%),
    linear-gradient(0deg, rgba(6, 47, 17, .85) 0%, rgba(6, 47, 17, .35) 32%, rgba(6, 47, 17, 0) 60%);
}
.hero__content {
  position: absolute; inset: auto 0 0 0; padding-bottom: 44px; color: #fff;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero__eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(235, 84, 10, .25); }
.hero__title {
  color: #fff; font-size: clamp(32px, 5vw, 56px); font-weight: 700;
  margin: 16px 0 6px; letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}
.hero__sub { font-size: clamp(15px, 1.6vw, 18px); max-width: 620px; color: rgba(255, 255, 255, .9); margin: 0; }

@keyframes kenburns { to { transform: scale(1); } }

/* Inner page banner */
.page-banner {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 320px; display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 40px) 0 40px;
  background: var(--green-950); color: #fff;
}
.page-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
.page-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(6, 47, 17, .92) 0%, rgba(11, 84, 30, .7) 55%, rgba(11, 84, 30, .35) 100%);
}
.page-banner h1 { color: #fff; font-size: clamp(32px, 4.5vw, 48px); font-weight: 700; margin: 0 0 6px; }
.page-banner p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 17px; max-width: 640px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 64px 0; }
.section--alt { background: var(--surface-alt); }
.section-title {
  font-size: clamp(24px, 3vw, 32px); font-weight: 500; margin-bottom: 28px;
  display: flex; align-items: center; gap: 14px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Intro + sidebar layout (col-9 / col-3 in original) */
.intro-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 48px; align-items: start; }

.intro-copy { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; }
.intro-copy .lead { font-family: var(--font-head); font-size: clamp(22px, 2.4vw, 28px); color: var(--green-900); font-weight: 700; margin-bottom: 10px; }
.intro-copy .address { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); margin-bottom: 4px; }
.intro-copy .address svg { flex: none; color: var(--green-700); }

.catalogues { margin-top: 32px; text-align: center; }
.catalogues h2 { font-family: var(--font-body); font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.catalogues__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; }
.catalogue-btn {
  display: inline-block; border-radius: 12px;
  transition: transform .25s var(--ease), filter .25s var(--ease);
}
.catalogue-btn img { height: 50px; width: auto; }
.catalogue-btn:hover { transform: translateY(-3px); filter: drop-shadow(0 8px 14px rgba(11, 84, 30, .3)); }
.catalogue-btn small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }

/* Sales team sidebar card */
.sales-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px 20px 20px; text-align: center; box-shadow: var(--shadow-sm);
  position: sticky; top: 100px;
}
.sales-card h2 { font-size: 21px; margin-bottom: 8px; white-space: nowrap; }
.sales-card__phone { display: block; font-weight: 700; color: var(--ink); font-size: 15px; }
.sales-card__phone:hover { color: var(--green-800); }
.sales-card__addr { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.sales-card__dave { display: block; border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.sales-card__dave:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.sales-card__more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; }
.sales-card__more::after { content: " \2192"; transition: margin .2s; }
.sales-card__more:hover::after { margin-left: 4px; }

/* ==========================================================================
   Feature cards (homepage-lower)
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; aspect-ratio: 330 / 180; overflow: hidden; border-bottom: 3px solid var(--green-700); background: var(--green-100); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 22px 24px 26px; flex: 1; }
.card__title { font-family: var(--font-body); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.card__text { font-family: Arial, Helvetica, sans-serif; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.card__foot { height: 32px; background: var(--surface-alt); border-top: 1px solid var(--line); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.branch {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.branch:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.branch__map { position: relative; aspect-ratio: 16 / 7; background: var(--green-100); border-bottom: 3px solid var(--green-700); }
.branch__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.85); }
.branch__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.branch__tag {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-900);
}
.branch__tag--hq { background: var(--green-900); color: #fff; }
.branch__tag--plumb { background: #fdeee6; color: var(--orange-dark); }
.branch__name { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin: 0; }
.branch__addr { font-style: normal; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.branch__meta { font-size: 13px; color: var(--ink-soft); margin: -6px 0 0; }
.branch__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--green-800); color: #fff; }
.btn--primary:hover { background: var(--green-900); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--green-700); color: var(--green-900); }
.btn--accent { background: var(--orange); color: #fff; }
.btn--accent:hover { background: var(--orange-dark); color: #fff; }

.contact-intro { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr); gap: 48px; align-items: center; margin-bottom: 48px; }
.contact-intro p.lead { font-size: 18px; color: var(--ink); }
.contact-intro .dave { max-width: 260px; margin-left: auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Legal / Terms page
   ========================================================================== */
.legal { max-width: 860px; }
.legal h2 { font-size: 22px; color: var(--green-900); margin: 36px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal ol, .legal ul { padding-left: 1.4em; margin: 0 0 1em; }
.legal li { margin-bottom: .4em; }
.legal .subtitle { font-size: 17px; color: var(--ink-soft); margin-bottom: 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; background: var(--footer-bg); color: var(--footer-ink); font-size: 14px; margin-top: 24px; }
.site-footer::before {
  content: ""; position: absolute; left: 15%; right: 15%; top: -24px; height: 24px;
  background: radial-gradient(ellipse at bottom, rgba(0, 0, 0, .18), transparent 70%);
  pointer-events: none;
}
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 52px 24px 36px; }
.site-footer h3 { font-family: var(--font-head); color: #fff; font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.site-footer strong { color: #d4d4d4; }
.site-footer address { font-style: normal; line-height: 1.75; }
.site-footer a { color: #e6e6e6; }
.site-footer a:hover { color: var(--orange); }
.legal-links { list-style: none; padding: 0; margin: 14px 0 0; }
.legal-links li + li { margin-top: 4px; }
.legal-links a { display: inline-flex; align-items: center; gap: 8px; }
.legal-links a svg { width: 13px; height: 13px; opacity: .55; transition: opacity .2s, transform .2s var(--ease); }
.legal-links a:hover svg { opacity: 1; transform: translate(2px, -2px); }
.gdpr-badge { width: 141px; border-radius: 4px; }
.trustpilot-link { display: inline-block; transition: transform .3s var(--ease), filter .3s var(--ease); }
.trustpilot-link:hover { transform: scale(1.03); filter: brightness(1.15); }
.trustpilot-link img { max-width: 280px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .07); padding: 18px 24px; font-size: 13px; }

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green-800); color: #fff; box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--orange); }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .intro-grid, .contact-intro { grid-template-columns: 1fr; gap: 32px; }
  .sales-card { position: static; max-width: 360px; margin: 0 auto; }
  .contact-intro .dave { margin: 0 auto; }
  .branches { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --header-h: 76px; }
  .brand img { height: 62px; }
  .site-header.is-scrolled .site-header__inner { height: 64px; }
  .site-header.is-scrolled .brand img { height: 50px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(11, 84, 30, .97);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav.is-open { max-height: 240px; box-shadow: var(--shadow-md); }
  .nav__list { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav__link { border-radius: 8px; padding: 14px 12px; }
  .nav__link::after { left: 12px; right: auto; width: 24px; bottom: 8px; }
  .section { padding: 48px 0; }
  .hero__content { padding-bottom: 32px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .container { padding: 0 18px; }
}
