/* =====================================================
   ABOUT + HISTORY PAGES (design system)
   Loaded only on about.html and waldman-history.html.
   Every selector is scoped under body.ds.
   About reads as a company profile; History as an archive.
   No boxed grids here: those belong to the homepage only.
   ===================================================== */

/* ---------- Page heroes ----------
   .ab-about-hero / .wh-history-hero get margin-top and padding-top:0
   inline from PageHeaderPositioning in script.js, so spacing lives
   on the inner wrappers. */
.ds .ab-hero,
.ds .hx-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(400px, 58vh, 580px);
  padding: 0;
  background-color: var(--ds-graphite);
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--ds-white);
  text-align: left;
  overflow: hidden;
}

/* Live open/closed text from BusinessHours in script.js */
.ds .ab-hero-status .open-status {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.ds .ab-hero-status .status {
  background: none;
  padding: 0;
  margin-right: 6px;
  text-shadow: none;
  font-weight: 700;
}

.ds .ab-hero-status .status.open {
  color: #2ecc71;
}

.ds .ab-hero-status .status.closed {
  color: #ff5252;
}

/* =====================================================
   ABOUT: company profile
   ===================================================== */
.ds .ab-hero {
  background-image:
    linear-gradient(90deg, rgba(17, 19, 22, 0.94) 0%, rgba(17, 19, 22, 0.72) 48%, rgba(17, 19, 22, 0.2) 100%),
    linear-gradient(0deg, rgba(17, 19, 22, 0.75) 0%, transparent 45%),
    url('https://storage.googleapis.com/kws-clients/Waldman%20Electrical%20Contractors/About/waldman-van-about-page-hero-bg.webp');
  background-position: center, center, 70% 55%;
}

.ds .ab-hero-inner {
  position: relative;
  width: 100%;
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: clamp(36px, 6vw, 72px);
}

.ds .ab-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.95em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e8dcc8;
  font-size: 0.85rem;
  font-weight: 600;
}

.ds .ab-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-brass);
}

.ds .ab-hero-title {
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ds-white);
  margin: 0.35em 0 0.25em;
  max-width: 16ch;
  text-wrap: balance;
}

.ds .ab-hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  max-width: 40ch;
  margin: 0 0 24px;
}

/* Facts as one typographic line split by hairlines */
.ds .ab-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 0;
  margin: 0;
  padding: 0;
}

.ds .ab-facts li {
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.ds .ab-facts li:first-child {
  padding-left: 0;
  border-left: 0;
}

.ds .ab-facts b {
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ds-brass);
  margin-right: 4px;
}

/* Intro: copy beside the technician photo */
.ds .ab-intro {
  background: var(--ds-white);
  overflow: hidden;
}

.ds .ab-intro-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.ds .ab-intro-copy p + p {
  margin-top: 0.9em;
}

.ds .ab-intro-media {
  position: relative;
  margin: 0 18px 18px 0;
}

.ds .ab-intro-media::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--ds-brass);
  border-radius: 8px;
}

.ds .ab-intro-media img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 30% 40%;
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(26, 29, 33, 0.45);
}

/* Highlights as a fact sheet: three columns split by hairlines */
.ds .ab-sheet {
  background: var(--ds-white);
  padding-top: 0;
}

.ds .ab-sheet-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 2px solid var(--ds-graphite);
  border-bottom: 1px solid var(--ds-rule);
}

.ds .ab-sheet-item {
  padding: 28px 32px 30px;
  border-left: 1px solid var(--ds-rule);
}

.ds .ab-sheet-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.ds .ab-sheet-item dt {
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--ds-oxblood);
  margin-bottom: 10px;
}

.ds .ab-sheet-item dd {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ds-ink-2);
}

/* Services: sticky heading beside a hairline list */
.ds .ab-services {
  background: var(--ds-steel);
}

.ds .ab-services-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.ds .ab-services .ds-h2 {
  position: sticky;
  top: 140px;
  margin: 0;
}

.ds .ab-lines {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ds-graphite);
}

.ds .ab-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title more'
    'text  more';
  gap: 6px 32px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--ds-rule);
  color: var(--ds-graphite);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ds .ab-line-title {
  grid-area: title;
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.05;
}

.ds .ab-line-text {
  grid-area: text;
  max-width: 54ch;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ds-ink-2);
}

.ds .ab-line-more {
  grid-area: more;
  align-self: center;
  color: var(--ds-oxblood);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.ds .ab-line-more i {
  font-size: 0.8rem;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.ds .ab-line:hover .ab-line-title {
  color: var(--ds-oxblood);
}

.ds .ab-line:hover .ab-line-more i {
  transform: translateX(4px);
}

.ds .ab-line:focus-visible {
  outline: 3px solid var(--ds-maroon-bright);
  outline-offset: 4px;
}

/* Specialties: two columns split by a hairline on oxblood */
.ds .ab-specialties {
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(176, 38, 72, 0.35), transparent 60%),
    linear-gradient(160deg, #4a0e1c 0%, var(--ds-oxblood) 45%, #3a0a15 100%);
}

.ds .ab-specialties .ds-h2 {
  color: var(--ds-white);
}

.ds .ab-spec-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.ds .ab-spec {
  padding: 28px 40px 0 0;
}

.ds .ab-spec + .ab-spec {
  padding: 28px 0 0 40px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.ds .ab-spec .ds-h3 {
  color: var(--ds-white);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.ds .ab-spec .ds-h3 i {
  color: var(--ds-brass);
  font-size: 1.1rem;
  margin-right: 8px;
}

.ds .ab-specialties p {
  color: rgba(255, 255, 255, 0.8);
}

/* Brands: a plain logo strip */
.ds .ab-brands {
  background: var(--ds-white);
}

.ds .ab-brands-row {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.ds .ab-brands .ds-h2 {
  margin: 0;
}

.ds .ab-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  margin: 0;
  padding: 0;
}

.ds .ab-logos img {
  display: block;
  max-height: 58px;
  max-width: 150px;
  width: auto;
  height: auto;
  filter: grayscale(1);
  opacity: 0.8;
}

/* Closing call to action over the kitchen photo */
.ds .ab-cta {
  padding: clamp(48px, 7vw, 96px) 0;
  background-color: var(--ds-graphite);
  background-image:
    linear-gradient(90deg, rgba(17, 19, 22, 0.95) 0%, rgba(17, 19, 22, 0.82) 55%, rgba(17, 19, 22, 0.6) 100%),
    url('https://storage.googleapis.com/kws-clients/Waldman%20Electrical%20Contractors/About/about-page-cta-bg.webp');
  background-size: cover;
  background-position: center;
  border-top: 3px solid var(--ds-maroon-bright);
}

.ds .ab-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.ds .ab-cta .ds-h2 {
  color: var(--ds-white);
  margin-bottom: 0.3em;
  max-width: 20ch;
}

.ds .ab-cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  margin: 0;
}

.ds .ab-cta-buttons,
.ds .hx-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ds .ab-cta .hero-btn,
.ds .hx-cta .hero-btn,
.ds .hx-legacy .hero-btn {
  width: auto;
}

.ds .ab-cta .hero-btn i,
.ds .hx-cta .hero-btn i,
.ds .hx-legacy .hero-btn i {
  margin-right: 8px;
}

/* =====================================================
   HISTORY: an archive
   ===================================================== */
.ds .hx-hero {
  min-height: clamp(460px, 68vh, 660px);
  background-image:
    linear-gradient(90deg, rgba(20, 15, 11, 0.95) 0%, rgba(20, 15, 11, 0.68) 52%, rgba(20, 15, 11, 0.3) 100%),
    radial-gradient(50% 70% at 78% 40%, rgba(201, 160, 106, 0.18), transparent 70%),
    url('https://storage.googleapis.com/kws-clients/Waldman%20Electrical%20Contractors/History/vintage-sconce.webp');
  background-position: center, center, 80% 40%;
}

.ds .hx-hero-inner {
  width: 100%;
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.ds .hx-since {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--ds-font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ds-brass);
}

.ds .hx-since::before {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--ds-brass);
}

.ds .hx-title {
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--ds-white);
  margin: 0 0 0.25em;
  max-width: 11ch;
}

.ds .hx-sub {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255, 255, 255, 0.82);
}

/* Ledger strip along the bottom of the hero */
.ds .hx-ledger {
  width: 100%;
  background: rgba(12, 9, 7, 0.6);
  border-top: 1px solid rgba(201, 160, 106, 0.35);
}

.ds .hx-ledger ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  list-style: none;
}

.ds .hx-ledger li {
  padding: 18px 24px;
  border-left: 1px solid rgba(201, 160, 106, 0.25);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.98rem;
}

.ds .hx-ledger li:first-child {
  padding-left: 0;
  border-left: 0;
}

.ds .hx-ledger b {
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ds-brass);
  margin-right: 6px;
}

/* Intro: the vintage photo as a print, copy beside it */
.ds .hx-intro {
  background:
    radial-gradient(60% 60% at 0% 100%, rgba(201, 160, 106, 0.1), transparent 60%),
    linear-gradient(180deg, var(--ds-white) 0%, var(--ds-steel) 100%);
  overflow: hidden;
}

.ds .hx-intro-grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.ds .hx-print {
  order: -1;
  position: relative;
  margin: 0;
  padding: 12px 12px 40px;
  background: var(--ds-white);
  border-radius: 3px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 30px 60px -24px rgba(26, 29, 33, 0.5);
  transform: rotate(-1.5deg);
}

.ds .hx-print img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.25) contrast(1.05);
}

.ds .hx-intro-copy p + p {
  margin-top: 0.9em;
}

/* Timeline: years on the left, a brass rail, open text on the right */
.ds .hx-timeline {
  background:
    radial-gradient(50% 30% at 15% 0%, rgba(201, 160, 106, 0.12), transparent 70%),
    linear-gradient(180deg, #17191d 0%, var(--ds-graphite) 100%);
}

.ds .hx-list {
  --hx-year: 230px;
  --hx-rail: 40px;
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ds .hx-list::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: calc(var(--hx-year) + var(--hx-rail) / 2 - 1px);
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(201, 160, 106, 0.85),
    rgba(201, 160, 106, 0.2)
  );
}

.ds .hx-event {
  position: relative;
  display: grid;
  grid-template-columns: var(--hx-year) var(--hx-rail) 1fr;
  align-items: start;
}

.ds .hx-event + .hx-event {
  margin-top: clamp(40px, 5vw, 64px);
}

.ds .hx-year {
  padding-right: 20px;
  text-align: right;
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: 1;
  color: var(--ds-brass);
  font-variant-numeric: tabular-nums;
}

.ds .hx-event:first-child .hx-year {
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
}

.ds .hx-node {
  justify-self: center;
  width: 16px;
  height: 16px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--ds-graphite);
  border: 3px solid var(--ds-brass);
  box-shadow: 0 0 0 6px rgba(201, 160, 106, 0.12);
}

.ds .hx-event:first-child .hx-node {
  background: var(--ds-brass);
}

.ds .hx-card {
  max-width: 62ch;
  padding-left: 8px;
}

.ds .hx-card .ds-h3 {
  color: var(--ds-white);
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.ds .hx-card p + p {
  margin-top: 0.9em;
}

.ds .hx-timeline p {
  color: rgba(255, 255, 255, 0.76);
  max-width: none;
}

/* Legacy: copy beside a pull quote */
.ds .hx-legacy {
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(176, 38, 72, 0.35), transparent 60%),
    linear-gradient(160deg, #4a0e1c 0%, var(--ds-oxblood) 45%, #3a0a15 100%);
}

.ds .hx-legacy-grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.ds .hx-legacy .ds-h2 {
  color: var(--ds-white);
}

.ds .hx-legacy p {
  color: rgba(255, 255, 255, 0.82);
}

.ds .hx-legacy .hero-btn {
  margin-top: 28px;
}

.ds .hx-quote {
  position: relative;
  margin: 0;
  padding: 8px 0 8px 36px;
  border-left: 3px solid var(--ds-brass);
}

.ds .hx-quote p {
  font-family: var(--ds-font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1.22;
  color: var(--ds-white);
  max-width: none;
}

/* Closing sign-off */
.ds .hx-cta {
  padding: clamp(52px, 7vw, 96px) 0;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(201, 160, 106, 0.12), transparent 60%),
    linear-gradient(180deg, #1d2025, var(--ds-graphite));
  border-top: 1px solid rgba(201, 160, 106, 0.35);
  text-align: center;
}

.ds .hx-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ds .hx-cta .ds-h2 {
  color: var(--ds-white);
  max-width: 22ch;
  margin: 0 auto 0.35em;
}

.ds .hx-cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  margin: 0 auto 28px;
}

.ds .hx-cta-buttons {
  justify-content: center;
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .ds .ab-intro-grid,
  .ds .hx-intro-grid,
  .ds .hx-legacy-grid,
  .ds .ab-services-grid,
  .ds .ab-brands-row {
    grid-template-columns: 1fr;
  }

  .ds .ab-services .ds-h2 {
    position: static;
  }

  .ds .ab-intro-media {
    max-width: 480px;
  }

  .ds .hx-print {
    max-width: 560px;
  }

  .ds .ab-sheet-list {
    grid-template-columns: 1fr;
  }

  .ds .ab-sheet-item,
  .ds .ab-sheet-item:first-child {
    padding: 22px 0;
    border-left: 0;
  }

  .ds .ab-sheet-item + .ab-sheet-item {
    border-top: 1px solid var(--ds-rule);
  }

  .ds .ab-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ds .hx-list {
    --hx-year: 160px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .ds .ab-hero,
  .ds .hx-hero {
    min-height: 0;
  }

  .ds .ab-hero {
    background-position: center, center, 62% 50%;
  }

  .ds .ab-hero-inner,
  .ds .hx-hero-inner {
    padding-top: 40px;
    padding-bottom: 28px;
  }

  .ds .ab-facts li {
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .ds .ab-facts b {
    font-size: 1.1rem;
  }

  .ds .ab-facts .ab-hero-status {
    flex-basis: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .ds .ab-intro-media {
    margin: 0 12px 12px 0;
  }

  .ds .ab-intro-media::before {
    inset: 12px -12px -12px 12px;
  }

  .ds .ab-intro-media img {
    aspect-ratio: 16 / 11;
    object-position: 30% 30%;
  }

  .ds .ab-sheet-item dt {
    font-size: 1.35rem;
  }

  .ds .ab-sheet-item dd,
  .ds .ab-line-text {
    font-size: 1rem;
  }

  .ds .ab-line {
    grid-template-columns: 1fr;
    grid-template-areas:
      'title'
      'text'
      'more';
    padding: 18px 2px;
  }

  .ds .ab-line-more {
    align-self: start;
    margin-top: 2px;
  }

  .ds .ab-spec-cols {
    grid-template-columns: 1fr;
  }

  .ds .ab-spec,
  .ds .ab-spec + .ab-spec {
    padding: 20px 0;
    border-left: 0;
  }

  .ds .ab-spec + .ab-spec {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .ds .ab-spec .ds-h3 {
    font-size: 1.35rem;
  }

  .ds .ab-logos {
    justify-content: flex-start;
    gap: 24px 36px;
  }

  .ds .ab-logos img {
    max-height: 44px;
    max-width: 120px;
  }

  .ds .ab-cta-buttons,
  .ds .hx-cta-buttons {
    width: 100%;
  }

  .ds .ab-cta-buttons .hero-btn,
  .ds .hx-cta-buttons .hero-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .ds .hx-ledger ul {
    grid-template-columns: 1fr 1fr;
  }

  .ds .hx-ledger li {
    padding: 12px 14px;
    font-size: 0.86rem;
  }

  .ds .hx-ledger li:nth-child(2) {
    border-left: 1px solid rgba(201, 160, 106, 0.25);
  }

  .ds .hx-ledger .ab-hero-status {
    grid-column: 1 / -1;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(201, 160, 106, 0.25);
  }

  .ds .hx-ledger b {
    font-size: 1.2rem;
  }

  .ds .hx-print {
    padding: 8px 8px 26px;
    transform: rotate(-1deg);
  }

  /* Timeline: rail on the left, year above each entry */
  .ds .hx-list {
    --hx-rail: 28px;
  }

  .ds .hx-list::before {
    left: 13px;
  }

  .ds .hx-event {
    grid-template-columns: var(--hx-rail) 1fr;
    column-gap: 12px;
  }

  .ds .hx-event + .hx-event {
    margin-top: 34px;
  }

  .ds .hx-year,
  .ds .hx-event:first-child .hx-year {
    grid-column: 2;
    grid-row: 1;
    padding: 0 0 8px;
    text-align: left;
    font-size: 1.7rem;
  }

  .ds .hx-event:first-child .hx-year {
    font-size: 2.2rem;
  }

  .ds .hx-node {
    grid-column: 1;
    grid-row: 1;
    margin-top: 6px;
  }

  .ds .hx-card {
    grid-column: 2;
    grid-row: 2;
    padding-left: 0;
  }

  .ds .hx-card .ds-h3 {
    font-size: 1.3rem;
  }

  .ds .hx-quote {
    padding-left: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds .ab-line,
  .ds .ab-line-more i {
    transition: none;
  }
}
