.case-header { border-bottom: 1px solid var(--line); }
.case-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.case-header .wordmark { font-size: 24px; }
.case-header .wordmark small { font-size: 8px; }
.case-header .case-nav { display: flex; align-items: center; gap: 24px; }
.case-link { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.case-header a { min-height: 44px; display: inline-flex; align-items: center; }
.case-hero { padding: clamp(30px, 5vw, 70px) 0; background: var(--cream); border-bottom: 1px solid var(--line); }
.case-hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.case-hero h1 { font-size: clamp(38px, 4.4vw, 66px); line-height: 1.06; letter-spacing: -.045em; max-width: 13ch; }
.case-hero h1 em { display: block; white-space: normal; letter-spacing: -.04em; }
.case-hero .eyebrow { margin-bottom: 17px; }
.case-hero p:not(.eyebrow) { margin: 20px 0 22px; max-width: 47ch; color: var(--muted); font-size: clamp(16px, 1.45vw, 19px); }
.case-hero .button { white-space: normal; }
.case-hero button[data-case-play] { cursor: pointer; }
.case-video img { display: block; width: 100%; height: auto; border-radius: 8px; }
.case-video-player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--forest); border-radius: 8px; }
.case-video-poster { display: block; width: 100%; height: 100%; padding: 0; background: var(--forest); border: 0; cursor: pointer; }
.case-video-poster:focus-visible { outline-offset: -5px; }
.case-video-poster img { width: 100%; height: 100%; object-fit: contain; }
.case-video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.case-video-play { position: absolute; display: grid; place-items: center; width: clamp(50px, 6vw, 68px); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 2px solid white; border-radius: 50%; background: var(--forest); color: white; font-size: 24px; box-shadow: 0 3px 16px #0006; }
.case-video-poster:hover .case-video-play { background: var(--green); }
.case-video figcaption, .case-photo figcaption { font-size: 14px; color: var(--muted); margin-top: 9px; }
.case-body { padding-block: clamp(30px, 5vw, 65px); }
.case-body section + section { margin-top: clamp(35px, 5vw, 66px); }
.case-body h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.case-body section > p, .case-result p, .case-contact p { max-width: 66ch; margin-top: 13px; color: var(--muted); }
.case-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 23px; }
.case-photo a { display: block; }
.case-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; }
.case-result { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(23px, 5vw, 70px); padding: clamp(20px, 4vw, 44px); background: var(--cream); border: 1px solid var(--line); border-radius: 8px; }
.case-result img { aspect-ratio: 1; }
.case-contact { border-top: 1px solid var(--line); padding-top: 32px; }
.case-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; }
.case-actions a { min-height: 44px; display: inline-flex; align-items: center; }
.case-actions .case-link { overflow-wrap: anywhere; min-width: 0; }
.case-related { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 14px; }
.case-footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 23px; font-size: 14px; }
@media (max-width: 760px) {
  .case-header .wrap, .case-hero .wrap, .case-body, .case-footer .wrap { width: calc(100% - 36px); }
  .case-header .case-nav { gap: 12px; font-size: 13px; }
  .case-hero-grid, .case-result { grid-template-columns: 1fr; }
  .case-hero h1 { max-width: 16ch; }
  .case-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
@media (max-width: 380px) {
  .case-header .brand { gap: 7px; }
  .case-header .brand img { width: 30px; height: 30px; }
  .case-header .wordmark { font-size: 21px; }
  .case-header .wordmark small { letter-spacing: 1.5px; }
  .case-header .case-nav { gap: 8px; font-size: 12px; }
}
.case-body a.text-link { text-decoration: underline; text-underline-offset: 3px; }
.case-body h2 { font-weight: 650; }
.case-body .case-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.project-index { padding-block: clamp(32px, 6vw, 76px); background: var(--cream); }
.project-index h1 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 24px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: clamp(12px, 2vw, 24px); }
.project-index .project-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.project-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: white; border: 1px solid #cbded5; border-radius: 12px; overflow: hidden; }
.project-card:hover { border-color: var(--green); }
.project-card > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--forest); }
.project-card-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(16px, 2.5vw, 28px); }
.project-card-copy strong { color: var(--forest); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.16; letter-spacing: -.025em; }
.project-card-description { color: var(--muted); margin: 10px 0 16px; font-size: 15px; line-height: 1.55; }
.project-card-action { margin-top: auto; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; font-weight: 700; font-size: 14px; }
.case-recommendations { border-top: 1px solid var(--line); padding-top: 29px; }
.case-recommendations .project-grid { margin-top: 20px; }
.case-recommendations .project-card:only-child { max-width: 720px; }
.case-recommendations .project-card-copy strong { font-size: clamp(21px, 2.1vw, 28px); }

.floor-project { padding: clamp(16px, 4vw, 40px); background: var(--cream); border: 1px solid var(--line); border-radius: 12px; }
.floor-project .before-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, 1.8vw, 20px); margin-top: 20px; }
.floor-project .before-after figure { position: relative; min-width: 0; overflow: hidden; border-radius: 8px; background: white; border: 1px solid var(--line); }
.floor-project .before-after img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; background: #ebf0ec; }
.floor-project .before-after figcaption { min-height: 3em; padding: 10px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.floor-project .photo-label { position: absolute; top: 10px; left: 10px; padding: 6px 10px; border-radius: 5px; background: var(--forest); color: white; font-weight: 700; font-size: 12px; letter-spacing: .06em; }
.floor-project .room-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
#case-3 .before-after img, #case-5 .before-after img { aspect-ratio: 1; }
#case-4 .before-after img { aspect-ratio: 4 / 3; }
.floor-wear-summary { margin-top: 26px; }
.floor-wear-summary h2 + p { margin-top: 13px; color: var(--muted); }

@media (min-width: 650px) {
  .case-recommendations .project-card:only-child { grid-template-columns: .9fr 1.1fr; grid-template-rows: 1fr; align-items: center; }
}
@media (max-width: 760px) {
  .project-index .wrap { width: calc(100% - 36px); }
  .floor-project .photo-label { top: 6px; left: 6px; padding: 4px 7px; font-size: 10px; }
  .floor-project .before-after figcaption { padding: 7px; font-size: 12px; }
}

/* Index contact panel and carpet photo comparison. */
.index-contact { background: var(--forest); color: white; padding-block: clamp(30px, 5vw, 60px); }
.index-contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) 165px; gap: clamp(26px, 5vw, 64px); align-items: center; }
.index-contact h2 { font-size: clamp(28px, 3.25vw, 44px); font-weight: 650; color: white; }
.index-contact p { max-width: 70ch; margin-top: 14px; color: #edf4ef; }
.index-contact .button { background: white; color: var(--forest); border-color: white; min-height: 48px; }
.index-contact .button:hover { background: #eaf3ed; }
.index-contact-email { font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; min-width: 0; }
.index-contact-qr { display: grid; gap: 5px; justify-items: center; padding: 7px 8px 12px; background: white; color: var(--forest); border-radius: 10px; text-align: center; font-size: 12px; font-weight: 700; }
.index-contact-qr img { display: block; width: 100%; height: auto; }
.carpet-comparison .before-after img { aspect-ratio: 5 / 4; }
@media (max-width: 760px) { .index-contact .wrap { width: calc(100% - 36px); } }
@media (max-width: 600px) {
  .index-contact-inner { grid-template-columns: 1fr; }
  .index-contact-qr { width: 155px; }
  .carpet-comparison .before-after { grid-template-columns: 1fr; gap: 12px; }
}
