/* Shared desktop/mobile scene, retaining the existing palette and composition. */
.hero-video-background {
  --hero-video-position: 74% 50%;
  --hero-media-height: 100svh;
  min-height: 100svh;
  height: auto;
  max-height: none;
}
.hero-video-background .hero-content { padding-top: 110px; padding-bottom: 90px; }
.hero-backdrop {
  position: absolute;
  inset: 0;
  background: #101010;
  pointer-events: none;
}
.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(72%, calc(var(--hero-media-height) * 1.55));
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 34%);
}
.hero-video-background .hero-poster,
.hero-video-background .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-video-position);
  animation: none;
  transform: none;
  filter: none;
}
.hero-video { opacity: 0; }
.hero-video-background.video-ready .hero-video { opacity: 1; }
html.lenis { scroll-behavior: auto; }
@media (max-width: 800px) {
  .hero-media { width: 100%; mask-image: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-background.video-ready .hero-video { opacity: 0; }
}


/* Keep the design consistent as the available width changes. */
.hero-video-background #hero-title { line-height: 1.04; }
.hero-video-background #hero-title span { color: inherit; }
.hero-video-background #hero-title .hero-title-accent { color: #C4A15A; }
.hero-title-line { display: block; width: fit-content; }
.hero-title-line > span { display: block; }
.hero-video-background .badge {
  border-color: rgba(196, 161, 90, 0.5);
  color: #e8ca90;
}
.hero-video-background .hero-description { max-width: 52ch; }
.hero-video-background .button-primary { box-shadow: 0 10px 26px rgb(0 0 0 / 28%); }
@media (max-width: 580px) {
  .hero-video-background #hero-title { font-size: clamp(1.65rem, 9.2vw, 3.25rem); }
  .hero-video-background #hero-title .hero-title-accent { font-size: 0.91em; }
}
@keyframes hero-title-in {
  from { opacity: 0; transform: translateY(0.8em); clip-path: inset(100% 0 0); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0 -3px -8px); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-video-background #hero-title { animation: none; }
  .hero-video-background:not(.scene-ready) .hero-title-line > span { animation: hero-title-in .9s cubic-bezier(.19,1,.22,1) both; }
  .hero-video-background.scene-ready :is(.badge, #hero-title, .hero-title-line > span, .hero-description, .button-row, .hero-points) { animation: none; }
  .hero-video-background #hero-title { transform-origin: left center; }
  .hero-video-background::after { content: ''; position: absolute; z-index: 2; inset: auto 0 0; height: 5px; background: #C4A15A; transform-origin: left; transform: scaleX(var(--hero-progress, 0)); pointer-events: none; }
  .hero-video-background .button-row a span { transition: transform .45s var(--ease); }
  .hero-video-background .button-row a:hover span { transform: translate(3px, -3px); }
}

/* Give the opening room to breathe while keeping its controls on a phone screen. */
@media (max-width: 580px) {
  .hero-video-background { min-height: 100svh; }
  .hero-video-background { align-items: center; }
  .hero-video-background .hero-content { padding-block: 86px 70px; }
  .hero-video-background #hero-title { margin-block: 14px; }
  .hero-video-background .hero-description { font-size: clamp(1rem, 4.4vw, 1.125rem); line-height: 1.5; }
}
@media (prefers-reduced-motion: no-preference) {
  .js-motion .section-heading h2,
  .js-motion .statement h2,
  .js-motion .project-heading h3 { transition: clip-path 1.1s var(--ease), transform 1.1s var(--ease); }
  .js-motion .section-heading:not(.visible) h2,
  .js-motion .statement-content:not(.visible) h2,
  .js-motion .project-heading:not(.visible) h3 { clip-path: inset(100% 0 0); transform: translateY(30px); }
  .js-motion .section-heading.visible h2,
  .js-motion .statement-content.visible h2,
  .js-motion .project-heading.visible h3 { clip-path: inset(0 0 -8px); transform: translateY(0); }
  .js-motion .service-panel .service-photo { clip-path: inset(0); transition: clip-path 1.15s var(--ease); }
  .js-motion .service-panel:not(.visible) .service-photo { clip-path: inset(0 0 100% 0); }
  .js-motion .service-panel .service-copy { transition: transform 1s .18s var(--ease), opacity .9s .18s; }
  .js-motion .service-panel:not(.visible) .service-copy { transform: translateY(36px); opacity: 0; }
  .js-motion :is(.values-grid, .process-grid, .gallery-grid) > .reveal:nth-child(2) { transition-delay: .12s; }
  .js-motion :is(.values-grid, .process-grid, .gallery-grid) > .reveal:nth-child(3) { transition-delay: .24s; }
}

/* The native scrollbar and wheel share the document's scroll position. */
html:has(.hero-scroll) { scrollbar-color: #c4a15a #1b1b1b; }
.hero-start-cue {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 17px 22px;
  color: white;
  background: #111111a6;
  border: 1px solid #ffffff56;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.hero-start-cue[hidden] { display: none; }
.hero-start-cue:focus-visible, .urgent-call:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.hero-video-background .hero-points {
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.25rem;
  gap: 7px;
  color: #f5f4f0;
}
.hero-video-background .hero-points li { display: block; min-width: 0; }
.hero-video-background .hero-points li::before { content: none; }
.hero-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  height: 100%;
  padding: 4px 10px;
  border: 1px solid #ffffff40;
  border-radius: 5px;
  background: #111c;
  font-size: .8125rem;
  line-height: 1.3;
  white-space: nowrap;
}
.hero-tag::before {
  content: '';
  flex: 0 0 5px;
  height: 5px;
  border-radius: 50%;
  background: #c4a15a;
}
.hero-urgent { color: #ffb6b6; border-color: #bd6767; background: #251315eb; }
.hero-urgent::before { background: #ff7272; box-shadow: 0 0 0 2px #ff727242; }
.hero-urgent:hover { background: #3e1d22; }
.hero-urgent:focus-visible { outline: 2px solid #ffb6b6; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-urgent::before { animation: urgent-pulse 2.4s ease-out infinite; }
  @keyframes urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 #ff727200; }
    22% { box-shadow: 0 0 0 2px #ff727279; }
    62% { box-shadow: 0 0 0 5px #ff727200; }
  }
}
@media (max-width: 800px) {
  .hero-video-background .hero-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 330px);
  }
  .hero-tag { gap: 6px; padding-inline: 8px; font-size: clamp(.6875rem, 3.4vw, .8125rem); }
  .hero-tag-detail { display: none; }
}
.urgent-call { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; }
.urgent-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #ff6262; box-shadow: 0 0 9px #ff6262a0; }
.urgent-label { display: inline-flex; align-items: center; gap: 7px; }
/* Keep each half of the call link intact even in a narrow desktop column. */
.contact-urgent {
  margin-top: 24px;
  max-width: 100%;
}
.contact-urgent .urgent-call {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 5px 18px;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  line-height: 1.4;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
}
.contact-urgent :is(.urgent-label, .urgent-number) { white-space: nowrap; }
.urgent-number { font-variant-numeric: tabular-nums; }
body:has(.hero-start-cue:not([hidden])) .header:not(:focus-within) {
  opacity: 0;
  pointer-events: none;
}
.header { transition: opacity .35s ease; }
.hero-video-background .button-outline { color: #fff; background-color: #111111d9; }
.hero-video-background .button-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  max-width: none;
  animation: none;
}
.hero-video-background .button-row .button { white-space: nowrap; }
.hero-quick-links { flex: none; }
#contact-form { scroll-margin-top: 104px; }
.inquiry-help { margin-bottom: 24px; }
.form-result .button { margin-bottom: 8px; }
@media (max-width: 580px) {
  .hero-video-background .button-row { margin-top: 20px; gap: 10px; }
  .hero-video-background .button-row .button { min-height: 46px; justify-content: center; gap: 9px; padding: 8px 11px; }
}
.hero-scroll-status:not(:empty) {
  position: absolute;
  z-index: 2;
  bottom: 9px;
  inset-inline: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  pointer-events: none;
}
@media (max-width: 580px) and (max-height: 680px) {
  .hero-video-background .hero-content { padding-block: 80px 64px; }
  .hero-video-background #hero-title { margin-block: 10px; }
  .hero-video-background .button-row { margin-top: 12px; gap: 6px; }
  .hero-video-background .button-row .button { min-height: 44px; padding-block: 7px; }
  .hero-video-background .hero-points { margin-top: 12px; gap: 6px; }
}

.values .line-icon,
.process-grid .step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.values .line-icon svg { width: 24px; height: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .values .visible .line-icon svg,
  .process-grid article.visible .step-number { animation: detail-marker-in .65s var(--ease) backwards; }
  .values article:nth-child(2) .line-icon svg,
  .process-grid article:nth-child(2) .step-number { animation-delay: .12s; }
  .values article:nth-child(3) .line-icon svg,
  .process-grid article:nth-child(3) .step-number { animation-delay: .24s; }
  @keyframes detail-marker-in {
    from { opacity: 0; transform: translateY(5px) scale(.82); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  .process-grid article { position: relative; }
  .process-grid article::before {
    content: ''; position: absolute; inset: 0 auto auto 0;
    width: 46px; height: 2px; background: var(--accent);
    transform: scaleX(0); transform-origin: left; transition: transform .65s ease;
  }
  .process-grid article.visible::before { transform: scaleX(1); }
  .gallery-card .gallery-arrow { transition: transform .25s ease; }
  .gallery-card:is(:hover, :focus-visible) .gallery-arrow { transform: translate(2px,-2px); }
}

@media (orientation: landscape) and (max-height: 520px) and (min-width: 480px) {
  .hero-video-background .hero-content {
    display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
    gap:8px clamp(12px,3vw,36px); align-items:center; padding-block:78px 56px;
  }
  .hero-content .badge {grid-area:1 / 1;justify-self:start; font-size:.69rem;}
  .hero-video-background #hero-title {grid-area:2 / 1; font-size:clamp(24px,4vw,38px); margin:0;}
  .hero-video-background .hero-description {grid-area:3 / 1; font-size:1rem; line-height:1.4; margin:0;}
  .hero-video-background .button-row { grid-area: 1 / 2 / 3 / 3; flex-wrap: wrap; gap: 8px; margin: 0; }
  .hero-video-background .button-row .button {min-height:44px; padding:6px 9px; justify-content:center;}
  .hero-video-background .hero-points { grid-area: 3 / 2; width: 100%; margin: 0; gap: 6px 12px; }
  .hero-tag { gap: 5px; }
}

@media (max-width: 800px) and (orientation: portrait) {
  .hero-video-background .hero-media {
    inset: 64px 0 0;
    height: auto;
  }
  .hero-video-background .hero-shade {
    background: linear-gradient(
      180deg,
      #111 0%, #111e 12%, #111b 24%, #1111 42%, #1111 69%, #111d 88%, #111 100%
    );
  }
  .hero-video-background .hero-content {
    display: grid;
    grid-template-rows: auto auto auto minmax(92px, 1fr) auto auto;
    align-content: stretch;
    min-height: 100svh;
    padding-block: 91px max(25px, calc(16px + env(safe-area-inset-bottom)));
  }
  .hero-video-background .badge { justify-self: start; }
  .hero-video-background #hero-title { margin-block: 12px; }
  .hero-video-background .hero-description { font-size: 1rem; line-height: 1.45; }
  .hero-video-background .button-row { grid-row: 5; margin: 0; }
  .hero-video-background .hero-points { grid-row: 6; margin-top: 14px; }
}

/* The services anchor remains stationary during the horizontal handoff. */
#usluge { position: relative; z-index: 1; }
main:has(.scene-ready) { overflow-x: clip; }
.hero-scroll:has(.scene-ready) { position: relative; z-index: 1; }
main:has(.scene-ready) #usluge { z-index: 0; background: #080808; }
.hero-wipe {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
  background: #080808;
  opacity: 0;
  visibility: hidden;
}
html.scene-rail { scrollbar-width: none; --rail-clearance: 18px; }
/* This anchor lands at the completed swipe; its heading already has section padding. */
html.scene-rail #usluge { scroll-margin-top: -90px; }
html.scene-rail::-webkit-scrollbar { display: none; }
.page-scroll-rail {
  --grip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32' fill='none' stroke='%23111111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 11 4-4 4 4m-8 10 4 4 4-4'/%3E%3C/svg%3E");
  position: fixed; z-index: 1000; inset: 0 0 auto auto;
  width: 18px; height: 100dvh; min-height: 0;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  appearance: none; writing-mode: vertical-lr; direction: ltr;
  background: #11111160; touch-action: none; cursor: ns-resize;
}
.page-scroll-rail::-webkit-slider-thumb {
  appearance: none; width: 16px; height: var(--thumb-height); border-radius: 9px;
  background: #c4a15a var(--grip) center / 13px 28px no-repeat;
}
.page-scroll-rail::-moz-range-thumb {
  width: 16px; height: var(--thumb-height); border: 0; border-radius: 9px;
  background: #c4a15a var(--grip) center / 13px 28px no-repeat;
}
.page-scroll-rail:is(.dragging, :focus-visible) { background-color: #111111aa; }
.page-scroll-rail:focus-visible { outline: 2px solid #c4a15a; outline-offset: -2px; }

@media (hover: none) and (pointer: coarse) {
  html.scene-rail { --rail-clearance: 0px; }
  .page-scroll-rail { display: none; }
}

.faq-list details p a { text-decoration: underline; text-underline-offset: 3px; }
