/* Electrogo Electrical Services – ink black + sky blue from the logo, warm Cotswold stone neutrals */

:root {
  --ink: #101317;
  --ink-2: #2b3038;
  --muted: #5d6470;
  --sky: #44c2f0;
  --sky-deep: #0b86b8;
  --sky-pale: #e8f7fd;
  --stone: #f6f1e8;
  --stone-2: #ece3d3;
  --line: #e5e1d8;
  --white: #ffffff;
  --gold: #f2b631;
  --radius: 18px;
  --shadow: 0 20px 50px -24px rgba(16, 19, 23, 0.28);
  --head: "Jost", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 16px; }
em { font-style: normal; color: var(--sky-deep); }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* Small "roof" chevron echoing the logo */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky-deep);
  margin-bottom: 14px;
}
.roof {
  width: 22px; height: 12px; position: relative; flex: none;
  background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--ink) calc(50% - 1.5px), var(--ink) calc(50% + 1.5px), transparent calc(50% + 1.5px)) left / 50% 100% no-repeat,
              linear-gradient(to top left, transparent calc(50% - 1.5px), var(--sky) calc(50% - 1.5px), var(--sky) calc(50% + 1.5px), transparent calc(50% + 1.5px)) right / 50% 100% no-repeat;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem var(--body); text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--white); box-shadow: 0 12px 28px -12px rgba(16,19,23,.6); }
.btn-dark:hover { background: #000; }
.btn-ghost { background: rgba(255,255,255,.85); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--white); }
.btn-blue { background: var(--sky); color: var(--ink); width: 100%; }
.btn-blue:hover { background: #2fb6e8; box-shadow: 0 12px 28px -12px rgba(11,134,184,.7); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(16,19,23,.4); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 78px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: .97rem; color: var(--ink-2); position: relative; }
.nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--sky); transition: right .25s; }
.nav a:not(.nav-cta):hover::after, .nav a.active::after { right: 0; }
.nav-cta { background: var(--sky); color: var(--ink) !important; padding: 10px 20px; border-radius: 999px; font-weight: 600 !important; }
.nav-cta:hover { background: #2fb6e8; }
.header-call { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 1.15rem; line-height: 1.1; }
.header-call svg { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--ink); color: var(--sky); }
.header-call small { display: block; font: 500 .72rem var(--body); color: var(--muted); letter-spacing: .04em; }
.menu-btn { display: none; }

/* Hero */
.hero { position: relative; min-height: min(760px, 88vh); display: flex; align-items: center; overflow: hidden; background: var(--stone); }
.hero-photo { position: absolute; inset: 0; background: url("../images/hero.jpg") 70% 50% / cover no-repeat; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 30%, rgba(255,255,255,.35) 55%, rgba(255,255,255,0) 72%),
              linear-gradient(0deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 22%);
}
.hero-inner { position: relative; padding: 80px 0 90px; }
.hero-copy { max-width: 600px; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-rating { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 999px; background: var(--white); box-shadow: var(--shadow); font-size: .95rem; }
.hero-rating strong { color: var(--ink); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 18px; height: 18px; }

/* Trust */
.trust { background: var(--ink); color: #c9ced6; }
.trust-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.trust-item { display: flex; align-items: center; gap: 14px; padding: 26px 18px; border-left: 1px solid rgba(255,255,255,.08); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item svg { width: 30px; height: 30px; color: var(--sky); }
.trust-item strong { display: block; color: var(--white); font-family: var(--head); font-weight: 500; font-size: 1.05rem; line-height: 1.25; }
.trust-item span { font-size: .85rem; }

/* Section heads */
section { position: relative; }
.work, .services, .about, .reviews { padding: 110px 0; }
.section-head { margin-bottom: 54px; }
.section-head.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.section-head.split > p { color: var(--muted); margin: 0; }
.section-head.center { text-align: center; max-width: 640px; margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center p:last-child { color: var(--muted); }

/* Work gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; grid-auto-flow: dense; gap: 16px; }
.g { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--stone-2); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.g:hover img { transform: scale(1.05); }
.g figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.94); color: var(--ink); font-size: .9rem; font-weight: 500; line-height: 1.35;
}
.g figcaption span { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sky-deep); font-weight: 600; }

/* Services */
.services { background: var(--stone); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: transform .3s, box-shadow .3s; }
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.svc-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.svc-img img { width: 100%; height: 100%; object-fit: cover; }
.svc-img .tag { position: absolute; top: 12px; left: 12px; background: var(--ink); color: var(--sky); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.svc-body { padding: 22px 24px 26px; }
.svc-body h3 { margin-bottom: 8px; }
.svc-body p { color: var(--muted); font-size: .97rem; margin: 0; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; justify-content: center; }
.also-label { font-family: var(--head); font-weight: 500; color: var(--ink); margin-right: 6px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--stone-2); font-size: .92rem; color: var(--ink-2); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 80px; align-items: center; }
.about-photos { position: relative; padding: 0 60px 60px 0; }
.ap-main { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; border-radius: var(--radius); }
.ap-small { position: absolute; right: 0; bottom: 0; width: 48%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 8px solid var(--white); box-shadow: var(--shadow); }
.ap-badge { position: absolute; top: 24px; left: -20px; background: var(--white); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.ap-badge strong { font-family: var(--head); font-size: 2rem; font-weight: 500; color: var(--ink); line-height: 1; }
.ap-badge small { color: var(--muted); font-size: .82rem; }
.about-copy > p { color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.ticks svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--sky-pale); color: var(--sky-deep); margin-top: 1px; }
.pay { font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin: 0; }

/* Reviews */
.reviews { background: linear-gradient(180deg, var(--white), var(--sky-pale)); }
.score { display: flex; align-items: center; gap: 22px; justify-self: end; background: var(--white); padding: 18px 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.score strong { display: block; font-family: var(--head); font-size: 2.6rem; font-weight: 500; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.score p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.rev-grid { columns: 3; column-gap: 22px; }
.rev { break-inside: avoid; margin: 0 0 22px; background: var(--white); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.rev::before { content: "★★★★★"; display: block; color: var(--gold); letter-spacing: 3px; margin-bottom: 12px; font-size: .95rem; }
.rev p { color: var(--ink); font-size: 1.02rem; }
.rev footer { display: flex; flex-direction: column; font-size: .9rem; }
.rev footer strong { color: var(--ink); font-family: var(--head); font-weight: 500; font-size: 1rem; }
.rev footer span { color: var(--muted); }
.rev-feature { background: var(--ink); border-color: var(--ink); }
.rev-feature p { color: var(--white); font-size: 1.12rem; }
.rev-feature footer strong { color: var(--sky); }
.rev-feature footer span { color: #9aa2ad; }
.rev-fun { background: var(--sky); border-color: var(--sky); }
.rev-fun::before { color: var(--ink); }
.rev-fun footer span { color: var(--ink-2); }

/* Contact */
.contact { padding: 110px 0; overflow: hidden; background: var(--stone); }
.contact-bg { position: absolute; inset: 0; background: url("../images/cta-bg.jpg") 80% 50% / cover no-repeat; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(246,241,232,.98) 0%, rgba(246,241,232,.93) 45%, rgba(246,241,232,.55) 100%); }
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 460px; gap: 70px; align-items: center; }
.contact-copy > p { color: var(--ink-2); max-width: 520px; }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.contact-list svg { width: 46px; height: 46px; padding: 12px; border-radius: 14px; background: var(--ink); color: var(--sky); }
.contact-list small { display: block; color: var(--muted); font-size: .82rem; }
.contact-list div { color: var(--ink); font-weight: 500; line-height: 1.4; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--sky-deep); }
.contact-list li:first-child a { font-family: var(--head); font-size: 1.5rem; }

.quote-card { background: var(--white); border-radius: 24px; padding: 34px; box-shadow: 0 30px 70px -30px rgba(16,19,23,.45); }
.quote-card h3 { font-size: 1.55rem; margin-bottom: 4px; }
.form-note { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.f { display: grid; gap: 6px; margin-bottom: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.f input, .f select, .f textarea {
  width: 100%; font: 400 1rem var(--body); color: var(--ink); padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fcfbf8; transition: border-color .2s, box-shadow .2s;
}
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(68,194,240,.2); background: var(--white); }
.f.invalid input, .f.invalid textarea { border-color: #d9534f; }
.form-status { margin: 12px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-status.error { color: #c0392b; }
.form-status.ok { color: #1e8449; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 50px 0 40px; text-align: center; }
.footer-logo { height: 60px; width: auto; margin: 0 auto 18px; }
.site-footer p { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.footer-small { font-size: .82rem !important; }
.footer-small a { text-decoration: none; }

.mobile-bar { display: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Tablet */
@media (max-width: 1080px) {
  .header-call span { display: none; }
  .nav { gap: 20px; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-item { border-left: 0; padding: 18px 10px 18px 0; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 50px; }
  .rev-grid { columns: 2; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .quote-card { max-width: 560px; }
}

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 68px; gap: 12px; }
  .brand img { height: 42px; }
  .header-call { margin-left: auto; }
  .header-call svg { width: 40px; height: 40px; }
  .menu-btn { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--stone); cursor: pointer; }
  .menu-btn span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .25s; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; margin: 0;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .nav-cta { margin-top: 12px; text-align: center; border-bottom: 0 !important; }

  .hero { min-height: 0; flex-direction: column; align-items: stretch; background: var(--white); }
  .hero-photo { position: relative; height: 250px; background-position: 72% 50%; order: -1; }
  .hero-photo::after { background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 45%); }
  .hero-inner { padding: 4px 0 50px; }
  h1 { font-size: 2.25rem; }
  .lede { font-size: 1.05rem; }
  .hero .eyebrow { font-size: .7rem; letter-spacing: .1em; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-rating { font-size: .88rem; padding: 10px 14px; }
  .stars svg { width: 16px; height: 16px; }

  .trust-grid { grid-template-columns: 1fr 1fr; padding: 10px 0; }
  .trust-item { padding: 14px 6px 14px 0; gap: 10px; }
  .trust-item:last-child { grid-column: span 2; }
  .trust-item svg { width: 26px; height: 26px; }
  .trust-item strong { font-size: .95rem; }
  .trust-item span { font-size: .8rem; }

  .work, .services, .about, .reviews, .contact { padding: 70px 0; }
  .section-head { margin-bottom: 34px; }
  .section-head.split { grid-template-columns: 1fr; gap: 14px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; gap: 10px; }
  .g-wide { grid-column: span 2; }
  .g figcaption { left: 8px; right: 8px; bottom: 8px; padding: 7px 10px; font-size: .78rem; }
  .g figcaption span { font-size: .62rem; }
  .svc-grid { grid-template-columns: 1fr; gap: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photos { padding: 0 30px 40px 0; }
  .ap-badge { left: 12px; top: 12px; padding: 12px 14px; }
  .ap-badge strong { font-size: 1.6rem; }
  .rev-grid { columns: 1; }
  .score { justify-self: start; }
  .contact-bg { background-position: 70% 50%; }
  .contact-bg::after { background: rgba(246,241,232,.94); }
  .quote-card { padding: 24px 20px; }
  .f-row { grid-template-columns: 1fr; gap: 0; }
  .contact-list li:first-child a { font-size: 1.3rem; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(16,19,23,.35);
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: 999px; text-decoration: none; font-weight: 600; }
  .mb-call { background: var(--ink); color: var(--white); }
  .mb-call svg { color: var(--sky); }
  .mb-quote { background: var(--sky); color: var(--ink); }
}
