/* Codrops-inspired hero: clip-path window + sliced unreveal.
   Shape Slideshow / Sliced Image Hover — CSS + vanilla JS, no CDN. */

.hero-invest {
  --hero-ease: cubic-bezier(0.77, 0, 0.175, 1);
  --hero-ink: #f4efe6;
  --hero-muted: rgba(244, 239, 230, 0.78);
  color: var(--hero-ink);
}

.hero-invest .hero-content {
  padding-bottom: 2.6rem;
}

.hero-invest .hero-brand { display: none; }

.hero-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-invest h1 {
  max-width: none;
  font-size: clamp(2.35rem, 7.2vw, 5.1rem);
  line-height: 0.98;
}

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line span {
  display: block;
  transform: translate3d(0, 110%, 0);
  animation: heroLineUp 0.95s var(--hero-ease) forwards;
}

.hero-line:nth-child(2) span { animation-delay: 0.12s; }

.hero-invest .hero-lead {
  max-width: 34rem;
  margin-top: 0.85rem;
  color: var(--hero-muted);
  opacity: 0;
  animation: heroFade 0.7s ease 0.45s forwards;
}

.hero-invest .hero-cta,
.hero-invest .hero-form {
  opacity: 0;
  animation: heroFade 0.7s ease 0.62s forwards;
}

.hero-invest .hero-phone,
.hero-invest .hero-phone a {
  color: var(--hero-ink);
}

.hero-invest .form-check { color: var(--hero-muted); }
.hero-invest .form-check a { color: var(--accent); }

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  clip-path: inset(12% 16% 24% 8% round 2rem);
  transition: clip-path 1.2s var(--hero-ease);
}

.hero-stage.is-open {
  clip-path: inset(0);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  margin: 0;
  opacity: 0;
  pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 1.15s var(--hero-ease);
}

.hero-slide.is-current {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hero-slide.is-exit {
  opacity: 1;
  z-index: 2;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
}

.hero-slide.is-enter {
  opacity: 1;
  z-index: 1;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.hero-slide.is-enter.is-current {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.hero-slide-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

.hero-slide.has-slices .hero-slide-fallback { display: none; }

.hero-slices {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-slice {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  animation: heroSliceIn 0.95s var(--hero-ease) both;
  animation-delay: calc(var(--i) * 75ms + 80ms);
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 20, 17, 0.46), rgba(12, 20, 17, 0.12) 36%, rgba(12, 20, 17, 0.9)),
    linear-gradient(90deg, rgba(12, 20, 17, 0.62), transparent 58%);
}

.hero-caption {
  position: absolute;
  right: max(1.2rem, calc((100% - 1180px) / 2));
  bottom: 1.4rem;
  z-index: 4;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.72);
  opacity: 0;
  animation: heroFade 0.6s ease 0.8s forwards;
}

.hero-dots {
  position: absolute;
  left: max(1.2rem, calc((100% - 1180px) / 2));
  bottom: 1.35rem;
  z-index: 4;
  display: flex;
  gap: 0.45rem;
}

.hero-dot {
  width: 2.1rem;
  height: 3px;
  border: 0;
  padding: 0;
  background: rgba(244, 239, 230, 0.28);
  cursor: pointer;
}

.hero-dot.is-active { background: var(--accent); }

@keyframes heroLineUp {
  to { transform: translate3d(0, 0, 0); }
}

@keyframes heroSliceIn {
  from { transform: translate3d(0, 18%, 0) scale(1.12); }
  to { transform: translate3d(0, 0, 0) scale(1.08); }
}

@keyframes heroFade {
  to { opacity: 1; }
}

@media (max-width: 720px) {
  .hero-stage {
    clip-path: inset(8% 6% 34% 6% round 1.25rem);
  }
  .hero-caption { display: none; }
  .hero-dots { bottom: 0.9rem; }
}

.loc-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, minmax(10.5rem, 18vh));
  grid-template-areas:
    "facade facade bridge pokl"
    "ostrov garden bridge pokl"
    "court  yard   interior interior"
    "court  yard   interior interior";
  gap: 0.7rem;
}

.loc {
  position: relative;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--cover-bg, #1a2420);
}

.loc:nth-child(1) { grid-area: facade; }
.loc:nth-child(2) { grid-area: bridge; }
.loc:nth-child(3) { grid-area: ostrov; }
.loc:nth-child(4) { grid-area: pokl; }
.loc:nth-child(5) { grid-area: court; }
.loc:nth-child(6) { grid-area: garden; }
.loc:nth-child(7) { grid-area: yard; }
.loc:nth-child(8) { grid-area: interior; }

.loc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.loc:hover img { transform: scale(1.04); }

.loc figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.6rem 0.85rem 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f4efe6;
  background: linear-gradient(transparent, rgba(12, 20, 17, 0.78));
}

@media (max-width: 900px) {
  .loc-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, minmax(9rem, 16vh));
    grid-template-areas:
      "facade facade"
      "bridge pokl"
      "bridge pokl"
      "ostrov garden"
      "court  yard"
      "interior interior";
  }
}

@media (max-width: 560px) {
  .loc-mosaic {
    gap: 0.5rem;
    grid-template-rows: repeat(6, minmax(8.4rem, 18vh));
  }
  .loc { border-radius: 12px; }
  .loc figcaption { font-size: 0.7rem; padding: 1.2rem 0.65rem 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .loc img { transition: none; }
  .hero-line span,
  .hero-slice,
  .hero-invest .hero-lead,
  .hero-invest .hero-cta,
  .hero-invest .hero-form,
  .hero-caption {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .hero-slide,
  .hero-stage {
    transition: none;
    clip-path: inset(0) !important;
  }
}
