/* "Find your fit" on the Services page: the nudge button, the question panel and the lit service cards (service-finder.js). */

/* ── The nudge above the cards ── */
.finder-nudge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .75rem 1.25rem;
  margin: 0 0 1.5rem; padding: 0;
}
.finder-nudge__text { margin: 0; flex: 0 1 auto; font-size: .98rem; line-height: 1.5; color: #3A4452; }
.finder-nudge__text strong { font-family: var(--font-serif); font-weight: normal; font-size: 1.25rem; color: var(--navy); }
.finder-nudge__btn {
  font: inherit; font-family: var(--font-serif); font-size: .85rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: #C00000; color: #fff; border: 0; border-radius: var(--radius); padding: 12px 24px; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.finder-nudge__btn:hover { background: #9d0000; transform: translateY(-1px); }
.finder-nudge__btn:focus-visible, .sf-opt:focus-visible, .sf-reset:focus-visible, .sf-cta:focus-visible, .sf-close:focus-visible { outline: 3px solid #5c7ba3; outline-offset: 2px; }
.finder-nudge__btn[aria-expanded="true"] { background: #10222E; }

/* ── Layout: closed, the cards use the full width; open, the questions sit on the left and the cards go right, two in a row ── */
.services-layout.finder-on { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(0, 3fr); gap: 40px; align-items: start; }
.services-layout.finder-on .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 2rem; }
@media (max-width: 1100px) { .services-layout.finder-on .services-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .services-layout.finder-on { display: block; }
  .services-layout.finder-on .finder { margin-bottom: 2rem; position: static; max-height: none; }
}

/* ── The question panel ── */
.finder { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 4px; }
.finder[hidden] { display: none; }
.finder__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.sf-kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #5B6573; }
.finder h2 { font-family: var(--font-serif); font-weight: normal; font-size: 1.6rem; color: var(--navy); margin: .2rem 0 .3rem; line-height: 1.2; }
.finder__sub { margin: 0; font-size: .9rem; color: #5B6573; }
.sf-close { flex: none; background: none; border: 1px solid #D9DDE3; border-radius: var(--radius); font: inherit; font-size: .8rem; color: #3A4452; padding: 6px 12px; cursor: pointer; }
.sf-close:hover { border-color: var(--navy); }

.sf-step { position: relative; padding: 0 0 28px 44px; transition: opacity .25s; }
.sf-step::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; border-left: 1px solid #D9DDE3; }
.sf-step:last-of-type::before { display: none; }
.sf-dot {
  position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%; border: 1px solid #D9DDE3; background: #fff;
  font: 600 .8rem var(--font-sans); display: grid; place-items: center; color: #5B6573; transition: all .25s;
}
.sf-step.active .sf-dot { border-color: #C00000; background: #C00000; color: #fff; box-shadow: 0 0 0 5px rgba(192, 0, 0, .12); }
.sf-step.done .sf-dot { border-color: var(--navy); background: var(--navy); color: #fff; }
.sf-step.done::before { border-left-color: var(--navy); }
.sf-step.locked { opacity: .35; pointer-events: none; }
.sf-step h3 { font-family: var(--font-serif); font-weight: normal; font-size: 1.25rem; color: var(--navy); margin: 0 0 12px; line-height: 1.3; }
.sf-step.active h3 { color: #C00000; }
.sf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-opt {
  font: 500 .88rem var(--font-sans); color: #0B0F14; background: #fff; border: 1px solid #D9DDE3; border-radius: var(--radius);
  padding: 9px 14px; cursor: pointer; text-align: left; transition: all .15s;
}
.sf-opt:hover { border-color: var(--navy); box-shadow: 0 2px 8px rgba(16, 34, 46, .10); }
.sf-opt.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.sf-step.done .sf-opt:not(.sel) { color: #5B6573; }
.sf-note { font-size: .85rem; color: #5B6573; margin: 4px 0 0 44px; font-style: italic; }

.sf-result { display: none; margin-top: 8px; border-top: 3px solid #C00000; padding-top: 16px; }
.sf-result.show { display: block; animation: sf-rise .35s ease; }
@keyframes sf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sf-result h3 { font-family: var(--font-serif); font-weight: normal; font-size: 1.7rem; color: var(--navy); margin: 4px 0 8px; line-height: 1.15; }
.sf-result p { margin: 0 0 10px; font-size: .95rem; line-height: 1.55; color: #3A4452; }
.sf-meta { font-size: .85rem !important; color: #5B6573 !important; }
.sf-cta { display: inline-block; margin-top: 4px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 11px 18px; border-radius: var(--radius); }
.sf-cta:hover { box-shadow: 0 4px 12px rgba(16, 34, 46, .25); }
.sf-reset { background: none; border: 0; color: #2C5F8A; font: 500 .85rem var(--font-sans); cursor: pointer; padding: 0; margin-left: 14px; text-decoration: underline; }
.sf-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .75rem; color: #5B6573; margin: 6px 0 0 44px; }
.sf-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sf-legend .l1::before { background: #2C5F8A; }
.sf-legend .l2::before { background: #C00000; }
.sf-legend .l3::before { border: 1px solid #5B6573; }

/* ── The service cards, lit by the answers (set by service-finder.js; nothing shows until the first answer) ── */
.service-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s, opacity .25s, background .25s; }
.service-card.fit-out { opacity: .38; filter: grayscale(.7); }
.service-card.fit-live { border-color: #2C5F8A; box-shadow: 0 0 0 1px #2C5F8A; }
.service-card.fit-also { border-color: #2C5F8A; box-shadow: 0 0 0 1px #2C5F8A; border-style: dashed; }
.service-card.fit-best { border-color: #C00000; background: #FFF6F6; box-shadow: 0 0 0 2px #C00000, 0 10px 26px rgba(192, 0, 0, .14); }
.service-card.fit-best .service-title { color: #C00000; }
.service-card[data-flag]::after {
  content: attr(data-flag); position: absolute; top: 0; left: 0; padding: 3px 10px; border-radius: 0 0 4px 0;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: #C00000;
}
.service-card.fit-also[data-flag]::after { background: #2C5F8A; }

@media (prefers-reduced-motion: reduce) { .service-card, .finder-nudge__btn, .sf-step, .sf-dot, .sf-opt { transition: none; } .sf-result.show { animation: none; } }
