/* Crushoo: čekací listina, potvrzení, modální okno, plovoucí výzva */

.join { background: var(--cream); padding-top: 0; }

.join__card {
  position: relative;
  display: grid;
  gap: 28px;
  padding: 28px 18px 18px;
  border: var(--line);
  border-radius: 36px;
  box-shadow: 8px 8px 0 var(--ink);
  background:
    radial-gradient(70% 60% at 0% 0%, #FFC27A 0%, rgba(255, 194, 122, 0) 70%),
    linear-gradient(150deg, #FF9A4D 0%, #FF6A6A 45%, #FF4F7E 100%);
  overflow: hidden;
}
/* pruhované slunce v rohu */
.join__card::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--butter);
  opacity: .55;
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 16px, transparent 16px 24px);
  mask: repeating-linear-gradient(180deg, #000 0 16px, transparent 16px 24px);
  pointer-events: none;
}

.join__intro { position: relative; padding: 0 6px; }
.join__intro h2 { font-size: clamp(2.4rem, 10vw, 4rem); margin-bottom: 14px; }
.join__intro > p:not(.eyebrow) { font-size: 1.125rem; font-weight: 500; max-width: 32ch; }
.join__perks { display: grid; gap: 8px; margin-top: 22px; font-weight: 700; }
.join__perks li { display: flex; align-items: center; gap: .55em; }
.join__perks .ico { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--ink); color: var(--butter); stroke-width: 3.4; }

.join__panel {
  position: relative;
  padding: 24px 18px 22px;
  background: var(--cream);
  border: var(--line);
  border-radius: 26px;
}

/* formulář */
.field { display: grid; gap: 8px; min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.field > label, .field legend { padding: 0; font-weight: 700; font-size: .9375rem; }
.field legend { margin-bottom: 8px; }

.field input[type="email"],
.field input[type="text"],
.field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  background: #fff;
  border: var(--line);
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field input::placeholder { color: #8E7380; opacity: 1; }
.field select {
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A0E1F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  cursor: pointer;
}
.field select:invalid { color: #8E7380; }
.field select option { color: var(--ink); }
.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--crush-deep);
  border-radius: 16px;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--error); background-color: #FFF0F3; }

.field__hint { font-size: .875rem; color: var(--ink-2); }
.field__error { font-size: .9rem; font-weight: 700; color: var(--error); }
.field__error:empty { display: none; }

/* žena / muž */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  background: #fff;
  border: var(--line);
  border-radius: 16px;
  font-weight: 700;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.seg label:hover span { background: var(--cream-2); }
.seg input:checked + span { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--crush); transform: translate(-1px, -1px); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--crush-deep); }
.seg input[aria-invalid="true"] + span { border-color: var(--error); background-color: #FFF0F3; }

/* souhlas */
.field--consent { gap: 6px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.check input {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: var(--line);
  border-radius: 8px;
  background: #fff center / 16px no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.check input:checked {
  background-color: var(--crush-deep);
  border-color: var(--crush-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.check input:focus-visible { outline: 3px solid var(--crush-deep); outline-offset: 3px; }
.check input[aria-invalid="true"] { border-color: var(--error); background-color: #FFF0F3; }
.field--consent .linkbtn { justify-self: start; margin-left: 38px; font-size: .9375rem; color: var(--crush-deep); }

/* pole pro roboty: lidé ho nevidí */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form [data-submit] { margin-top: 6px; }
.form__status { margin-top: 12px; font-weight: 700; font-size: .9375rem; color: var(--error); }
.form__status:empty { display: none; }

/* potvrzení */
.success { position: relative; padding: 18px 4px 6px; text-align: center; }
.success:focus { outline: none; }
.success__kicker { font-size: .8125rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--crush-deep); }
.success h3 { margin: 6px 0 12px; font-size: clamp(2.2rem, 8vw, 3rem); }
.success p { max-width: 34ch; margin-inline: auto; color: var(--ink-2); }
.success .btn { margin-top: 22px; }
.success__share-status { margin-top: 12px; font-weight: 700; font-size: .9375rem; }
.success__share-status:empty { display: none; }

.success__hearts { position: absolute; inset: 0; pointer-events: none; }
.success__hearts i {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 18px;
  height: 18px;
  background: var(--crush);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7.5-4.6-9.2-9.3C1.6 7.3 3.8 4 7.2 4c2 0 3.6 1.1 4.8 2.8C13.2 5.1 14.8 4 16.8 4c3.4 0 5.6 3.3 4.4 6.7C19.5 15.4 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7.5-4.6-9.2-9.3C1.6 7.3 3.8 4 7.2 4c2 0 3.6 1.1 4.8 2.8C13.2 5.1 14.8 4 16.8 4c3.4 0 5.6 3.3 4.4 6.7C19.5 15.4 12 20 12 20z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  animation: burst 1.2s var(--ease-out) forwards;
}
.success__hearts i:nth-child(1) { --x: -120px; --y: -70px; }
.success__hearts i:nth-child(2) { --x: 110px; --y: -90px; background: var(--tangerine); animation-delay: .05s; }
.success__hearts i:nth-child(3) { --x: -80px; --y: -130px; background: var(--butter); animation-delay: .1s; }
.success__hearts i:nth-child(4) { --x: 140px; --y: -20px; animation-delay: .12s; }
.success__hearts i:nth-child(5) { --x: -150px; --y: 0px; background: var(--tangerine); animation-delay: .18s; }
.success__hearts i:nth-child(6) { --x: 40px; --y: -150px; background: var(--crush-deep); animation-delay: .22s; }

/* modální okno */
.modal {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal::backdrop { background: rgba(42, 14, 31, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .3s var(--ease-out); }
.modal__box {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px 22px 24px;
  background: var(--cream);
  border: var(--line);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
}
.modal h2 { font-size: clamp(1.8rem, 6vw, 2.3rem); padding-right: 48px; margin-bottom: 18px; }
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.modal__close:hover { background: var(--blush); }
.modal__list { display: grid; gap: 4px; }
.modal__list dt { margin-top: 12px; font-weight: 800; }
.modal__list dt:first-child { margin-top: 0; }
.modal__list dd { color: var(--ink-2); }
.modal__note { margin: 20px 0 22px; padding: 12px 14px; border-radius: 14px; background: var(--cream-2); font-size: .9rem; font-weight: 600; }
html.has-modal { overflow: hidden; }

/* plovoucí výzva na mobilu */
.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 45;
  transform: translateY(160%);
  visibility: hidden;
  transition: transform .35s var(--ease-out), visibility 0s linear .35s;
}
.sticky-cta.is-visible { transform: none; visibility: visible; transition: transform .35s var(--ease-out), visibility 0s; }

@media (min-width: 720px) {
  .sticky-cta { display: none; }
}

@media (min-width: 960px) {
  .join__card { grid-template-columns: 1fr 1.05fr; gap: 40px; padding: 48px; align-items: center; }
  .join__intro { padding: 0; }
  .join__panel { padding: 32px 30px 28px; }
}

@keyframes burst {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.3); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) scale(1.2) rotate(18deg); }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .success__hearts { display: none; }
}
