/* Upton Electrical — site styles */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --ink: #0e181c;
  --ink-2: #15242a;
  --ink-3: #1f333a;
  --teal: #69b0bd;        /* brand teal, from logo */
  --teal-hover: #82c2cd;
  --teal-text: #2a6b77;   /* teal for text on light backgrounds (AA) */
  --cream: #fcf1e1;       /* brand cream, from logo */
  --paper: #f5f3ef;
  --white: #fff;
  --text: #1a2428;
  --muted: #4f5d63;
  --muted-on-dark: #b5c3c8;
  --line: #e2e0db;
  --line-dark: #2b3f46;
  --focus: #f3b33d;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 9vw, 7rem);
  --radius: 4px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--teal-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; letter-spacing: .005em; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .75rem 1rem; background: var(--focus); color: var(--ink); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.35rem;
  font: 600 1rem/1.1 var(--font-body); letter-spacing: .02em;
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 54px; padding: .85rem 1.6rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal); color: var(--ink); }
.btn-primary:hover { background: var(--teal-hover); }
.btn-ghost { background: rgba(14, 24, 28, .35); color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: var(--white); background: rgba(14, 24, 28, .6); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-dark); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; margin-right: auto; }
.brand-logo { width: auto; height: 50px; }
.brand-name { font: 700 1.4rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.brand-name span { color: var(--teal); }

.nav-list { display: flex; gap: .25rem; }
.nav-list a, .nav-phone {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem .8rem;
  color: var(--white); font-weight: 600; text-decoration: none; border-radius: var(--radius);
}
.nav-list a:hover, .nav-phone:hover { color: var(--teal); }
.nav-phone .icon { color: var(--teal); }
.nav-menu { display: flex; align-items: center; gap: 1rem; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.nav-toggle, .header-call { display: none; }

@media (max-width: 1023px) {
  .brand-name { font-size: 1.2rem; }
  .brand-logo { height: 44px; }
  .header-call {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .85rem;
    background: var(--teal); color: var(--ink); font-weight: 600; text-decoration: none; border-radius: var(--radius);
    order: 1;
  }
  .nav { order: 2; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-right: -8px; padding: 0;
    background: none; border: 0; color: var(--white); cursor: pointer; border-radius: var(--radius);
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--ink); border-top: 1px solid var(--line-dark);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
  }
  .nav-menu:not(.is-open) { display: none; }
  html:not(.js) .nav-toggle { display: none; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { width: 100%; padding: .85rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: .75rem; }
  .nav-phone { justify-content: center; border: 2px solid var(--line-dark); }
  .nav-actions .btn { min-height: 52px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 1.05rem; }
  .header-call span { display: none; }
}

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(82vh, 760px);
  display: flex; align-items: flex-end;
  background: var(--ink); color: var(--white);
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 60% 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 24, 28, .92) 0%, rgba(14, 24, 28, .72) 42%, rgba(14, 24, 28, .15) 80%),
    linear-gradient(0deg, rgba(14, 24, 28, .85) 0%, rgba(14, 24, 28, 0) 45%);
}
.hero-content { padding-block: clamp(5rem, 14vw, 9rem) clamp(3rem, 8vw, 5.5rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
  font: 700 1.05rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
}
.eyebrow .icon { fill: currentColor; stroke: none; }
.hero h1 {
  max-width: 15ch; margin-bottom: 1.25rem;
  font-size: clamp(2.9rem, 8vw, 5.5rem); line-height: .95; text-transform: uppercase; color: var(--white);
}
.hero-lead { max-width: 36rem; margin-bottom: 2rem; font-size: clamp(1.075rem, 1.8vw, 1.25rem); color: #dbe4e7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
@media (max-width: 599px) {
  .hero { min-height: 0; }
  .hero::after { background: linear-gradient(0deg, rgba(14, 24, 28, .96) 25%, rgba(14, 24, 28, .55) 100%); }
  .hero-actions .btn { width: 100%; }
}

/* Sector strip */
.sectors { background: var(--teal); color: var(--ink); }
.sectors-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 0; padding-block: .95rem; }
.sectors-list li {
  display: flex; align-items: center;
  font: 700 1.1rem/1.2 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
}
.sectors-list li + li::before { content: ""; width: 6px; height: 6px; margin-inline: 1.1rem; background: var(--ink); transform: rotate(45deg); }
@media (max-width: 699px) {
  .sectors-list { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; text-align: center; }
  .sectors-list li { justify-content: center; font-size: 1rem; }
  .sectors-list li + li::before { display: none; }
}

/* Sections */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.kicker {
  display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem;
  font: 700 .95rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--teal-text);
}
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--teal); }
.section-lead { font-size: 1.15rem; color: var(--muted); margin: 0; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.service-card { position: relative; padding: 2rem 1.75rem; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .25s; }
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--teal); transition: width .3s ease;
}
.service-card:hover { background: #fbfaf8; }
.service-card:hover::before { width: 100%; }
.service-icon {
  width: 40px; height: 40px; margin-bottom: 1.25rem; color: var(--teal-text);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.service-card h3 { margin-bottom: .4rem; }
.service-card p { margin: 0; color: var(--muted); font-size: 1rem; }

.contracting {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem 1.75rem;
  margin-top: 1.5rem; padding: 2rem 2rem; background: var(--ink); color: var(--white);
}
.contracting .service-icon { margin: 0; color: var(--teal); }
.contracting h3 { margin-bottom: .3rem; font-size: 1.75rem; }
.contracting p { margin: 0; color: var(--muted-on-dark); }
@media (max-width: 767px) {
  .contracting { grid-template-columns: 1fr; padding: 1.75rem; }
  .contracting .btn { width: 100%; }
}

/* About */
.about-grid { display: grid; gap: 2.5rem; align-items: start; }
.about-text p { font-size: 1.125rem; max-width: 38rem; }
.about-text p:last-child { margin-bottom: 0; }

/* Why choose */
.why-grid { display: grid; gap: 2rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.why-item { padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.why-num { display: block; margin-bottom: .75rem; font: 700 1rem/1 var(--font-display); letter-spacing: .1em; color: var(--teal-text); }
.why-item h3 { margin-bottom: .4rem; }
.why-item p { margin: 0; color: var(--muted); }

/* Reviews (static Google CTA) */
.reviews-cta { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 900px) { .reviews-cta { grid-template-columns: 1.4fr 1fr; gap: 4rem; } }
.reviews-cta h2 { margin-bottom: .6rem; }
.reviews-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 900px) { .reviews-actions { justify-content: flex-end; } }
@media (max-width: 599px) { .reviews-actions .btn { width: 100%; } }
.reviews-actions .icon { color: #b07a00; fill: currentColor; stroke: none; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline:hover .icon { color: #f3b33d; }

/* Contact */
.contact { background: var(--ink); color: var(--white); }
.contact h2 { color: var(--white); }
.contact .kicker { color: var(--teal); }
.contact-grid { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 5rem; align-items: center; } }
.contact-lead { font-size: 1.2rem; color: #d2dde1; max-width: 30rem; margin-bottom: 2rem; }
.contact-list { display: grid; gap: 1.25rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list .icon { width: 22px; height: 22px; margin-top: .2rem; color: var(--teal); }
.contact-label { display: block; font: 700 .85rem/1.4 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-dark); }
.contact-list a, .contact-list li span:not(.contact-label) { color: var(--white); font-size: 1.15rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--teal); text-decoration: underline; }

.contact-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
@media (max-width: 599px) { .contact-actions .btn { width: 100%; } }
.contact-card { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--ink-2); border: 1px solid var(--line-dark); border-top: 4px solid var(--teal); }

/* Footer */
.site-footer { background: #091013; color: var(--muted-on-dark); padding-top: 4rem; font-size: 1rem; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); padding-bottom: 3rem; }
.footer-brand img { width: auto; height: 96px; margin-bottom: 1rem; }
.footer-brand p { margin: 0; }
.footer-title { font-size: .95rem; letter-spacing: .16em; color: var(--white); margin-bottom: 1rem; text-transform: uppercase; }
.footer-list { display: grid; gap: .55rem; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem; border-top: 1px solid #1d2b30; font-size: .925rem; }
.footer-bottom p { margin: 0; }

/* Simple content pages (404) */
.page { padding-block: clamp(3rem, 8vw, 6rem); }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(2.5rem, 6vw, 4rem); text-transform: uppercase; }
.page h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.page ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1em; }
.page-404 { min-height: 60vh; display: flex; align-items: center; }
.page-404 .lead { font-size: 1.2rem; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Subtle reveal (only when JS is running and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media print {
  .site-header, .hero-media, .nav, .contact-actions { display: none; }
  .hero, .contact, .site-footer { background: none; color: #000; }
}

@media (max-width: 599px) { .hide-sm { display: none; } }
