/* =========================================================
   Interactive components — Services, Work, Contact
   ========================================================= */

/* ---------- Counters ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .st-i { padding: 30px 0; }
.stats .st-i + .st-i { padding-left: 26px; border-left: 1px solid var(--line); }
.stats .num { font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4.4rem); line-height: 1; display: block; }
.stats .lbl { font-size: .86rem; color: var(--muted); margin-top: 8px; display: block; }
@media (max-width: 767.98px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .st-i:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats .st-i:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Services: list + sticky preview ---------- */
.svx { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.svx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: svc; }
.svx-row { border-bottom: 1px solid var(--line); }
.svx-btn {
  width: 100%; background: transparent; border: 0; text-align: left; padding: 26px 0; display: grid;
  grid-template-columns: 56px 1fr 40px; align-items: center; gap: 12px; color: #b3ada2; transition: color .4s var(--ease);
}
.svx-btn .n { font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
.svx-btn .t { font-family: var(--serif); font-size: clamp(1.8rem, 3.2vw, 2.9rem); line-height: 1.05; transition: transform .6s var(--ease); }
.svx-btn .ic { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all .45s var(--ease); justify-self: end; }
.svx-row.active .svx-btn, .svx-btn:hover { color: var(--ink); }
.svx-row.active .svx-btn .t { transform: translateX(12px); }
.svx-row.active .svx-btn .ic { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: rotate(-45deg); }
.svx-inline { display: none; }
.svx-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.svx-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2); }
.svx-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .7s var(--ease), transform 1.4s var(--ease); }
.svx-media img.on { opacity: 1; transform: scale(1); }
.svx-media .idx { position: absolute; left: 16px; bottom: 14px; color: #fff; font-family: var(--serif); font-size: 3.4rem; line-height: 1; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.svx-body { padding-top: 24px; min-height: 230px; }
.svx-body > * { animation: svxIn .6s var(--ease) both; }
.svx-body ul { padding-left: 1.1em; color: var(--ink-2); margin: 14px 0 20px; }
@keyframes svxIn { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 991.98px) {
  .svx { grid-template-columns: 1fr; }
  .svx-panel { display: none; }
  .svx-inline { display: block; max-height: 0; overflow: hidden; transition: max-height .7s var(--ease); }
  .svx-row.active .svx-inline { max-height: 900px; }
  .svx-inline .inner { padding: 0 0 28px; }
  .svx-inline img { aspect-ratio: 16/10; object-fit: cover; width: 100%; margin-bottom: 18px; }
  .svx-inline ul { padding-left: 1.1em; color: var(--ink-2); }
}

/* ---------- Before / after slider ---------- */
.ba-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ba-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 16px; font-size: .86rem; font-weight: 500; transition: all .3s; }
.ba-tabs button.active, .ba-tabs button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.compare { --pos: 50%; position: relative; aspect-ratio: 16/9; overflow: hidden; background: #ddd; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: opacity .5s; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; box-shadow: 0 0 20px rgba(0,0,0,.25); }
.compare .knob {
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%);
  display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: transform .3s var(--ease);
}
.compare:active .knob { transform: translate(-50%, -50%) scale(.9); }
.compare .tag-b, .compare .tag-a {
  position: absolute; top: 16px; padding: 6px 12px; background: rgba(21,21,21,.75); color: #fff; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; pointer-events: none;
}
.compare .tag-b { left: 16px; } .compare .tag-a { right: 16px; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; -webkit-appearance: none; appearance: none; }
.compare input[type=range]:focus-visible + .handle .knob { outline: 3px solid var(--accent); }
.compare.loading img { opacity: .35; }
@media (max-width: 575.98px) { .compare { aspect-ratio: 4/3; } }

/* ---------- Process stepper ---------- */
.stepper-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.stepper-nav button { background: transparent; border: 0; text-align: left; padding: 0 0 18px; color: var(--muted); position: relative; transition: color .3s; }
.stepper-nav button .k { font-family: var(--serif); font-size: 2.4rem; line-height: 1; display: block; }
.stepper-nav button .l { font-weight: 700; font-size: .95rem; }
.stepper-nav button .track { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); overflow: hidden; }
.stepper-nav button .track i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.stepper-nav button.active { color: var(--ink); }
.stepper-nav button.active .track i { animation: stepFill 6s linear forwards; }
.stepper-nav button.done .track i { transform: scaleX(1); }
.stepper:hover .stepper-nav button.active .track i { animation-play-state: paused; }
@keyframes stepFill { to { transform: scaleX(1); } }
.stepper-panels { position: relative; margin-top: 30px; min-height: 280px; }
.stepper-panel { display: none; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.stepper-panel.active { display: grid; animation: svxIn .7s var(--ease) both; }
.stepper-panel .ph { aspect-ratio: 16/10; overflow: hidden; }
.stepper-panel .ph img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 8s ease-out both; }
.stepper-panel h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.05; }
.stepper-panel ul { padding-left: 1.1em; color: var(--ink-2); }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@media (max-width: 767.98px) {
  .stepper-nav { grid-template-columns: repeat(4, 1fr); }
  .stepper-nav button .k { font-size: 1.6rem; }
  .stepper-nav button .l { font-size: .74rem; }
  .stepper-panel { grid-template-columns: 1fr; }
}

/* ---------- Service finder ---------- */
.finder { background: var(--paper-2); padding: clamp(30px, 5vw, 64px); }
.finder .q { margin-bottom: 26px; }
.finder .q .qt { font-weight: 700; margin-bottom: 12px; display: block; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chipset input { position: absolute; opacity: 0; pointer-events: none; }
.chipset label {
  border: 1px solid #cbc5b9; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-size: .9rem; background: var(--paper); transition: all .3s var(--ease);
}
.chipset label:hover { border-color: var(--ink); }
.chipset input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chipset input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.finder-result { background: var(--ink); color: var(--paper); padding: clamp(26px, 4vw, 44px); height: 100%; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.finder-result .muted { color: #a9a49a; }
.finder-result h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; margin: 12px 0; }
.finder-result.flash > * { animation: svxIn .55s var(--ease) both; }

/* ---------- Work toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(30px, 4vw, 54px); position: sticky; top: var(--header-h); z-index: 50; background: rgba(245,243,238,.94); backdrop-filter: blur(8px); transition: top .5s var(--ease); }
.site-header.hide ~ main .toolbar { top: 0; }
.toolbar .filters { margin: 0; }
.toolbar .filters button sup { font-size: .68rem; margin-left: 3px; opacity: .6; }
.tools-r { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { position: relative; }
.search input { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px 8px 38px; font: inherit; font-size: .9rem; width: 210px; outline: none; transition: border-color .3s, width .5s var(--ease); }
.search input:focus { border-color: var(--ink); width: 250px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.sort { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; outline: none; }
.views { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.views button { border: 0; background: transparent; width: 36px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); transition: all .3s; }
.views button.active { background: var(--ink); color: var(--paper); }
.result-count { font-size: .85rem; color: var(--muted); }
@media (max-width: 767.98px) {
  .toolbar { position: static; }
  .tools-r { width: 100%; }
  .search { flex: 1; }
  .search input, .search input:focus { width: 100%; }
  .toolbar .filters { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 4px; }
  .toolbar .filters button { white-space: nowrap; }
}

/* ---------- Work cards (interactive) ---------- */
.cards.flat .card-p { margin-top: 0 !important; }
.wcard { position: relative; }
.wcard .media { perspective: 900px; }
.wcard .stack { position: absolute; inset: 0; transition: transform .5s var(--ease); transform-style: preserve-3d; }
.wcard .stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease), transform 1.2s var(--ease); filter: none; }
.wcard .stack img.on { opacity: 1; }
.wcard:hover .stack img.on { transform: scale(1.05); }
.wcard .dots { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .4s; }
.wcard .dots i { flex: 1; height: 2px; background: rgba(255,255,255,.45); position: relative; overflow: hidden; }
.wcard .dots i.on::after { content: ""; position: absolute; inset: 0; background: #fff; animation: dotFill 1.1s linear forwards; }
.wcard .dots i.seen { background: #fff; }
@keyframes dotFill { from { transform: translateX(-100%); } }
.wcard:hover .dots { opacity: 1; }
.wcard .qv {
  position: absolute; top: 12px; right: 12px; z-index: 3; border: 0; background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translateY(-8px); transition: all .4s var(--ease);
}
.wcard:hover .qv, .wcard .qv:focus-visible { opacity: 1; transform: none; }
.wcard .qv:hover { background: var(--ink); color: var(--paper); }
.wcard .loc { font-size: .82rem; color: var(--muted); }
@media (hover: none) { .wcard .qv { opacity: 1; transform: none; } }
.card-p.leaving { display: none; }
.empty-state { display: none; text-align: center; padding: 80px 0; }
.empty-state.show { display: block; animation: svxIn .5s var(--ease); }
.empty-state .serif { font-size: 2.4rem; }

/* list view */
.view-list .cards { grid-template-columns: 1fr; gap: 0; }
.view-list .wcard { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.view-list .wcard .media { aspect-ratio: 16/10; }
.view-list .wcard .meta { margin-top: 0; }
.view-list .wcard .meta .code { font-size: 2.8rem; }
.view-list .wcard .tag { display: none; }
@media (max-width: 575.98px) { .view-list .wcard { grid-template-columns: 120px 1fr; gap: 16px; } .view-list .wcard .meta .code { font-size: 1.8rem; } }

/* slider view */
.view-slider .cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 24px; padding-bottom: 24px; cursor: grab; scrollbar-width: thin; }
.view-slider .cards.dragging { cursor: grabbing; scroll-snap-type: none; }
.view-slider .cards.dragging * { pointer-events: none; }
.view-slider .wcard { flex: 0 0 min(560px, 82vw); scroll-snap-align: start; }
.view-slider .wcard .media { aspect-ratio: 4/5; }
.slider-hint { display: none; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.view-slider .slider-hint { display: block; }

/* quick-view modal */
.qv-modal .modal-content { background: var(--paper); border: 0; border-radius: 0; }
.qv-modal .modal-dialog { max-width: 1100px; }
.qv-modal .carousel-item img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.qv-modal .btn-close { position: absolute; top: 14px; right: 14px; z-index: 5; background-color: var(--paper); border-radius: 50%; padding: 12px; opacity: 1; }
.qv-modal .qv-code { font-family: var(--serif); font-size: 4rem; line-height: .9; }
.qv-modal .carousel-indicators [data-bs-target] { width: 22px; height: 2px; }
.qv-modal .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qv-modal .facts strong { display: block; font-weight: 600; font-size: .95rem; }

/* ---------- Contact: live status + copy ---------- */
.live { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .88rem; }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: #a4a097; position: relative; }
.live.open .dot { background: #3f8f5a; }
.live.open .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid #3f8f5a; animation: pulse 1.8s var(--ease) infinite; }
.live .clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.copy-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: .78rem; font-weight: 600; margin-left: 10px; transition: all .3s; }
.copy-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.toast-x { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px; font-size: .9rem; z-index: 1600; transition: transform .5s var(--ease); }
.toast-x.show { transform: translate(-50%, 0); }

/* ---------- Contact wizard ---------- */
.wizard { background: var(--white); padding: clamp(24px, 4vw, 52px); box-shadow: 0 30px 80px -40px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.wz-head { display: flex; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.wz-head span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #bdb7ab; transition: color .3s; }
.wz-head span.on { color: var(--ink); }
.wz-progress { height: 2px; background: var(--line); margin-bottom: 36px; position: relative; overflow: hidden; }
.wz-progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(.25); transition: transform .6s var(--ease); }
.wz-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; }
.wz-step.active { display: block; animation: wzIn .55s var(--ease) both; }
.wz-step.back { animation-name: wzBack; }
@keyframes wzIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes wzBack { from { opacity: 0; transform: translateX(-30px); } }
.wz-step legend { font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.05; margin-bottom: 24px; float: none; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid label {
  position: static !important; display: block; border: 1px solid var(--line); padding: 18px 16px; cursor: pointer; pointer-events: auto !important; height: 100%;
  font-size: .92rem !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important; transition: all .35s var(--ease); background: var(--paper);
}
.choice-grid label svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.2; margin-bottom: 14px; display: block; transition: transform .5s var(--ease); }
.choice-grid label b { display: block; font-weight: 700; margin-bottom: 3px; }
.choice-grid label small { color: var(--muted); font-size: .8rem; line-height: 1.4; display: block; }
.choice-grid label:hover { border-color: var(--ink); transform: translateY(-3px); }
.choice-grid label:hover svg { transform: scale(1.1) rotate(-4deg); }
.choice-grid input:checked + label { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.choice-grid input:checked + label small { color: #bdb7ab; }
.choice-grid input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; margin: 0 0 10px; }
.wz-label output { color: var(--ink); font-size: .95rem; letter-spacing: 0; text-transform: none; }
.wz-block { margin-bottom: 28px; }
.range-x { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: linear-gradient(to right, var(--ink) var(--fill, 30%), var(--line) var(--fill, 30%)); outline: none; padding: 0 !important; border: 0 !important; }
.range-x::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); cursor: grab; transition: transform .2s; }
.range-x::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.range-x::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); cursor: grab; }
.range-scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 8px; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 12px; }
.wz-nav .back { border: 0; background: transparent; font-weight: 600; color: var(--muted); padding: 10px 0; visibility: hidden; }
.wz-nav .back.show { visibility: visible; }
.wz-nav .back:hover { color: var(--ink); }
.wz-err { color: var(--accent); font-size: .88rem; margin-top: 14px; display: none; }
.wz-err.show { display: block; animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.review { margin: 0; }
.review div { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); align-items: baseline; }
.review div:last-child { border-bottom: 1px solid var(--line); }
.review dt { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.review dd { margin: 0; }
.review .edit { border: 0; background: transparent; font-size: .8rem; text-decoration: underline; color: var(--muted); }
.review .edit:hover { color: var(--ink); }
@media (max-width: 575.98px) { .review div { grid-template-columns: 1fr auto; } .review dd { grid-column: 1 / -1; grid-row: 2; } }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: .88rem; color: var(--ink-2); }
.consent input { width: 18px !important; height: 18px; margin-top: 3px; accent-color: var(--ink); padding: 0 !important; }
.wz-done { display: none; text-align: center; padding: 40px 0; }
.wz-done.show { display: block; animation: svxIn .6s var(--ease); }
.wz-done svg { width: 84px; height: 84px; }
.wz-done circle { stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw .8s var(--ease) forwards; }
.wz-done path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wizard.sent .wz-head, .wizard.sent .wz-progress, .wizard.sent .wz-step, .wizard.sent .wz-nav { display: none !important; }
.faq .accordion-button .jt { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.faq .accordion-button { grid-template-columns: 1fr auto; }

/* chips inside form-x override the floating-label rules */
.form-x .chipset label { position: static; top: auto; pointer-events: auto; color: var(--ink); font-size: .9rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.form-x .chipset input:checked + label { color: var(--paper); }
.form-x label.consent { position: static; top: auto; pointer-events: auto; color: var(--ink-2); font-size: .88rem; letter-spacing: 0; text-transform: none; font-weight: 400; cursor: pointer; }
@media (min-width: 992px) {
  .qv-modal .carousel, .qv-modal .carousel-inner, .qv-modal .carousel-item { height: 100%; }
  .qv-modal .carousel-item img { height: 100%; min-height: 520px; aspect-ratio: auto; }
}
@media (max-width: 767.98px) {
  .tools-r .search { flex: 1 1 100%; }
  .tools-r .sort { flex: 1; }
}
