/* ==========================================================================
   HEMFRY - Kontakt (page layer, loaded after hemfry.css)
   Reuses system: .page-hero, .form-panel, .stepper, .field, .choice(s),
   .chip, .upload, .form-actions, .specs, .alt-contact, .media.
   ========================================================================== */

/* Global sticky bar is hidden on this page: on mobile the form's own sticky
   actions (Nazad / Dalje) take its place, and "Pozovi" stays one tap away in
   the header (.header-call) and in the hero contact block. Two stacked
   bottom bars would collide and halve the usable viewport. */
body[data-page="kontakt"] {
  --sticky-bar-h: 0px;
}
body[data-page="kontakt"] .sticky-bar {
  display: none;
}

/* hidden must win over system display rules (.btn, .field, …) */
.kf [hidden] {
  display: none !important;
}

/* 01 - HERO ---------------------------------------------------------------- */
.kontakt-hero {
  padding-bottom: clamp(72px, 8vw, 136px);
}
.kontakt-hero__title {
  font-size: clamp(2.5rem, 1.35rem + 3.1vw, 4.5rem);
}
.kontakt-hero .page-hero__lead {
  max-width: 38ch;
}
@media (min-width: 1100px) {
  .kontakt-hero__copy {
    padding-right: clamp(0px, 2.4vw, 40px);
  }
}

.kontakt-data {
  margin-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--ink);
}
.kontakt-phone {
  display: block;
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--line);
}
.kontakt-phone .mono {
  color: var(--fg);
}
.kontakt-phone strong {
  display: block;
  width: fit-content;
  margin-top: 12px;
  padding-bottom: 4px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 680;
  font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
  letter-spacing: -0.028em;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px
    no-repeat;
  transition: background-size var(--t) var(--ease);
}
.kontakt-phone:hover strong {
  background-size: 100% 3px;
}
.kontakt-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kontakt-list__row {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
}
.kontakt-list__row--wide {
  grid-column: 1 / -1;
}
.kontakt-list__row--wide + .kontakt-list__row + .kontakt-list__row {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.kontakt-list dt {
  color: var(--fg-faint);
}
.kontakt-list dd {
  margin-top: 6px;
  font-size: 1.0625rem;
  font-weight: 500;
}
.kontakt-list dd a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px
    no-repeat;
  transition: background-size var(--t) var(--ease);
}
.kontakt-list dd a:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

/* 02 - FORM SHELL ---------------------------------------------------------- */
.kf {
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.kf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}
.kf-head__title {
  color: var(--fg);
}
.kf-head__count {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.kf-stepper {
  margin-bottom: clamp(36px, 4.4vw, 56px);
}
.kf-stepper__btn {
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  align-content: start;
  padding-top: 4px;
  text-align: left;
  cursor: pointer;
}
.kf-stepper__btn[disabled] {
  cursor: default;
}
.kf-stepper__btn:not([disabled]):not([aria-current]):hover .stepper__meta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Steps */
.kf-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.kf-step > * + * {
  margin-top: 28px;
}
.kf-step > .kf-legend + .kf-hint {
  margin-top: 12px;
}
.kf-legend {
  display: block;
  width: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 690;
  font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.5rem);
  letter-spacing: -0.028em;
  line-height: 1.04;
  color: var(--fg);
  text-wrap: balance;
}
.kf-legend:focus,
.kf-legend:focus-visible {
  outline: none;
}
.kf-hint {
  color: var(--fg-muted);
  font-size: var(--fs-small);
  max-width: 58ch;
  text-wrap: pretty;
}

.kf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 700px) {
  .kf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
  }
  .kf-full {
    grid-column: 1 / -1;
  }
}
.kf-detail > * + *,
.kf-common > * + * {
  margin-top: 28px;
}
.kf-common {
  margin-top: 36px !important;
  padding-top: 32px;
  border-top: 1px dashed var(--line-strong);
}
.kf-date {
  max-width: 320px;
}

.field__error::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--danger);
}

/* Service tiles (step 1) */
.choice__desc {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--fg-muted);
}
.kf-services .choice__box {
  min-height: 136px;
}
.kf-services .choice__title {
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
}
.kf .choice input:checked + .choice__box {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.kf .choice input:checked + .choice__box .mono {
  color: var(--fg);
}

/* Compact choices (2 × 2) */
.kf-choices-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) {
  .kf-choices-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.kf .choices--compact .choice__box {
  min-height: 60px;
  padding: 12px 16px;
  gap: 12px;
}
.kf .choices--compact .choice__title {
  font-family: var(--font-body);
  font-stretch: 100%;
  font-weight: 550;
  font-size: 0.9375rem;
  letter-spacing: 0;
  line-height: 1.3;
}

/* Pills - radio / checkbox rendered with the system .chip */
.kf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kf-pill {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.kf-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.kf-pill .chip {
  background: var(--surface);
  white-space: normal;
  text-align: left;
  line-height: 1.25;
  padding-block: 10px;
}
@media (hover: hover) {
  .kf-pill:hover .chip {
    border-color: var(--fg);
  }
}
@media (hover: none) {
  .kf-pill .chip:hover {
    border-color: var(--line-strong);
  }
}
.kf input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
}
.kf-pill input:checked + .chip {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.kf-pill input:focus-visible + .chip {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.kf-pill--check .chip::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: -4px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
}
.kf-pill--check input:checked + .chip::before {
  border-color: var(--ink);
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23f7bf2e' stroke-width='2.6'%3E%3Cpath d='m4.5 10.5 3.5 3.5 7.5-8'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Invalid states for groups */
.field.is-invalid .choice__box,
.field.is-invalid .kf-pill .chip,
.field.is-invalid .kf-check__box {
  border-color: var(--danger);
}

/* Quantity + unit, dimensions */
.kf-qty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}
.kf-dims {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.kf-dims .input {
  padding-left: 12px;
  padding-right: 30px;
}
.kf-dims .input-unit__u {
  right: 12px;
}
.kf-dims__x {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg-faint);
}

/* Upload (step 4) */
.kf-drop {
  min-height: 220px;
}
.kf-drop .upload__title {
  max-width: 32ch;
}
.kf-mob {
  display: none;
}
.kf-camera {
  display: none;
  margin-top: 10px;
  gap: 10px;
}
.kf-camera svg {
  width: 18px;
  height: 18px;
}
@media (hover: none) and (pointer: coarse) {
  .kf-desk {
    display: none;
  }
  .kf-mob {
    display: inline;
  }
  .kf-camera {
    display: inline-flex;
  }
  .kf-drop {
    min-height: 180px;
  }
}
.kf-upload-msg {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}
.kf-upload-msg:empty {
  display: none;
}
.kf-upload-msg.is-warn {
  color: var(--danger);
}
.kf-thumbs {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}
.kf-thumbs:empty {
  display: none;
}
.kf-thumbs .upload-thumb button {
  width: 32px;
  height: 32px;
}
.kf-thumbs .upload-thumb button:hover {
  background: var(--danger);
}
.kf-thumb__n {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: var(--r-xs);
  background: rgba(17, 17, 17, 0.8);
  color: var(--paper);
  font-size: 0.625rem;
}
.kf-thumb__fb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.upload-thumb.is-new {
  animation: kf-pop 420ms var(--ease) both;
}
.kf-tips {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.kf-tips__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  counter-reset: none;
}
.kf-tips__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.kf-tips__list .mono {
  padding-top: 2px;
  color: var(--fg);
}
@media (min-width: 700px) {
  .kf-tips__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Recap (step 5) */
.kf-recap {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--paper-2);
}
.kf-recap > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
}
.kf-recap > div + div {
  border-top: 1px solid var(--line);
}
.kf-recap dt {
  color: var(--fg-faint);
}
.kf-recap dd {
  font-size: 0.9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.kf-recap__edit {
  min-height: 36px;
  padding: 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--fg-muted);
}
.kf-recap__edit:hover {
  color: var(--fg);
}

/* Consent */
.kf-check {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.kf-check input {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.kf-check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: transparent;
  transition:
    background-color var(--t-fast),
    border-color var(--t-fast);
}
.kf-check__box svg {
  width: 16px;
  height: 16px;
}
.kf-check:hover .kf-check__box {
  border-color: var(--fg);
}
.kf-check input:checked + .kf-check__box {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--ink);
}
.kf-check input:focus-visible + .kf-check__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.kf-check__text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--fg-muted);
  padding-top: 1px;
}
.kf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Actions */
.kf-actions {
  margin-top: clamp(36px, 4vw, 48px);
}
.kf-actions__meta {
  margin-right: auto;
}
.kf-back {
  gap: 10px;
  padding: 6px 22px 6px 16px;
}
.kf-back svg {
  width: 18px;
  height: 18px;
}
.kf-next {
  min-width: 210px;
}

/* Step transitions (system reduced-motion + ?static rules neutralise these) */
@keyframes kf-in {
  from {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kf-in-back {
  from {
    opacity: 0;
    transform: translate3d(-20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kf-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kf-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.kf-step.is-enter {
  animation: kf-in 560ms var(--ease) both;
}
.kf-step.is-enter-back {
  animation: kf-in-back 560ms var(--ease) both;
}
.kf-detail.is-enter,
.kf-date.is-enter {
  animation: kf-rise 480ms var(--ease) both;
}
.kf-success.is-enter {
  animation: kf-rise 720ms var(--ease) both;
}

/* Success */
.kf-success {
  position: relative;
  margin: calc(clamp(20px, 3.4vw, 48px) * -1);
  padding: clamp(36px, 4.4vw, 64px) clamp(20px, 3.4vw, 48px)
    clamp(24px, 3.4vw, 48px);
}
.kf-success:focus {
  outline: none;
}
.kf-success .chevrons {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
.kf-success__ref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}
.kf-success__dot {
  width: 8px;
  height: 8px;
  background: var(--ok);
}
.kf-success__title {
  margin-top: 20px;
  font-size: clamp(2rem, 1.3rem + 2.3vw, 3.5rem);
}
.kf-success__sum {
  margin-top: 32px;
}
.kf-success__sum .specs__row {
  grid-template-columns: 110px minmax(0, 1fr);
}
.kf-success__sum dd {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.kf-next-steps {
  margin-top: 36px;
}
.kf-next-steps ol {
  display: grid;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.kf-next-steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.kf-next-steps li > .mono {
  padding-top: 3px;
  color: var(--fg-faint);
}
.kf-next-steps strong {
  display: block;
  font-weight: 600;
}
.kf-next-steps li > div > span {
  display: block;
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.kf-success__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
}
.kf-success__phone {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 680;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  letter-spacing: -0.022em;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px
    no-repeat;
}

/* Reassurance under the form */
.kf-assure {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 20px;
}
.kf-assure li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}
.kf-assure svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--fg);
}

/* 03 - MAP & LOCATIONS ----------------------------------------------------- */
.kontakt-map {
  background-color: var(--paper-3);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
.kontakt-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.06) brightness(1.02);
}
.kontakt-map__tag {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-xs);
  pointer-events: none;
}
.kontakt-map__dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
}
.kontakt-map__cap {
  align-items: center;
}
.kontakt-map__cap .link {
  min-height: 0;
  padding-block: 2px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}
.kontakt-locs {
  border-top: 1px solid var(--ink);
}
.kontakt-locs__item {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--line);
}
.kontakt-locs__item .specs__row:last-child {
  border-bottom: 0;
}
.kontakt-locs__item:has(> .specs:last-child) {
  padding-bottom: 0;
}
.kontakt-locs__idx {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--fg-muted);
}
.kontakt-locs__idx span {
  color: var(--fg-faint);
}
.kontakt-locs .specs__row dd a:hover {
  color: var(--fg-muted);
}
.kontakt-locs__area {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
}
.kontakt-locs__area strong {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 680;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}
@media (max-width: 1099px) {
  .kontakt-locs {
    margin-top: 32px;
  }
}
@media (max-width: 699px) {
  .kontakt-map {
    aspect-ratio: 4 / 3;
  }
}

/* 04 - ALT CONTACT --------------------------------------------------------- */
.kontakt-alt .alt-contact strong {
  overflow-wrap: anywhere;
}

/* MOBILE ------------------------------------------------------------------- */
@media (max-width: 1099px) {
  .kontakt-hero__form {
    margin-top: 24px;
  }
}
@media (max-width: 699px) {
  .kontakt-hero {
    padding-bottom: 56px;
  }
  .kontakt-hero .breadcrumb {
    margin-bottom: 24px;
  }
  .kontakt-hero .page-hero__lead {
    font-size: 1.0625rem;
  }
  .kontakt-data {
    margin-top: 28px;
  }
  .kontakt-phone {
    padding-block: 16px 18px;
  }
  .kf.form-panel {
    margin-inline: calc(var(--gutter) * -1);
    border-inline: 0;
    border-radius: 0;
  }
  .kf-head__title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .kf-head {
    margin-bottom: 14px;
  }
  .kf-stepper {
    margin-bottom: 28px;
  }
  .kf-services .choice__box {
    min-height: 118px;
    padding: 14px;
    gap: 14px;
  }
  .kf-actions {
    z-index: 5;
  }
  .kf-actions__meta {
    display: none;
  }
  .kf-back {
    width: 52px;
    padding: 0;
    justify-content: center;
    flex: none;
  }
  .kf-back__t {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .kf-next {
    min-width: 0;
  }
  .kf-recap > div {
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 8px;
    padding-left: 12px;
  }
  .kontakt-list__row {
    padding-block: 12px;
  }
  .kontakt-list dd {
    font-size: 1rem;
  }
  .kontakt-hours__sep {
    display: none;
  }
  .kontakt-hours .nowrap {
    display: block;
  }
  .kf-success__foot .btn {
    width: 100%;
  }
  .kf-assure {
    flex-direction: column;
  }
}
