/* ==========================================================================
   Allied Wholesale Electrical Supply — shared design system
   Loaded by landing.html, about.html, and locations.html. This is the
   single source of truth for tokens, type, buttons, header/nav, footer,
   the brands ticker, location cards, and the CTA band, so those three
   pages can't drift apart. Each page also loads one small page-specific
   stylesheet (landing.css / about.css / locations.css) for its own
   unique sections.

   Does NOT touch the legacy styles.css used by index.html / employment.html.

   Palette sampled directly from logo.png's pixels: the oval fill is
   #17469E — the one true "Allied Blue" everything below is built from.
   No orange anywhere.
   ========================================================================== */

:root {
  --allied-blue: #17469e;
  --allied-blue-bright: #2a63c4;
  --allied-navy: #0b2547;
  --allied-navy-soft: #123361;
  --allied-white: #ffffff;
  --allied-tint: #edf3fc;
  --allied-steel: #5b6b7d;
  --allied-ink: #142132;
  --allied-border: rgba(11, 37, 71, 0.12);
  --allied-shadow: 0 16px 40px rgba(11, 37, 71, 0.14);
  --allied-shadow-soft: 0 8px 22px rgba(11, 37, 71, 0.08);
  --header-height: 84px;
}

/* ---------------------------------------------------------------------- */
/* Base / reset                                                          */
/* ---------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--allied-ink);
  background: var(--allied-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: "Archivo", "Inter", system-ui, sans-serif;
  font-weight: 800;
  color: var(--allied-navy);
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  line-height: 1.7;
  color: var(--allied-steel);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--allied-blue);
}

/* Consistent, visible keyboard focus everywhere (WCAG AA). */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--allied-blue-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--allied-navy);
  color: var(--allied-white);
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Generic section rhythm — alternating white/tint backgrounds, consistent
   vertical padding, used by every page's non-hero sections. */
.section {
  padding: 70px 0;
}
.section-tint {
  background: var(--allied-tint);
}
.section-white {
  background: var(--allied-white);
}

.eyebrow {
  display: inline-block;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--allied-blue);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 36px;
}
.section-heading .eyebrow {
  margin-bottom: 10px;
}
.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}
.section-heading p {
  font-size: 1.02rem;
}
.section-heading--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--allied-blue);
  color: var(--allied-white);
  box-shadow: 0 10px 24px rgba(23, 70, 158, 0.35);
}
.btn-primary:hover {
  background: var(--allied-blue-bright);
}
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: var(--allied-white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
}
.btn-secondary {
  background: var(--allied-white);
  color: var(--allied-navy);
  border-color: var(--allied-border);
  box-shadow: var(--allied-shadow-soft);
}
.btn-secondary:hover {
  background: var(--allied-tint);
}

/* ---------------------------------------------------------------------- */
/* Header / nav                                                          */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--allied-white);
  border-bottom: 1px solid var(--allied-border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-height);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  height: 52px;
  width: auto;
}
.brand-name {
  position: absolute;
  left: -9999px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.primary-nav a,
.nav-dropdown > button {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--allied-navy);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.primary-nav a:hover,
.nav-dropdown > button:hover {
  background: var(--allied-tint);
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--allied-white);
  border: 1px solid var(--allied-border);
  border-radius: 10px;
  box-shadow: var(--allied-shadow);
  padding: 6px;
  display: none;
}
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  color: var(--allied-ink);
}
.nav-dropdown-menu a:hover {
  background: var(--allied-tint);
}
.nav-dropdown-menu--right {
  left: auto;
  right: 0;
}
.nav-dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--allied-ink);
  background: none;
  border: none;
  cursor: pointer;
}
.nav-dropdown-menu button:hover {
  background: var(--allied-tint);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--allied-navy);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--allied-border);
  background: var(--allied-white);
}
.mobile-menu.is-open {
  display: flex;
}
.mobile-menu a {
  padding: 11px 6px;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  color: var(--allied-navy);
  text-decoration: none;
  border-radius: 6px;
}
.mobile-menu a:hover {
  background: var(--allied-tint);
}

/* ---------------------------------------------------------------------- */
/* Inner-page hero — same navy gradient + diagonal-cut signature as the   */
/* landing hero, without the photo layer. Used by about.html/locations.html. */
/* ---------------------------------------------------------------------- */

.page-hero {
  position: relative;
  background: linear-gradient(120deg, var(--allied-navy) 0%, var(--allied-blue) 100%);
  padding: 104px 0 64px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}
.page-hero .wrap {
  position: relative;
  z-index: 1;
}
.page-hero .eyebrow {
  color: #bcd2f5;
}
.page-hero h1 {
  color: var(--allied-white);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.06;
  margin: 12px 0 16px;
  max-width: 760px;
}
.page-hero p {
  color: #e3ebfa;
  font-size: 1.05rem;
  max-width: 620px;
}

/* ---------------------------------------------------------------------- */
/* Brands ticker (component only — page-specific wrapper/heading lives in */
/* each page's own stylesheet)                                            */
/* ---------------------------------------------------------------------- */

.logo-ticker-wrap {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  background: var(--allied-tint);
  border-radius: 18px;
  border: 1px solid var(--allied-border);
}
.logo-ticker {
  display: flex;
  gap: 44px;
  width: max-content;
  align-items: center;
  animation: ticker-scroll 30s linear infinite;
}
.logo-ticker img {
  height: 64px;
  width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  /* Every file in MFGLogos/ is a flattened, opaque image with a solid
     white square baked into the pixels (confirmed: all 9 are 24-bit RGB,
     no alpha channel — not just the two .jpg files). There's no real
     transparency to fall back to, so instead of a white chip sitting on
     the tint, blend each logo against the ticker's own background:
     multiply(white, X) == X for any flat color, so the white square
     renders as this section's exact background color and disappears,
     while non-white ink only shifts by a couple of percent against a
     background this close to white. If MFGLogos/ ever gets real
     transparent-background PNGs, this line becomes unnecessary (but
     harmless) and can be removed then. */
  mix-blend-mode: multiply;
}
@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .logo-ticker {
    animation: none;
  }
  .logo-ticker-wrap {
    overflow-x: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* Location cards — used by landing.html's locations section and by the  */
/* full locations.html page. .location-map is only used on the latter.   */
/* ---------------------------------------------------------------------- */

.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.location-card {
  border: 1px solid var(--allied-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--allied-white);
  box-shadow: var(--allied-shadow-soft);
  display: flex;
  flex-direction: column;
}
.location-photo {
  height: 140px;
  overflow: hidden;
  position: relative;
}
.location-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.location-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 37, 71, 0.85);
  color: var(--allied-white);
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.location-body {
  padding: 18px 20px 22px;
}
.location-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.location-body address {
  font-style: normal;
  color: var(--allied-steel);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}
.location-phone {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.location-phone:hover {
  text-decoration: underline;
}
.location-map {
  border-top: 1px solid var(--allied-border);
  margin-top: auto;
}
.location-map iframe {
  width: 100%;
  height: 200px;
  border: 0;
  display: block;
}
.locations-footer-link {
  text-align: center;
  margin-top: 32px;
}

/* ---------------------------------------------------------------------- */
/* CTA band                                                               */
/* ---------------------------------------------------------------------- */

.cta-band {
  position: relative;
  background: linear-gradient(120deg, var(--allied-navy) 0%, var(--allied-blue) 100%);
  padding: 64px 0;
  overflow: hidden;
  clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
}
.cta-band .wrap {
  text-align: center;
}
.cta-band h2 {
  color: var(--allied-white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}
.cta-band p {
  color: #d7e3f7;
  max-width: 560px;
  margin: 0 auto 26px;
}
.cta-band-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------- */
/* Narrative panel + feature grid — a centered text block (about.html's  */
/* "Our story", employment.html's "Why work at Allied?") and a card grid  */
/* of short points (about.html's "What we do", employment.html reuses    */
/* the card look for its two lists). Promoted here once a second real    */
/* page needed both, rather than duplicating a third copy per page.      */
/* ---------------------------------------------------------------------- */

.story-panel {
  max-width: 760px;
  margin: 0 auto;
}
.story-panel p + p {
  margin-top: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--allied-white);
  border: 1px solid var(--allied-border);
  border-radius: 14px;
  box-shadow: var(--allied-shadow-soft);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--allied-blue), var(--allied-blue-bright));
}
.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
}
@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                 */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--allied-navy-soft);
  color: #cddcf2;
  padding: 48px 0 28px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand img {
  height: 44px;
  margin-bottom: 12px;
}
.footer-brand p {
  color: #a9bfdc;
  font-size: 0.88rem;
  max-width: 320px;
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-family: "Archivo", sans-serif;
  color: var(--allied-white);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: #b7cbec;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 4px 0;
}
.footer-col a:hover {
  color: var(--allied-white);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
}
.ad-badge img {
  height: 60px;
}
.footer-copy {
  font-size: 0.82rem;
  color: #91a9cc;
}

/* ---------------------------------------------------------------------- */
/* Shared responsive                                                      */
/* ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .primary-nav {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .locations-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 40px;
  }
}
