*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  color: #f7f7f7;

  /* pozwalamy na scroll (dynamiczne elementy w flow) */
  overflow-x: hidden;
  overflow-y: auto;

  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Wspólne zachowanie dla elementów ukrywanych atrybutem hidden */
[hidden] {
  display: none !important;
}

/* Pełnoekranowe tło wideo (desktop domyślnie ON) */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  z-index: -2;
}

/* Warstwa przyciemnienia */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at top left,
      rgba(0, 0, 0, 0.15),
      transparent
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
  z-index: -1;
  pointer-events: none;
}

/* Winieta */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.25) 55%,
      rgba(0, 0, 0, 0.6) 100%
    );
  z-index: -1;
}

/* Wyśrodkowanie kontenera */
.page-wrapper {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px
    calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Wrapper na kartę i popup */
.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 540px;
}

/* --- CIEMNE SZKŁO – CARD --- */
.card {
  position: relative;
  max-width: 480px;
  width: 100%;
  padding: 26px 22px;
  border-radius: 24px;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04),
    rgba(0, 0, 0, 0.6)
  );
  background-blend-mode: soft-light;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: none;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.9);

  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Fallback, gdy przeglądarka nie wspiera backdrop-filter */
@supports not ((backdrop-filter: blur(10px))) {
  .card {
    background: rgba(15, 15, 20, 0.9);
  }
}

/* Logo */
.logo-box {
  display: flex;
  justify-content: center;
}

.logo {
  max-width: 400px;
  width: 100%;
  height: auto;
}

/* Opis firmy */
.content-box {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

/* Przyciski akcji */
.buttons-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* --- BAZA DLA BUTTONÓW – mleczne szkło --- */
.btn {
  position: relative;
  appearance: none;
  padding: 11px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  color: #f7f7f7;

  border-radius: 999px;
  border: none;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.24),
    rgba(10, 10, 15, 0.7)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.9);

  transition: transform 0.12s ease, box-shadow 0.18s ease,
    background 0.18s ease, color 0.18s ease;
}

.primary-btn,
.secondary-btn {}

/* ten sam hover dla obu */
.primary-btn:hover,
.secondary-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3),
    rgba(15, 15, 22, 0.85)
  );
  transform: translateY(-1px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.98);
}

/* --- POPUP E-MAILA – mini szklany chip (w normalnym flow) --- */
.copy-popup {
  min-height: 24px;
  padding: 6px 18px;
  font-size: 0.85rem;
  color: #f7f7f7;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  border: none;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.20),
    rgba(8, 8, 14, 0.85)
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);

  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@supports not ((backdrop-filter: blur(10px))) {
  .copy-popup {
    background: rgba(15, 15, 20, 0.95);
  }
}

.copy-popup.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsywność (desktop/tablet) */
@media (min-width: 768px) {
  .card {
    padding: 32px 28px;
    max-width: 540px;
  }

  .content-box {
    font-size: 1rem;
  }

  .btn {
    font-size: 1rem;
  }
}

/* --- DYNAMICZNY CARD KONTAKTU (Zadzwoń) --- */
.contact-card-mount {
  width: 100%;
  display: flex;
  justify-content: center;
}

.contact-card {
  /* wykorzystuje dokładnie ten sam „szron” co .card */
}

.contact-split {
  display: flex;
  width: 100%;
}

.contact-left,
.contact-right {
  flex: 1;
  min-width: 0;
}

.contact-left {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-right: 18px;
}

.contact-left-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-name {
  font-size: 1.05rem;
  font-weight: 400;
}

.contact-phone {
  font-size: 0.98rem;
  opacity: 0.9;
}

.contact-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* QR panel */
.contact-qr-panel {
  width: 100%;
  max-width: 220px;
  padding: 14px;
  border-radius: 18px;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);

  overflow: hidden;
}

.contact-qr-title {
  font-size: 0.85rem;
  opacity: 0.92;
  margin: 0;
}

.contact-qr-img {
  width: 150px;
  height: 150px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  flex: 0 0 auto;
}

/* --- STOPKA --- */
.footer-note {
  flex-shrink: 0;
  text-align: center;

  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(247, 247, 247, 0.62);

  padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));

  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* =========================================
   MOBILE: tło jako obraz + układ karty Zadzwoń w kolumnie
   ========================================= */
@media (max-width: 767px) {
  /* Mobile tło: rezygnujemy z video */
  .bg-video {
    display: none !important;
  }

  body {
    background-image: url("../img/background_mobile.jpg");
    background-size: cover;        /* pion wypełnia, poziom przycięty */
    background-position: center;
    background-repeat: no-repeat;

    /* na mobile lepiej bez fixed (wydajność / bugi Safari) */
    background-attachment: scroll;
  }

  /* karta Zadzwoń: pionowo + separator poziomy */
  .contact-split {
    flex-direction: column;
  }

  .contact-left {
    padding-right: 0;
    padding-bottom: 16px;
  }

  .contact-left-inner {
    width: 100%;
  }

  /* button nie może „wystawać” */
  .contact-left-inner .btn {
    width: 100%;
    max-width: 360px;
  }

  .contact-right {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  /* panel QR troszkę szerszy na mobile, żeby wyglądał jak na screenie */
  .contact-qr-panel {
    max-width: 260px;
  }
}
