/* Ally Electrical Contracting – website styles */

:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --blue: #1e88e5;
  --blue-dark: #1565c0;
  --blue-soft: #e8f3fd;
  --sky: #7cc4fa;
  --accent: #e5533d;
  --ink: #12233b;
  --muted: #5a6b80;
  --line: #e2e8f0;
  --tint: #f4f8fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(11, 37, 69, 0.06), 0 12px 32px rgba(11, 37, 69, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

a {
  color: inherit;
}

.container {
  margin: 0 auto;
  max-width: 1160px;
  padding-left: 24px;
  padding-right: 24px;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.skip-link {
  background: var(--blue);
  color: var(--white);
  left: 16px;
  padding: 8px 14px;
  position: absolute;
  top: -48px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

section[tabindex='-1']:focus,
header[tabindex='-1']:focus {
  outline: none;
}

/* ---------- Buttons ---------- */
.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  padding: 11px 18px;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 16px;
  padding: 14px 22px;
}

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

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
}

.eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--sky);
}

/* ---------- Top bar & header ---------- */
.topbar {
  background: var(--navy);
  color: #b9c8db;
  font-size: 13px;
}

.topbar-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 8px;
  padding-top: 8px;
}

.topbar a {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-row {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 88px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 72px;
  width: auto;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy-2) 100%);
  border-radius: 12px;
  color: var(--white);
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand-mark svg {
  fill: currentColor;
  height: 24px;
  width: 24px;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--navy);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 4px;
}

.site-nav a:not(.btn) {
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  background: var(--tint);
  color: var(--ink);
}

.nav-call {
  margin-left: 8px;
}

.menu-toggle {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0 12px;
  width: 48px;
}

.menu-toggle span:not(.sr-only) {
  background: var(--ink);
  border-radius: 2px;
  display: block;
  height: 2px;
  width: 22px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

/* Soft blue waves, echoing the business card */
.hero-waves {
  height: 100%;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.hero-waves path:first-child {
  fill: rgba(30, 136, 229, 0.35);
}

.hero-waves path:last-child {
  fill: rgba(124, 196, 250, 0.18);
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  padding-bottom: 96px;
  padding-top: 88px;
  position: relative;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--sky);
}

.tagline {
  color: var(--sky);
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 14px;
}

.lead {
  color: #c7d4e5;
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.award-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  display: grid;
  justify-items: center;
  padding: 32px 26px;
  text-align: center;
}

.award-icon {
  align-items: center;
  background: linear-gradient(135deg, #f5c542 0%, #d99a1e 100%);
  border-radius: 50%;
  color: var(--navy);
  display: flex;
  height: 64px;
  justify-content: center;
  margin-bottom: 14px;
  width: 64px;
}

.award-icon svg {
  fill: none;
  height: 32px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 32px;
}

.award-kicker {
  color: #f5c542;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.award-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 6px;
}

.award-year {
  color: #f5c542;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.1;
}

.award-source {
  color: #a9b9cd;
  font-size: 13px;
  margin-top: 8px;
}

/* ---------- Trust strip ---------- */
.trust {
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.trust-grid {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 22px;
}

.trust-item {
  align-items: center;
  display: flex;
  gap: 14px;
}

.trust-item strong {
  display: block;
  font-size: 15px;
}

.trust-item span:not(.trust-icon) {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.trust-icon,
.service-icon {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 12px;
  color: var(--blue);
  display: flex;
  flex: none;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.trust-icon svg,
.service-icon svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}

.section-tint {
  background: var(--tint);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-head {
  margin: 0 auto 48px;
  max-width: 680px;
  text-align: center;
}

.section h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service {
  align-content: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 24px;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.service:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service h3 {
  font-size: 18px;
}

.service p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Why Ally ---------- */
.why-grid {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.why-lead {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 24px;
}

.checklist {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  align-items: center;
  display: flex;
  font-weight: 600;
  gap: 12px;
}

.checklist li::before {
  background: var(--blue-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e88e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 14px no-repeat;
  border-radius: 50%;
  content: '';
  flex: none;
  height: 26px;
  width: 26px;
}

.owner-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  justify-items: center;
  margin: 0;
  padding: 36px 28px;
  text-align: center;
}

.owner-logo {
  display: block;
  height: auto;
  max-width: 100%;
  width: 220px;
}

.owner-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy-2) 100%);
  border-radius: 50%;
  color: var(--white);
  display: flex;
  font-size: 30px;
  font-weight: 800;
  height: 96px;
  justify-content: center;
  width: 96px;
}

.owner-card blockquote {
  color: var(--navy);
  font-size: 20px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.owner-card figcaption {
  display: grid;
}

.owner-card figcaption span {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Credentials ---------- */
.cred-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cred {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  padding: 22px 24px;
}

.cred span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.cred strong {
  color: var(--navy);
  font-size: 22px;
}

/* ---------- Contact ---------- */
.contact-grid {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.contact-lead {
  color: #c7d4e5;
  font-size: 17px;
  margin-bottom: 28px;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.contact-list div {
  display: grid;
  gap: 16px;
  grid-template-columns: 90px 1fr;
}

.contact-list dt {
  color: var(--sky);
  font-weight: 700;
}

.contact-list dd {
  color: #e3eaf3;
  margin: 0;
}

.contact-list a {
  color: var(--white);
  font-weight: 700;
}

.contact-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  color: var(--ink);
  display: grid;
  gap: 12px;
  padding: 30px;
}

.contact-card h3 {
  font-size: 22px;
}

.contact-card > p {
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-option {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 18px;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.contact-option:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.contact-option span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.contact-option strong {
  color: var(--blue-dark);
  overflow-wrap: anywhere;
  text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #071a33;
  color: #9fb1c7;
  font-size: 14px;
}

.footer-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 28px;
  padding-top: 28px;
}

.footer-row strong {
  color: var(--white);
}

.footer-legal {
  font-size: 13px;
  text-align: right;
}

/* ---------- Back to top ---------- */
.to-top {
  align-items: center;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  bottom: 24px;
  box-shadow: 0 10px 24px rgba(11, 37, 69, 0.25);
  color: var(--white);
  display: flex;
  height: 48px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 24px;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.15s ease;
  width: 48px;
  z-index: 55;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.to-top:hover {
  background: var(--blue);
}

.to-top svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 22px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(11, 37, 69, 0.1);
    display: none;
    flex-direction: column;
    left: 0;
    padding: 12px 24px 20px;
    position: absolute;
    right: 0;
    top: 100%;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a:not(.btn) {
    font-size: 17px;
    padding: 12px;
  }

  .nav-call {
    margin: 8px 0 0;
  }

  .hero-grid,
  .why-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 36px;
    padding-bottom: 80px;
    padding-top: 56px;
  }

  .cred-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar-row {
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-logo {
    height: 58px;
  }

  .section {
    padding: 64px 0;
  }

  .lead {
    font-size: 16px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .trust-grid,
  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-list div {
    gap: 2px;
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-card {
    padding: 22px;
  }

  .footer-legal {
    text-align: left;
  }

  .to-top {
    bottom: 16px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .service,
  .to-top {
    transition: none;
  }
}
