/* Shared base — all Ace Electric layout variants */
:root {
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --container: min(1120px, 100% - 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }

.sr-only {
  position: absolute; 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; top: -100px; left: 1rem; z-index: 1000;
  padding: 0.5rem 1rem; background: #0f172a; color: #fff; border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { width: var(--container); margin-inline: auto; }

.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: inherit;
}
.brand-logo {
  width: 48px; height: 48px; object-fit: contain;
  border-radius: 10px; flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; }
.brand-llc {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; opacity: 0.65;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.875rem 0;
}
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.9375rem;
}
.nav-toggle {
  display: none; width: 44px; height: 44px;
  border: 1px solid currentColor; border-radius: 10px;
  background: transparent; cursor: pointer; opacity: 0.8;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 20px; height: 2px;
  background: currentColor; border-radius: 1px; position: relative; margin: auto;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 999px; font-weight: 600;
  font-size: 0.9375rem; text-decoration: none; border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.section-header { max-width: 34rem; margin-bottom: 2.25rem; }
.section-header h2 { margin: 0 0 0.6rem; font-size: clamp(1.65rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -0.02em; }
.section-header p { margin: 0; font-size: 1.05rem; }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem;
}
.card {
  padding: 1.5rem; border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.1rem; font-weight: 600; }
.card p { margin: 0; font-size: 0.92rem; }

.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.photo-grid img {
  width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius);
}

.map-wrap {
  border-radius: var(--radius-lg); overflow: hidden; min-height: 320px;
  box-shadow: var(--shadow);
}
.map-wrap iframe { display: block; width: 100%; height: 360px; border: 0; }

.contact-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem;
}
.contact-card {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.35rem; border-radius: var(--radius-lg);
  text-decoration: none; color: inherit;
}
.contact-label {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.contact-value { font-weight: 600; line-height: 1.4; }

.photo-credit {
  margin-top: 1rem; font-size: 0.75rem; opacity: 0.65;
}
.photo-credit a { color: inherit; }

.layout-switcher {
  position: fixed; bottom: 1rem; right: 1rem; left: 1rem; z-index: 200;
  display: flex; flex-direction: column; gap: 0.4rem;
  max-width: min(420px, calc(100% - 2rem)); margin-left: auto;
  padding: 0.55rem 0.6rem; border-radius: 14px;
  background: rgba(15, 23, 42, 0.94); color: #e2e8f0;
  font-size: 0.72rem; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.layout-switcher-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #94a3b8; font-size: 0.65rem;
}
.layout-switcher > a {
  align-self: flex-start;
  padding: 0.3rem 0.55rem; border-radius: 6px;
  text-decoration: none; color: #fde68a; background: rgba(255,255,255,0.06);
}
.layout-switcher-links {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  max-height: 88px; overflow-y: auto;
  scrollbar-width: thin;
}
.layout-switcher-links a {
  padding: 0.32rem 0.55rem; border-radius: 6px;
  text-decoration: none; color: #e2e8f0; background: rgba(255,255,255,0.08);
  white-space: nowrap;
}
.layout-switcher a:hover, .layout-switcher-links a.is-active {
  background: #f59e0b; color: #0f172a;
}

body:has(.layout-switcher) {
  padding-bottom: 6.5rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .site-nav {
    position: fixed; inset: 58px 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 0; padding: 1rem;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 0.85rem 0.5rem; border-bottom: 1px solid rgba(128,128,128,0.25); }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid img { height: 200px; }
}