/* Makieta 3D Estate - kadr z przyciskiem, po kliknięciu aplikacja w tej samej ramie. */

.ax-estate { display: grid; gap: 12px; }

.ax-estate__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(82vh, 820px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ax-ink);
  isolation: isolate;
}

.ax-estate__poster,
.ax-estate__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ax-estate__poster img { filter: saturate(0.9); }

/* Kadr ściemnia się od dołu - napis i przycisk siedzą na najciemniejszym pasie. */
.ax-estate__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(24px, 3.4vw, 56px);
  background:
    linear-gradient(to top, rgba(11, 15, 34, 0.86) 0%, rgba(11, 15, 34, 0.5) 38%, rgba(11, 15, 34, 0.08) 72%),
    linear-gradient(to right, rgba(11, 15, 34, 0.35), transparent 60%);
  color: var(--ax-paper);
}
.ax-estate__veil[hidden] { display: none; }

.ax-estate__eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ax-steel-light);
}
.ax-estate__title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(28px, 3.2vw, 52px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.ax-estate__note {
  margin: 0 0 10px;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(244, 241, 235, 0.72);
  text-wrap: pretty;
}

.ax-estate__run {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ax-paper);
  color: var(--ax-navy);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .ax-estate__run:hover { transform: translateY(-2px); background: #fff; }
}
.ax-estate__run:focus-visible { outline: 2px solid var(--ax-steel-light); outline-offset: 4px; }
.ax-estate__run:disabled { cursor: progress; opacity: 0.8; }

.ax-estate__app {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #f3f3f3;
}
.ax-estate__app[hidden] { display: none; }
.ax-estate__app > div { width: 100%; height: 100%; position: relative; }
.is-loading .ax-estate__app { visibility: hidden; }

.ax-estate__status {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 36px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 26, 58, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ax-paper);
  font-size: 12.5px;
  line-height: 1.35;
}
.ax-estate__status[hidden] { display: none; }
.ax-estate__spinner {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 241, 235, 0.3);
  border-top-color: var(--ax-paper);
  animation: ax-estate-spin 0.9s linear infinite;
}
.is-failed .ax-estate__spinner { display: none; }
@keyframes ax-estate-spin { to { transform: rotate(360deg); } }

.ax-estate__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}
.ax-estate__bar[hidden] { display: none; }
.ax-estate__credit {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(53, 59, 102, 0.45);
}
.ax-estate__full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(53, 59, 102, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--ax-navy);
  font: inherit;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.ax-estate__full[hidden] { display: none; }

.ax-estate__frame:fullscreen { max-height: none; aspect-ratio: auto; border-radius: 0; }
.ax-estate__frame:-webkit-full-screen { max-height: none; border-radius: 0; }

@media (max-width: 900px) {
  /* Aplikacja na telefonie układa panel lokali pod modelem - potrzebuje wysokości. */
  .ax-estate__frame { aspect-ratio: auto; height: min(78svh, 640px); max-height: none; }
  .ax-estate__veil { padding: 22px 20px 24px; }
  .ax-estate__title { font-size: clamp(28px, 8vw, 36px); }
  .ax-estate__note { font-size: 14px; }
  .ax-estate__run { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ax-estate__run { transition: none; }
  .ax-estate__spinner { animation-duration: 2.4s; }
}

/* Samodzielny blok makiety. */
.ax-estate-sec { padding: var(--ax-sec-pad-m) 0 var(--ax-sec-pad-s); }
.ax-estate-sec__inner { max-width: var(--ax-maxw); margin: 0 auto; padding: 0 var(--ax-gutter); }
.ax-estate-sec__intro {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: end;
  margin-bottom: clamp(26px, 3vw, 44px);
}
.ax-estate-sec__intro > div { grid-column: 1 / span 7; }
.ax-estate-sec__lead { grid-column: 9 / span 4; margin: 0; color: rgba(53, 59, 102, 0.62); font-size: 15.5px; line-height: 1.62; }
.ax-estate-sec__eyebrow { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ax-steel); margin-bottom: var(--ax-label-gap); }
.ax-estate-sec__heading { font-weight: 300; margin: 0; font-size: clamp(38px, 4.6vw, 80px); line-height: 0.94; letter-spacing: -0.032em; }
@media (max-width: 900px) {
  .ax-estate-sec__intro { grid-template-columns: 1fr; }
  .ax-estate-sec__intro > div,
  .ax-estate-sec__lead { grid-column: auto; }
}
