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

/* ---------- 1. the header: the headline, the search over every answer, the topics; an own roof beside it ---------- */
.res-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section-y); }
.res-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.res-hero__title { font-size: clamp(2.4rem, 1.4rem + 2.8vw, 3.8rem); line-height: 1.02; color: var(--c-brand); text-wrap: balance; }
.res-hero__line { margin-top: var(--space-3); max-width: 34rem; font-size: var(--fs-lead); line-height: 1.45; color: var(--c-ink-soft); }
.res-search { position: relative; max-width: 34rem; margin-top: var(--space-5); }
.res-search__ico { position: absolute; left: 1.1rem; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--c-brand); pointer-events: none; }
.res-search__ico .icon { width: 22px; height: 22px; }
.res-search__input { box-sizing: border-box; width: 100%; min-height: 58px; padding: 0.9rem 1.1rem 0.9rem 3.2rem; border: 0; border-radius: 999px; background: var(--c-card); color: var(--c-ink); font: 500 1.08rem/1.2 var(--font-text); box-shadow: inset 0 0 0 2px var(--c-line), var(--shadow-s); transition: box-shadow var(--dur-fast) var(--ease-out); }
.res-search__input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.res-search__input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--c-accent), var(--shadow-m); }
.res-search__said { min-height: 1.4em; margin: 0.5rem 0 0 1.1rem; font-size: var(--fs-small); color: var(--c-ink-soft); }
.res-topics { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.res-topic { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; box-sizing: border-box; padding: 0.5rem 0.75rem 0.5rem 1rem; border-radius: 999px; background: var(--c-paper-alt); box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-ink); font: 700 1rem/1 var(--font-display); text-decoration: none; transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.res-topic b { padding: 0.22rem 0.45rem; border-radius: 999px; background: var(--c-card); color: var(--c-ink-soft); font: 700 0.8rem/1 var(--font-ui); }
@media (hover: hover) { .res-topic:hover { background: var(--c-card); box-shadow: inset 0 0 0 2px var(--c-accent); } }
.res-topic:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.res-hero__photo .gable__media { aspect-ratio: 4 / 3.6; box-shadow: var(--shadow-l); }
.res-hero__photo .gable__media > img { object-position: 62% 60%; }
@media (max-width: 900px) {
  .res-hero__grid { grid-template-columns: 1fr; }
  .res-hero__photo { display: none; }
}

/* ---------- 2. the guide, as a large card with its own picture ---------- */
.res-guide__card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(1rem, 2vw, 1.5rem); color: var(--c-ink); }
.res-guide__pic { display: block; }
.res-guide__pic .gable__media { display: block; aspect-ratio: 16 / 9.5; }
.res-guide__pic .gable__media > img { transition: transform 900ms var(--ease-out); }
@media (hover: hover) { .res-guide__card:hover .res-guide__pic .gable__media > img { transform: scale(1.04); } }
.res-guide__words { display: grid; justify-items: start; gap: var(--space-3); padding-right: clamp(0rem, 2vw, 1.5rem); }
.res-guide__kicker { font: 700 var(--fs-small)/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-accent-text); }
.res-guide__title { margin: 0; font: 800 clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem)/1.08 var(--font-display); color: var(--c-brand); text-wrap: balance; }
.res-guide__line { font-size: var(--fs-lead); line-height: 1.45; color: var(--c-ink-soft); }
.res-guide__card:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 4px; }
@media (max-width: 900px) { .res-guide__card { grid-template-columns: 1fr; } }

/* ---------- 3. the answers by topic: each topic's questions, and its service page ---------- */
.res-answers__in { display: grid; gap: clamp(2.5rem, 5vw, 4rem); max-width: 900px; }
.res-topic-block { scroll-margin-top: calc(var(--header-h) + 20px); }
.res-topic-block[hidden] { display: none; }
.res-topic-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; margin-bottom: var(--space-3); }
.res-topic-block__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); color: var(--c-brand); }
.res-answers .faq__item[hidden] { display: none; }
.res-none { margin: 0; padding: 1.2rem 1.4rem; border-radius: var(--radius-m); background: var(--c-paper-alt); font-size: var(--fs-lead); }

@media (prefers-reduced-motion: reduce) {
  .res-search__input, .res-topic, .res-guide__pic .gable__media > img { transition: none; }
}
