/* Commercial Roof Repair — "System × problem matrix" template (prefix cr-) */

/* Hero: DS photo hero + systems ticker along its base */
.cr-hero { grid-template-rows: 1fr auto; min-height: 820px; }
.cr-hero .hl-hero__media img { object-position: 50% 60%; }
.cr-hero-content { align-self: center; max-width: 760px; }
.cr-ticker { border-top: 1px solid var(--hl-border-dark); background: rgba(11,20,36,.7); overflow: hidden; }
.cr-ticker-track { display: flex; width: max-content; animation: cr-marquee 38s linear infinite; }
.cr-ticker span { flex-shrink: 0; padding: 20px 34px; font-family: var(--hl-font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--hl-white); border-right: 1px solid var(--hl-border-dark); }
.cr-ticker span:nth-child(odd) { color: rgba(255,255,255,.62); }
@keyframes cr-marquee { to { transform: translateX(-50%); } }

/* Who we work with */
.cr-who-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--hl-space-6) clamp(32px, 6vw, 112px); }
.cr-statement { grid-column: 1 / -1; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.035em; max-width: 34ch; }
.cr-statement span { color: var(--hl-text-muted); }
.cr-clients { list-style: none; border-top: 2px solid var(--hl-navy); }
.cr-clients li { padding: 14px 0; border-bottom: 1px solid var(--hl-border); font-weight: 600; color: var(--hl-navy); display: flex; justify-content: space-between; }
.cr-clients li::after { content: '→'; color: var(--hl-red); font-weight: 400; }

/* Image slots */
.cr-who-slot { margin-top: 32px; }
.cr-row-slot { width: 100%; max-width: 180px; margin-bottom: 14px; border-radius: var(--hl-radius-md); }
.cr-priority-slot { margin-top: 32px; }

/* Matrix */
.cr-matrix { background: var(--hl-white); }
.cr-matrix-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: end; margin-bottom: var(--hl-space-6); }
.cr-matrix-head h2 { font-size: var(--hl-fs-h2); }
.cr-matrix-side > p:first-child { color: var(--hl-text-muted); margin-bottom: 22px; max-width: 60ch; }
.cr-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-filter { padding: 10px 16px; background: var(--hl-white); border: 1px solid var(--hl-border-strong); border-radius: var(--hl-radius-sm); color: var(--hl-navy); font-size: var(--hl-fs-sm); font-weight: 600; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.cr-filter:hover { border-color: var(--hl-navy); }
.cr-filter[aria-pressed="true"] { background: var(--hl-navy); border-color: var(--hl-navy); color: #fff; }
.cr-filter-status { margin-top: 12px; font-size: var(--hl-fs-eyebrow); letter-spacing: .14em; text-transform: uppercase; color: var(--hl-text-muted); font-weight: 600; }
.cr-table-wrap { overflow-x: auto; background: var(--hl-white); border: 1px solid var(--hl-border); border-radius: var(--hl-radius-lg); }
.cr-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.cr-table th, .cr-table td { text-align: left; vertical-align: top; padding: 22px 22px; border-bottom: 1px solid var(--hl-border); }
.cr-table thead th { background: var(--hl-surface); font-size: var(--hl-fs-eyebrow); letter-spacing: .14em; text-transform: uppercase; color: var(--hl-text-muted); font-weight: 600; padding-top: 18px; padding-bottom: 18px; }
.cr-table tbody th { position: sticky; left: 0; background: var(--hl-white); width: 20%; z-index: 1; border-right: 1px solid var(--hl-border); }
.cr-table tbody th strong { display: block; font-family: var(--hl-font-display); color: var(--hl-navy); font-size: var(--hl-fs-h4); letter-spacing: -.015em; margin-bottom: 4px; }
.cr-table tbody th span { display: block; font-weight: 400; font-size: var(--hl-fs-sm); color: var(--hl-text-muted); }
.cr-table td { color: var(--hl-text-muted); font-size: var(--hl-fs-sm); line-height: 1.55; transition: opacity .3s ease, background-color .3s ease, box-shadow .3s ease; }
.cr-table.is-filtering td { opacity: .3; }
.cr-table.is-filtering td.is-hit { opacity: 1; color: var(--hl-navy); background: var(--hl-red-soft); box-shadow: inset 3px 0 0 var(--hl-red); }

/* Response levels */
.cr-response-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: var(--hl-space-6); }
.cr-response-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.cr-response-head h2 { font-size: var(--hl-fs-h2); }
.cr-scale { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-bottom: 0; }
.cr-scale span { position: relative; padding: 0 0 14px; font-size: var(--hl-fs-eyebrow); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--hl-text-on-dark-muted); }
.cr-scale span::after { content: ''; position: absolute; left: 0; right: 8px; bottom: 0; height: 5px; border-radius: 3px; background: rgba(255,255,255,.55); }
.cr-scale span:first-child::after { background: var(--hl-red-on-dark); }
.cr-scale span:last-child::after { background: rgba(255,255,255,.22); right: 0; }
.cr-response-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cr-level { padding: 32px 32px 0 0; }
.cr-level + .cr-level { padding-left: 32px; border-left: 1px solid var(--hl-border-dark); }
.cr-level-k { font-size: var(--hl-fs-eyebrow); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--hl-red-on-dark); margin-bottom: 12px; }
.cr-level h3 { font-size: var(--hl-fs-h3); margin-bottom: 14px; }
.cr-level > p:not(.cr-level-k) { margin-bottom: 22px; }
.cr-level .check-list { font-size: var(--hl-fs-sm); }

/* Priority (light) */
.cr-priority-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.cr-priority-head h2 { margin-bottom: 20px; }
.cr-priority-list { margin: 0; display: grid; gap: 14px; }
.cr-priority-list div { padding: 26px 28px; border: 1px solid var(--hl-border); border-left: 4px solid var(--hl-border-strong); border-radius: 0 var(--hl-radius-lg) var(--hl-radius-lg) 0; background: var(--hl-white); }
.cr-p-now { border-left-color: var(--hl-red) !important; background: var(--hl-red-soft) !important; }
.cr-p-plan { border-left-color: var(--hl-navy) !important; }
.cr-priority-list dt { font-family: var(--hl-font-display); font-size: var(--hl-fs-h4); font-weight: 600; letter-spacing: -.02em; color: var(--hl-navy); margin-bottom: 8px; line-height: 1.2; }
.cr-priority-list dt span { display: block; font-family: var(--hl-font-body); font-size: var(--hl-fs-eyebrow); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--hl-red); margin-bottom: 8px; }
.cr-priority-list dd { margin: 0; color: var(--hl-text-muted); max-width: 62ch; }

/* Maintenance */
.cr-maint-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.cr-maint-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--hl-radius-lg); }
.cr-maint-copy h2 { font-size: var(--hl-fs-h2); margin-bottom: 22px; }
.cr-maint-copy > p:not(.eyebrow) { color: var(--hl-text-muted); margin-bottom: 28px; max-width: 62ch; }
.cr-maint-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: 1px solid var(--hl-border); }
.cr-maint-list li { position: relative; padding: 14px 0 14px 26px; border-bottom: 1px solid var(--hl-border); font-size: var(--hl-fs-sm); font-weight: 600; color: var(--hl-navy); }
.cr-maint-list li::before { content: '✓'; position: absolute; left: 0; top: 14px; color: var(--hl-red); font-weight: 700; }

/* Florida conditions */
.cr-climate { }
.cr-climate-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.cr-climate-head h2 { font-size: var(--hl-fs-h2); }
.cr-climate-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cr-climate-list article { padding: 28px; background: var(--hl-white); border: 1px solid var(--hl-border); border-radius: var(--hl-radius-lg); }
.cr-climate-list h3 { font-size: var(--hl-fs-h4); margin-bottom: 10px; }
.cr-climate-list p { color: var(--hl-text-muted); }

/* Next (DS brand rule) */
.cr-next-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 34px 38px; border: 1px solid var(--hl-border); border-left: 4px solid var(--hl-red); border-radius: 0 var(--hl-radius-lg) var(--hl-radius-lg) 0; }
.cr-next h2 { font-size: var(--hl-fs-h3); margin-bottom: 10px; }
.cr-next p:not(.eyebrow) { max-width: 66ch; }

@media (max-width: 1100px) {
  .cr-matrix-head, .cr-priority-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cr-who-grid, .cr-response-head, .cr-maint-grid, .cr-climate-grid, .cr-climate-list { grid-template-columns: 1fr; }
  .cr-response-grid { grid-template-columns: 1fr; }
  .cr-level, .cr-level + .cr-level { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--hl-border-dark); }
  .cr-scale { display: none; }
  .cr-next-inner { flex-direction: column; align-items: start; }
}
@media (max-width: 560px) {
  .cr-hero { min-height: 0; }
  .cr-hero-content { padding: 64px 0 48px; }
  .cr-maint-list { grid-template-columns: 1fr; }
  .cr-ticker span { padding: 16px 22px; font-size: 16px; }
  .cr-table tbody th { position: static; }
}
@media (prefers-reduced-motion: reduce) { .cr-ticker-track { animation: none; } }
