/* Live-matching chrome and layout for the StateWide static replica.
   Brand tokens from the WordPress theme: navy #1c3868, sage #759c8b, Barlow. */

:root {
  --sw-navy: #1c3868;
  --sw-sage: #759c8b;
  --sw-sage-2: #91b0a2;
  --sw-ink: #1a1a1a;
  --sw-muted: #555555;
  --sw-mist: #f4f6f5;
  --sw-line: #e4e4e4;
  --header-h: 88px;
}

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

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--sw-font-body, Barlow, sans-serif);
  color: var(--sw-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--sw-navy); }

.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;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ── Header: logo + hamburger only (live chrome) ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  min-height: var(--header-h);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0.75rem 1.5rem;
}

.site-logo img {
  height: 56px;
  width: auto;
}

.hamburger {
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #111;
  border-radius: 1px;
}

/* ── Off-canvas ── */

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
}

.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100%;
  background: #fff;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  padding: 1.25rem 1.5rem 2rem;
  overflow-y: auto;
}

body.nav-open .offcanvas { transform: translateX(0); }
body.nav-open .offcanvas-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.offcanvas-close {
  float: right;
  background: none;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

.offcanvas form {
  margin: 2.5rem 0 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.offcanvas input[type="search"] {
  flex: 1;
  border: 1px solid var(--sw-line);
  padding: 0.5rem 0.75rem;
  font: inherit;
}

.offcanvas button[type="submit"] {
  background: var(--sw-navy);
  color: #fff;
  border: 0;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.offcanvas nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  clear: both;
}

.offcanvas nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.7rem 0;
  color: var(--sw-ink);
  border-bottom: 1px solid var(--sw-line);
}

/* ── Homepage slider then headline (DOM order matches live) ── */

.home-slider {
  position: relative;
  width: 100%;
  background: #111;
  overflow: hidden;
}

.home-slider-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 280px;
  max-height: 520px;
}

.home-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}

video.home-slide {
  background: #111;
}

.home-slide.is-active { opacity: 1; }

.story-slide.is-hidden { display: none !important; }
.story-slide.is-shown { display: block; }

.home-intro {
  text-align: center;
  padding: 2.5rem 1.25rem 1.5rem;
}

.home-intro h1 {
  color: var(--sw-navy);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 auto 1.25rem;
  max-width: 52rem;
  text-transform: none;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.pill {
  display: inline-block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  border: 1px solid var(--sw-navy);
}

.pill-solid { background: var(--sw-navy); color: #fff; }
.pill-outline { background: #fff; color: var(--sw-navy); }
.pill-navy { background: var(--sw-navy); color: #fff; border-color: var(--sw-navy); }

.vendor-line {
  margin: 1.25rem 0 0;
  color: var(--sw-muted);
  font-size: 0.95rem;
}

/* ── Pillar cards ── */

.pillars {
  position: relative;
  padding: 2rem 1rem 3rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.pillar-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem 2.25rem;
  text-align: center;
}

.pillar-card img {
  height: 72px;
  width: auto;
  margin: 0 auto 1rem;
}

.pillar-card h2 {
  color: var(--sw-navy);
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.pillar-card p {
  color: var(--sw-muted);
  margin: 0;
  line-height: 1.5;
}

.pillars .pills { margin-top: 1.75rem; }

@media (max-width: 800px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* ── Sage supplier split band ── */

.sage-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--sw-sage);
  color: #fff;
  min-height: 360px;
  overflow: hidden;
}

.sage-copy {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sage-copy h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 1rem;
}

.sage-copy p {
  margin: 0 0 1.5rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.sage-media {
  position: relative;
  min-height: 320px;
}

.sage-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.sage-cutout {
  position: absolute;
  right: 6%;
  bottom: -8%;
  width: min(220px, 45%);
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
  z-index: 1;
}

@media (max-width: 800px) {
  .sage-band { grid-template-columns: 1fr; }
  .sage-media { min-height: 240px; }
}

/* ── 90 years + stats ── */

.years-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0 2rem;
}

.years-block h2 {
  color: var(--sw-navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.years-block p { color: var(--sw-muted); line-height: 1.55; }

.years-photo {
  border-radius: 12px;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-bottom: 3rem;
  text-align: center;
}

.stat {
  background: var(--sw-mist);
  border-radius: 12px;
  padding: 1.25rem;
}

.stat img { height: 48px; margin: 0 auto 0.5rem; }
.stat strong { display: block; color: var(--sw-navy); font-size: 1.35rem; }
.stat span { color: var(--sw-muted); font-size: 0.9rem; }

@media (max-width: 800px) {
  .years-block, .stats { grid-template-columns: 1fr; }
}

/* ── Capability tiles + photo families (homepage) ── */

.cap-grid, .photo-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cap-tile {
  background: var(--sw-mist);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.cap-tile img { height: 64px; margin: 0 auto 0.75rem; }
.cap-tile h3 { margin: 0; color: var(--sw-navy); font-size: 1rem; }

.photo-tile {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  min-height: 180px;
  color: #fff;
  text-decoration: none;
}

.photo-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(28, 56, 104, 0.55));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 800px) {
  .cap-grid, .photo-tiles { grid-template-columns: 1fr 1fr; }
}

.section-pad { padding: 3rem 0; }

.section-pad h2.navy {
  color: var(--sw-navy);
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
}

/* ── Page hero: inset rounded image, title on the image ── */

.page-hero { padding: 0.5rem 0 1.5rem; }

.page-hero-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 280px;
}

.page-hero-media img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.page-hero-media h1 {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0;
  max-width: 12ch;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.page-hero-lede {
  text-align: center;
  color: var(--sw-muted);
  margin: 1.75rem auto 0;
  max-width: 40rem;
}

/* ── Sage icon family tiles (products) ── */

.icon-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.icon-tile {
  background: var(--sw-sage);
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 0 0 0.9rem;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.icon-tile img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  margin: 0;
}

.icon-tile span {
  color: #fff;
  font-weight: 600;
  font-size: 1.15rem;
  padding-top: 0.35rem;
}

@media (max-width: 800px) {
  .icon-tiles { grid-template-columns: 1fr 1fr; }
}

/* ── Feature rows with cutouts ── */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
}

.feature-row h2 { color: var(--sw-navy); margin: 0 0 0.75rem; }
.feature-row ul { margin: 0; padding-left: 1.2rem; color: var(--sw-muted); line-height: 1.55; }
.feature-row img { width: 100%; object-fit: contain; max-height: 280px; margin: 0 auto; }

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; }
}

/* ── Contact panel ── */

.contact-panel {
  background: #ececec;
  border-radius: 24px;
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1rem 0 3rem;
}

.contact-panel label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0.75rem 0 0.3rem;
}

.req { color: #c0392b; font-weight: 600; font-size: 0.8rem; text-transform: none; }

.contact-panel input,
.contact-panel select,
.contact-panel textarea {
  width: 100%;
  border: 1px solid #ccc;
  padding: 0.65rem 0.7rem;
  font: inherit;
  background: #fff;
}

.name-row, .email-phone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-panel button[type="submit"] {
  margin-top: 1rem;
  background: var(--sw-navy);
  color: #fff;
  border: 0;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 12px;
}

@media (max-width: 800px) {
  .contact-panel, .name-row, .email-phone { grid-template-columns: 1fr; }
}

.quote-success { color: var(--sw-sage); font-weight: 600; }

/* ── Gallery + footer ── */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.gallery figure {
  background: var(--sw-mist);
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}

.gallery img { width: 100%; height: 160px; object-fit: cover; }
.gallery figcaption { padding: 0.6rem; font-size: 0.85rem; color: var(--sw-muted); }

@media (max-width: 800px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}

.site-footer {
  background: var(--sw-navy);
  color: #fff;
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}

.site-footer a { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.muted { color: var(--sw-muted); }
.navy { color: var(--sw-navy); }

.search-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.search-hit { padding: 1.1rem 0; border-bottom: 1px solid var(--sw-line); }
.search-hit h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.search-hit h2 a { text-decoration: none; }
