/* Our Refit page layout. Shared header/footer and comparison controls stay in styles.css. */
.refit-hero { position: relative; isolation: isolate; display: flex; align-items: center; background: var(--charcoal); color: white; }
.refit-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center var(--image-focus-y, 55%); z-index: -3; }
.refit-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #050a10e8, #050a1099 42%, #050a1020), linear-gradient(0deg, #050a1080, transparent 55%, #050a1070); z-index: -2; }
.refit-hero-content { padding-top: 155px; padding-bottom: 110px; }
.refit-hero h1 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.12; max-width: 810px; margin-bottom: 0; overflow-wrap: break-word; }
.hero-baseline { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; justify-content: space-between; border-top: 1px solid #ffffff30; padding-top: 18px; font-size: 17px; color: #e3e1df; }

.refit-intro { padding-block: 60px; }
.intro-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 55px; align-items: center; }
.intro-grid h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.4; }
.intro-grid p { border-left: 1px solid #aaa39a; padding-left: 40px; line-height: 1.8; color: var(--muted); font-size: 17px; }

.projects-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; }
.projects-heading h2 { font-size: clamp(30px, 3.2vw, 44px); }
.collection-label { border-bottom: 1px solid #aaa49b; padding-bottom: 8px; font-size: 17px; text-transform: uppercase; white-space: nowrap; }
.collection-label span { color: #aaa49b; margin-left: 24px; }
.comparison-instruction { color: #adb3ba; margin: 24px 0 28px; font-size: 17px; }
.refit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.refit-featured { grid-column: 1 / -1; }
.refit-card .comparison { aspect-ratio: 1.48; background: var(--navy); }
.refit-featured .comparison { aspect-ratio: 2.6; }
.refit-card .comparison-label { top: 18px; bottom: auto; padding: 5px 12px; background: #0b0f14b3; }
.refit-card .comparison-label--before { left: 18px; }
.refit-card .comparison-label--after { right: 18px; }
.refit-card .comparison-handle { width: 46px; height: 46px; font-size: 23px; }
.refit-overlay { position: absolute; z-index: 4; bottom: 0; left: 0; right: 0; padding: 65px 27px 24px; background: linear-gradient(transparent, #060a10ed); pointer-events: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.refit-overlay h3 { font-size: 27px; margin-bottom: 7px; }
.refit-overlay p { font-size: 17px; color: #e3e1df; line-height: 1.6; }
.refit-overlay a { pointer-events: auto; padding: 10px; }
.refit-overlay h3 a { padding: 0; }
.refit-photo { display: block; position: relative; width: 100%; aspect-ratio: 1.48; overflow: hidden; background: var(--navy); color: inherit; }
.refit-featured .refit-photo { aspect-ratio: 2.6; }
.refit-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center var(--image-focus-y, center); }
.refit-photo .refit-overlay { pointer-events: none; }
.refit-photo--empty { min-height: 220px; }
.detail-separator { padding-inline: 8px; color: #b0aaa3; }
.projects-bottom { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid #ffffff26; margin-top: 32px; padding-top: 22px; color: #aab0b8; font-size: 17px; }

.stories-heading { display: grid; grid-template-columns: 1fr 1.05fr auto; gap: 36px; align-items: center; margin-bottom: 35px; }
.stories-heading > p { padding-left: 30px; border-left: 1px solid #aaa39a; color: var(--muted); line-height: 1.8; font-size: 17px; }
.stories-heading .text-link { letter-spacing: .025em; gap: 14px; }
.stories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.story-card { position: relative; isolation: isolate; text-align: left; border: 0; padding: 0; overflow: hidden; color: white; background: var(--navy); min-height: 285px; width: 100%; }
.story-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; transition: transform .6s; }
.story-card::after { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(0deg, #080e16f0, transparent 80%); }
.story-card:hover img { transform: scale(1.04); }
.play-icon { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #ffffffb3; border-radius: 50%; background: #0b0f1435; transition: background .25s; }
.play-icon svg { width: 25px; height: 25px; }
.story-card:hover .play-icon { background: #e67e2eb0; }
.story-caption { position: absolute; bottom: 25px; left: 24px; right: 40px; display: grid; gap: 10px; }
.story-title { font-family: var(--serif); font-size: 24px; line-height: 1.3; letter-spacing: -.03em; }
.story-label { font-size: 17px; color: #dededb; line-height: 1.5; }
.story-card > .arrow { position: absolute; bottom: 30px; right: 20px; width: 20px; }

.refit-process { display: grid; grid-template-columns: .7fr 1.6fr; }
.process-photo { min-height: 330px; }
.process-photo img { width: 100%; height: 100%; object-fit: cover; }
.process-content { padding: 55px clamp(28px, 4vw, 65px); }
.process-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.process-heading h2 { font-size: 32px; white-space: nowrap; }
.process-heading p { color: #b7bdc3; max-width: 260px; font-size: 17px; }
.process-heading .text-link { font-size: 17px; white-space: nowrap; letter-spacing: 0; gap: 14px; }
.process-heading .arrow { color: var(--orange); }
.refit-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; list-style: none; padding: 0; margin: 38px 0 0; }
.refit-steps li > span { display: block; font-size: 24px; color: var(--orange); border-bottom: 1px solid #b5714099; padding-bottom: 10px; margin-bottom: 13px; font-family: var(--serif); }
.refit-steps h3 { font: 500 17px/1.6 var(--sans); color: #dededb; }

.refit-contact { position: relative; isolation: isolate; padding-block: 68px; }
.refit-contact > img { position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--image-focus-y, 55%); }
.refit-contact::after { content: ''; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, #0b0f14ed, #0b0f1485); }
.refit-contact-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.refit-contact h2 { margin-bottom: 20px; }
.refit-contact p:not(.eyebrow) { color: #dedfdf; line-height: 1.8; font-size: 17px; }
.refit-contact .button { flex-shrink: 0; }

.story-dialog { position: relative; width: min(560px, calc(100% - 40px)); padding: 55px 36px 36px; background: var(--sand); color: var(--ink); border: 0; }
.story-dialog::backdrop { background: #060a11c9; backdrop-filter: blur(4px); }
.story-dialog .dialog-close { position: absolute; top: 9px; right: 12px; width: 44px; height: 44px; border: 0; background: none; font-size: 30px; }
.story-dialog h2 { font-size: 30px; margin-bottom: 20px; }
.story-dialog > p:not(.eyebrow) { font-size: 17px; margin-bottom: 28px; }

@media (max-width: 1250px) {
  .process-heading { flex-wrap: wrap; }
  .process-heading p { max-width: 100%; }
  .process-heading .text-link { margin-left: auto; }
  .stories-heading { grid-template-columns: 1fr 1fr; }
  .stories-heading .text-link { grid-column: 1 / -1; }
  .refit-process { grid-template-columns: .65fr 1.5fr; }
}

@media (max-width: 900px) {
  .intro-grid { gap: 32px; }
  .intro-grid p { padding-left: 25px; }
  .stories-grid { gap: 18px; }
  .story-title { font-size: 21px; }
  .story-caption { left: 18px; }
  .refit-process { grid-template-columns: 1fr; }
  .process-photo { height: 250px; min-height: 0; }
  .process-content { padding: 45px var(--gutter); }
  .refit-contact-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 700px) {
  .refit-hero { align-items: flex-start; }
  .refit-hero h1 { font-size: clamp(34px, 8.8vw, 44px); max-width: 530px; }
  .refit-hero-content { padding-top: max(84px, calc(env(safe-area-inset-top, 0px) + 72px)); padding-bottom: 176px; }
  .hero-baseline { font-size: 17px; gap: 12px; }
  .hero-baseline span:last-child { display: none; }
  .intro-grid { grid-template-columns: 1fr; gap: 25px; }
  .intro-grid h2 { font-size: 28px; }
  .intro-grid p { padding: 22px 0 0; border-left: 0; border-top: 1px solid #c9c2b8; }
  .refit-intro { padding-block: 44px; }
  .projects-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .comparison-instruction { margin-top: 22px; }
  .refit-grid { grid-template-columns: 1fr; gap: 24px; }
  .refit-featured { grid-column: auto; }
  .refit-featured .comparison, .refit-card .comparison { aspect-ratio: 1.05; }
  .refit-overlay { padding: 70px 18px 20px; }
  .refit-overlay h3 { font-size: 25px; }
  .detail-separator { padding-inline: 4px; }
  .refit-overlay p { max-width: 250px; }
  .refit-card .comparison-label { top: 12px; }
  .refit-card .comparison-label--before { left: 12px; }
  .refit-card .comparison-label--after { right: 12px; }
  .projects-bottom { flex-direction: column; gap: 8px; }
  .stories-heading { grid-template-columns: 1fr; gap: 22px; }
  .stories-heading > p { padding-left: 0; border: 0; }
  .stories-heading .text-link { grid-column: auto; }
  .stories-grid { grid-template-columns: 1fr; gap: 25px; }
  .story-card { min-height: 300px; }
  .story-title { font-size: 26px; }
  .refit-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; margin-top: 30px; }
  .process-heading { display: block; }
  .process-heading h2 { white-space: normal; }
  .process-heading p { margin-top: 18px; }
  .process-heading .text-link { margin-top: 22px; }
  .refit-contact { padding-block: 55px; }
  .refit-contact h2 { font-size: 32px; }
  .story-dialog { padding-inline: 24px; }
  .story-dialog .button { font-size: 17px; gap: 15px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .story-card img { transition: none; }
  .story-card:hover img { transform: none; }
}
