/* =========================================================
   randkiteraz.pl
   1. tokeny   2. reset   3. naglowki   4. hero
   5. karta profilu   6. toast   7. popup
   ========================================================= */

/* ---------- 1. tokeny ---------- */
:root {
  --bg: #14181f;
  --text: #a6a6a6;
  --text-strong: #f2f2f2;
  --accent: #e8308c;
  --accent-warm: #eb3351;
  --accent-soft: #ff5f6d;
  --online: #00c26f;
  --blue: #2563eb;
  --blue-soft: #38bdf8;
}

/* ---------- 2. reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 1rem = 10px, skalowane w dol na mniejszych ekranach */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}
@media (max-width: 768px) { html { font-size: 56.25%; } }
@media (max-width: 560px) { html { font-size: 50%; } }

body {
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  background-color: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.6rem;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 3. naglowki ---------- */
h1 {
  font-size: 4.8rem;
  color: var(--text-strong);
  margin-bottom: 1.6rem;
}
@media (max-width: 768px) { h1 { font-size: clamp(3.4rem, 5vw, 4.4rem); } }
@media (max-width: 560px) { h1 { font-size: clamp(3rem, 7vw, 3.6rem); } }

h2 {
  font-size: 1.8rem;
  color: var(--text);
  padding: 0 40rem;
  font-weight: lighter;
}
@media (max-width: 1024px) { h2 { padding: 0 16rem; } }
@media (max-width: 768px)  { h2 { padding: 0 6rem; font-size: 1.6rem; } }
@media (max-width: 560px)  { h2 { padding: 0 1.6rem; font-size: 1.5rem; } }

.highlighted-title {
  background: linear-gradient(135deg, var(--accent-warm), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 4. hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 4rem 1.6rem 6rem;
}
@media (max-width: 768px) { .hero { padding: 3rem 1.2rem 5rem; gap: 1.6rem; } }
@media (max-width: 560px) { .hero { padding: 2.4rem 0.8rem 10rem; gap: 1.2rem; } }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) { .hero__stats { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 560px) { .hero__stats { grid-template-columns: 1fr; width: 100%; gap: 1.2rem; } }

.hero__stats-card {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1.2rem 1.4rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  color: var(--text-strong);
  font-weight: 700;
}
.hero__stats-card strong { font-size: 1.6rem; }
.hero__stats-card svg { width: 2rem; height: 2rem; color: var(--accent); flex: 0 0 auto; }
@media (max-width: 560px) {
  .hero__stats-card strong { font-size: 1.5rem; }
  .hero__stats-card svg { width: 1.8rem; height: 1.8rem; }
}

.hero__profiles {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 560px) { .hero__profiles { gap: 1.2rem; } }

.hero__cta {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}
/* Na telefonie CTA przykleja sie do dolu ekranu. */
@media (max-width: 560px) {
  .hero__cta {
    position: sticky;
    bottom: 0.8rem;
    left: 0;
    right: 0;
    z-index: 12;
    margin-inline: auto;
    max-width: 420px;
    padding: 0.8rem 1rem 1rem;
    border-radius: 14px;
    background: rgba(20, 24, 31, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  }
}

.hero__cta-button {
  padding: 1.2rem 3rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent));
  color: #fdfdfd;
  font-weight: 700;
  font-size: 1.6rem;
  box-shadow: 0 12px 25px rgba(232, 48, 140, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 0.75rem;
  white-space: nowrap;
}
.hero__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(232, 48, 140, 0.45);
}
.hero__cta-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(232, 48, 140, 0.35);
}
@media (max-width: 560px) {
  .hero__cta-button { width: 100%; max-width: 360px; padding: 1.2rem 2rem; font-size: 1.5rem; }
}

.hero__cta-meta { color: #c8c8c8; font-size: 1.4rem; }
@media (max-width: 560px) {
  .hero__cta-meta { font-size: 1.3rem; text-align: center; max-width: 360px; }
}

/* ---------- 5. karta profilu ---------- */
.profile-card {
  position: relative;
  width: 340px;
  height: 420px;
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  color: var(--text-strong);
  background: linear-gradient(145deg, rgba(20, 24, 31, 0.85), rgba(20, 24, 31, 0.7));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

/* Zdjecie siedzi pod trescia, rozmyte i powiekszone, zeby rozmycie
   nie odslonilo krawedzi karty. */
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-image, linear-gradient(145deg, rgba(20,24,31,.85), rgba(20,24,31,.7)))
    var(--bg-position, center top) / cover no-repeat;
  filter: blur(6px) brightness(0.9);
  transform: scale(1.1);
  transform-origin: center top;
  z-index: 0;
}
.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.55));
  z-index: 1;
}
.profile-card > * { position: relative; z-index: 2; }

.profile-card__status {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(15, 20, 28, 0.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  color: #d9d9d9;
  font-weight: 600;
  font-size: 1.2rem;
}
.profile-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--online); }

.profile-card__body {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.profile-card__name {
  font-size: 2.2rem;
  margin: 0;
  color: var(--text-strong);
  font-weight: 700;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.profile-card__quote { font-size: 1.4rem; color: #c8c8c8; opacity: 0.8; }

.profile-card__tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-card__tag {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 20, 28, 0.56);
  color: #e7e7e7;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.profile-card__message,
.profile-card__view { width: 100%; border-radius: 1rem; font-weight: 700; cursor: pointer; }

.profile-card__message {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1rem 1.2rem;
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
  color: #fff;
  font-size: 1.4rem;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.profile-card__message svg { flex: 0 0 auto; width: 18px; height: 18px; }
.profile-card__message:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.34);
}
.profile-card__message:active { transform: translateY(0); }

.profile-card__view {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 1.25rem;
  text-align: center;
  transition: color 0.15s ease;
}
.profile-card__view:hover { color: var(--accent); }

.profile-card__message:focus-visible,
.profile-card__view:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 768px) {
  .profile-card { width: 300px; height: auto; min-height: 380px; padding: 1.6rem; }
}
@media (max-width: 560px) {
  .profile-card {
    width: 100%;
    max-width: 360px;
    height: auto;
    min-height: 400px;
    padding: 1.4rem;
    gap: 0.8rem;
  }
  .profile-card__status { font-size: 1.1rem; padding: 0.45rem 0.9rem; }
  .profile-card__name { font-size: 2rem; }
  .profile-card__quote { font-size: 1.35rem; }
  .profile-card__tag { font-size: 1.2rem; }
  .profile-card__message { min-height: 44px; font-size: 1.45rem; }
}

/* ---------- 6. toast ---------- */
.toast {
  position: fixed;
  bottom: 2.4rem;
  right: 2.4rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.4rem 1.6rem;
  min-width: 370px;
  background: rgba(20, 24, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #f2f2f2;
  z-index: 20;
  text-align: left;
}
@media (max-width: 768px) {
  .toast { right: 1.6rem; bottom: 1.6rem; min-width: 300px; padding: 1.2rem 1.4rem; gap: 1rem; }
}
/* Na telefonie toast idzie na gore, zeby nie zderzal sie z przyklejonym CTA. */
@media (max-width: 560px) {
  .toast {
    left: 50%;
    right: auto;
    top: 1.2rem;
    bottom: auto;
    transform: translateX(-50%);
    width: min(92vw, 380px);
    min-width: auto;
    border-radius: 14px;
    padding: 1.2rem 1.3rem;
    gap: 0.9rem;
    z-index: 16;
  }
}

.toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.toast__close:hover { background: rgba(255, 255, 255, 0.2); }
.toast__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.toast__indicator {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 16px;
  height: 16px;
  background: #b52438;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(181, 36, 56, 0.45);
}
@media (max-width: 560px) { .toast__indicator { top: -4px; left: -4px; width: 14px; height: 14px; } }

.toast__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(0.95);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
@media (max-width: 560px) { .toast__avatar { width: 46px; height: 46px; } }

.toast__status {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 13px;
  height: 13px;
  background: var(--online);
  border: 2px solid rgba(20, 24, 31, 0.9);
  border-radius: 50%;
}
@media (max-width: 560px) { .toast__status { width: 12px; height: 12px; } }

.toast__content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
@media (max-width: 560px) { .toast__content { gap: 0.4rem; } }

.toast__title {
  padding-right: 32px;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f7f7f7;
}
@media (max-width: 560px) { .toast__title { font-size: 1.5rem; } }

/* Rozmyty pasek udajacy podglad nieprzeczytanej wiadomosci. */
.toast__message {
  width: 190px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  filter: blur(4px);
}
@media (max-width: 768px) { .toast__message { width: 170px; } }
@media (max-width: 560px) { .toast__message { width: 100%; max-width: 180px; height: 10px; } }

.toast__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.5rem;
}
@media (max-width: 560px) { .toast__meta { font-size: 1.4rem; } }

.toast__ping { font-size: 1.8rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
@media (max-width: 560px) { .toast__ping { font-size: 1.6rem; } }

.toast__actions { display: flex; margin-top: 0.4rem; }
.toast__cta {
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(232, 48, 140, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
@media (max-width: 560px) { .toast__cta { font-size: 1.1rem; padding: 0.6rem 0.9rem; } }
.toast__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(232, 48, 140, 0.45);
  filter: brightness(1.05);
}
.toast__cta:active { transform: translateY(0); box-shadow: 0 8px 18px rgba(232, 48, 140, 0.3); }

/* ---------- 7. popup ---------- */
.profile-popup {
  position: fixed;
  inset: 0;
  z-index: 40;
  min-height: 100svh;
  min-height: 100dvh;
}

.profile-popup__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 10, 14, 0.68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.profile-popup__panel {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: 86vh;
  max-height: 86svh;
  max-height: 86dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: rgba(20, 24, 31, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  color: #f8f8f8;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  animation: popup-modal-in 0.2s ease-out;
}

.profile-popup__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

.profile-popup__title { margin: 0 2.4rem 1.3rem 0; font-size: 2.2rem; line-height: 1.2; }
.profile-popup__panel p { margin: 0 0 1.6rem; color: #e5e8ed; font-size: 1.52rem; line-height: 1.55; }

.profile-popup__benefits { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.9rem; }
.profile-popup__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: #e9e9e9;
  font-size: 1.55rem;
  line-height: 1.4;
}

.profile-popup__cta {
  margin-top: 1.6rem;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  text-align: center;
  box-shadow: 0 10px 24px rgba(232, 48, 140, 0.4);
}

@media (max-width: 430px) {
  .profile-popup__panel {
    width: calc(100vw - 2rem);
    max-width: 520px;
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 1.8rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
    border-radius: 16px;
  }
  .profile-popup__title { margin: 0 2.1rem 1rem 0; font-size: 1.84rem; line-height: 1.2; }
  .profile-popup__panel p { margin: 0 0 1.25rem; font-size: 1.36rem; line-height: 1.45; }
  .profile-popup__benefits { gap: 0.72rem; }
  .profile-popup__benefits li { font-size: 1.34rem; line-height: 1.34; gap: 0.55rem; }
  .profile-popup__cta { margin-top: 1.2rem; min-height: 48px; font-size: 1.3rem; }
}

@keyframes popup-modal-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
