/* About: its parts placed and sized with the tokens of system.css (the shared parts are in components.css). */

/* ---------- 1. the header: the company header; at its right the years since 1979, filling once (about.js) ---------- */
.years { box-sizing: border-box; padding: 1.35rem 1.5rem 1.25rem; }
.years__label { margin: 0; font: 600 var(--fs-small)/1.3 var(--font-ui); color: var(--c-on-ink-soft); }
.years__count { margin: 0.35rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.6rem; }
.years__count b { font: 800 clamp(3.2rem, 2.4rem + 2.2vw, 4.4rem)/0.95 var(--font-display); color: var(--c-accent-on-ink); font-variant-numeric: tabular-nums; min-width: 2ch; }
.years__count span[aria-hidden] { font: 700 1.12rem/1.15 var(--font-display); color: var(--c-paper); }
.years__track { position: relative; height: 8px; margin-top: 1.1rem; border-radius: 99px; background: rgba(247, 245, 238, 0.16); }
.years__fill { position: absolute; inset: 0; border-radius: inherit; background: var(--c-accent); transform-origin: left center; transform: scaleX(var(--fill, 1)); box-shadow: 0 0 14px rgba(240, 160, 28, 0.5); }
.years__tick { position: absolute; z-index: 1; top: -4px; bottom: -4px; left: var(--at); width: 2px; margin-left: -1px; border-radius: 2px; background: rgba(247, 245, 238, 0.4); }
.years__ends { display: flex; justify-content: space-between; margin-top: 0.6rem; font: 700 0.98rem/1 var(--font-display); color: var(--c-paper); }
.years__ends span:last-child { color: var(--c-accent-on-ink); transition: text-shadow var(--dur-med) var(--ease-out); }
.years[data-done] .years__ends span:last-child { text-shadow: 0 0 14px rgba(240, 160, 28, 0.7); }
.years__by { margin: 0.95rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--c-on-ink-line); font-size: var(--fs-small); color: var(--c-on-ink-soft); }

/* ---------- 2. signature: one family, one office, one phone number (the home's map, flying down to the office) ---------- */
.family { box-sizing: border-box; padding-block: calc(var(--section-y) * 0.85); min-height: min(860px, calc(100svh - var(--header-h))); display: grid; align-items: center; }
.family__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #b9ab8c; }
.family__bg .family__map { position: absolute; inset: 0; }
.family__map[data-no3d] { background: #b9ab8c url("https://files.webmediacdn.com/tosiroofing-com-10832a/assets/img/map-mid-2048.webp") 50% 50% / cover no-repeat; }
/* its top is the header's gable foot (deep green), so the band starts solid and opens onto the map */
.family__grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 24, 15, 0.9) 0%, rgba(8, 24, 15, 0.72) 30%, rgba(8, 24, 15, 0.18) 58%, rgba(8, 24, 15, 0.06) 100%), linear-gradient(180deg, var(--c-brand) 0, rgba(14, 38, 25, 0.55) 9%, rgba(8, 24, 15, 0) 26%, rgba(8, 24, 15, 0) 78%, rgba(8, 24, 15, 0.55)); }
.family__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; pointer-events: none; }
.family__copy { pointer-events: auto; }
.family__copy .head__title { color: var(--c-paper); }
.family__facts { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: 0.6rem; }
.family__facts li { --i: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 0.95rem; align-items: start; padding: 0.95rem 1.1rem; border-radius: var(--radius-m); background: rgba(14, 38, 25, 0.62); box-shadow: inset 0 0 0 1px var(--c-on-ink-line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition-delay: calc(var(--i) * 140ms); }
.family__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-on-accent); }
.family__ico .icon { width: 22px; height: 22px; }
.family__facts p { margin: 0; display: grid; justify-items: start; gap: 0.2rem; }
.family__facts b { font: 700 1.15rem/1.2 var(--font-display); color: var(--c-paper); }
.family__facts span { font-size: var(--fs-small); line-height: 1.4; color: var(--c-on-ink-soft); }
.family__link { font: 600 var(--fs-small)/1.4 var(--font-ui); color: var(--c-accent-on-ink); text-decoration: underline; text-underline-offset: 3px; }
.family__phone { font: 800 1.35rem/1.15 var(--font-display); color: var(--c-paper); text-decoration: none; }
@media (hover: hover) { .family__link:hover, .family__phone:hover { color: var(--c-accent-on-ink); text-decoration-thickness: 2px; } }
.family__link:focus-visible, .family__phone:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
/* the map's stop at the band's top right, clear of the sticky header */
.family__stop { right: 20px; top: calc(var(--header-h) + 14px); bottom: auto; }
/* stacked: the heading, then the map, then the three facts */
@media (max-width: 960px) {
  .family { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: var(--section-y); }
  .family__grid, .family__copy { display: contents; }
  .family .head { order: 1; box-sizing: border-box; width: 100%; max-width: calc(var(--max-w) + 2 * var(--gutter)); margin: 0 auto var(--space-4); padding-inline: var(--gutter); }
  .family__bg { order: 2; position: relative; inset: auto; z-index: 0; height: min(84vw, 460px); }
  .family__grade { background: linear-gradient(180deg, var(--c-brand) 0%, rgba(8, 24, 15, 0) 14%, rgba(8, 24, 15, 0) 82%, var(--c-brand) 100%); }
  .family__facts { order: 3; box-sizing: border-box; width: 100%; max-width: calc(var(--max-w) + 2 * var(--gutter)); margin: var(--space-4) auto 0; padding-inline: var(--gutter); }
  .family__facts li { background: rgba(247, 245, 238, 0.06); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .family__stop { top: 14px; right: 14px; }
}

/* ---------- 3. the storm chasers come and go: the shared compare (components.css, site.js) ---------- */
.chasers__more { margin: var(--space-4) auto 0; max-width: 40rem; text-align: center; font-size: var(--fs-small); color: var(--c-ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .years__ends span:last-child { transition: none; }
  .family__facts li { transition-delay: 0s; }
}
