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

/* ---------- 1. the header: the whole roofline drawn, eave to ridge ---------- */
.svc-hero .roofline { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 1; pointer-events: none; }
.roofline__line { fill: none; stroke: var(--c-accent); stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.45)); animation: roofline 9s var(--ease-in-out) 1.2s infinite; }
.roofline__glow { fill: rgb(240, 160, 28); fill-opacity: 0; animation: roofline-glow 9s ease 1.2s infinite; }
@keyframes roofline { 0% { stroke-dashoffset: 1; opacity: 1; } 30% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; opacity: 1; } 90%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes roofline-glow { 0%, 28% { fill-opacity: 0; } 40% { fill-opacity: 0.2; } 80% { fill-opacity: 0.12; } 90%, 100% { fill-opacity: 0; } }
.svc-hero[data-held] .roofline * { animation-play-state: paused; }

/* ---------- 2. signature: a year on your roof (the scroll chooses the season; residential-roofing.js) ---------- */
.year { --year-cta: 54px; padding-bottom: clamp(1rem, 3vh, 2rem); overflow: clip; }
.year__head { margin-bottom: 0; }
.year__track { position: relative; height: 330vh; margin-top: var(--space-4); }
.year__pin { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding-inline: var(--gutter); box-sizing: border-box; }
.year__stage { --rise: 5cqi; width: min(100%, calc(var(--max-w) + 80px), calc((100svh - var(--header-h) - 64px - var(--year-cta)) * 16 / 9)); }
.year__stage .gable__media { aspect-ratio: 16 / 9; border-radius: 0 0 var(--radius-xl) var(--radius-xl); box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.6); }
.year__stage .gable__media > img { object-position: 50% 58%; }
.year__sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.year__tint { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, var(--year-tint, transparent), transparent 70%), linear-gradient(90deg, rgba(8, 24, 15, 0.55) 0%, rgba(8, 24, 15, 0) 48%); }
.year__cards { list-style: none; margin: 0; padding: 0; position: absolute; z-index: 3; left: 3.5%; bottom: 15%; width: min(22rem, 40%); display: grid; gap: 0.5rem; }
.year__card { opacity: 0; transform: translateY(14px); transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out); }
.year__card[data-on], .year__card[data-past] { opacity: 1; transform: none; }
.year__card:not([data-on]):not([data-past]) { position: absolute; left: 0; right: 0; bottom: 0; visibility: hidden; }
.year__link { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem 0.75rem 0.75rem; color: var(--c-on-ink); text-decoration: none; }
.year__link > .icon:last-child { margin-left: auto; flex: none; width: 1.1em; height: 1.1em; color: var(--c-accent-on-ink); transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .year__link:hover > .icon:last-child { transform: translateX(4px); } }
.year__link[data-planned] { pointer-events: none; }
.year__ico { flex: none; position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-on-accent); }
.year__ico .icon { width: 17px; height: 17px; stroke-width: 2.6; opacity: 0; }
.year__card[data-on] .year__ico::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--c-accent); animation: year-ping 1.6s var(--ease-out) 3; }
@keyframes year-ping { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.4); opacity: 0; } }
.year__card[data-past] .year__ico { background: var(--c-brand); color: var(--c-accent); box-shadow: inset 0 0 0 2px var(--c-accent); }
.year__card[data-past] .year__ico .icon { opacity: 1; }
.year__txt b { display: block; font: 700 1.08rem/1.2 var(--font-display); color: var(--c-paper); }
.year__txt span { display: block; font-size: 0.95rem; line-height: 1.35; color: var(--c-on-ink-soft); }
.year__card[data-past] .year__txt span { display: none; }
.year__card[data-past] .year__link { padding-block: 0.5rem; }
.year__rail { position: absolute; z-index: 3; left: 3.5%; right: 3.5%; bottom: 5%; display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 12px; font: 700 0.88rem/1 var(--font-ui); color: rgba(247, 245, 238, 0.72); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7); }
.year__rail::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 3px; background: rgba(247, 245, 238, 0.28); }
.year__fill { position: absolute; left: 0; top: 0; height: 3px; border-radius: 3px; background: var(--c-accent); width: calc(var(--p, 0) * 100%); }
.year__rail span[data-on] { color: var(--c-paper); }
.year__cta { display: flex; justify-content: center; }
@media (max-width: 899px) { .year { --year-cta: 0px; } .year__cta { display: none; } }
@media (max-width: 760px) {
  .year__track { height: 280vh; }
  .year__stage { width: 100%; --rise: 9cqi; }
  .year__stage .gable__media { aspect-ratio: 4 / 4.6; }
  .year__stage .gable__media > img { object-position: 42% 50%; }
  .year__cards { left: 4%; right: 4%; width: auto; bottom: 14%; }
  .year__card[data-past] { display: none; }
  .year__rail span { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .roofline__line, .roofline__glow { animation: none; }
  .roofline__line { stroke-dashoffset: 0; }
  .year__card { transition: none; }
  .year__card[data-on] .year__ico::after { animation: none; }
}
