:root {
  --cc5-ink: #fffaf7;
  --cc5-muted: #d3c8c6;
  --cc5-black: #0b090a;
  --cc5-panel: #100d0e;
  --cc5-wine: #8f1739;
  --cc5-wine-hover: #a91d47;
  --cc5-border: rgba(255, 255, 255, 0.14);
}

html.cc5-open { overflow: hidden; }

.cc5,
.cc5 *,
.cc5-gift,
.cc5-gift * { box-sizing: border-box; }

.cc5 {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--cc5-ink);
  font-family: inherit;
}

.cc5[hidden],
.cc5-gift[hidden] { display: none !important; }

.cc5__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  opacity: 0;
  transition: opacity 180ms cubic-bezier(.16, 1, .3, 1);
}

.cc5__panel {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 34px 38px 30px;
  border: 1px solid rgba(143, 23, 57, 0.72);
  border-radius: 8px;
  background: var(--cc5-panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity 220ms cubic-bezier(.16, 1, .3, 1), transform 220ms cubic-bezier(.16, 1, .3, 1);
  scrollbar-color: var(--cc5-wine) rgba(255,255,255,.05);
}

.cc5.is-open .cc5__backdrop,
.cc5.is-open .cc5__panel { opacity: 1; }
.cc5.is-open .cc5__panel { transform: translateY(0) scale(1); }

.cc5__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--cc5-border);
  border-radius: 50%;
  background: transparent;
  color: var(--cc5-ink);
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}

.cc5__close:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }

.cc5__eyebrow {
  margin: 0 0 12px;
  color: #d87691;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.3;
}

.cc5 h2 {
  margin: 0 0 12px;
  color: var(--cc5-ink);
  font-size: clamp(48px, 8vw, 68px);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: .95;
}

.cc5__lead {
  max-width: 37ch;
  margin: 0 0 17px;
  color: var(--cc5-ink);
  font-size: 18px;
  line-height: 1.45;
}

.cc5__terms {
  margin: 0 0 23px;
  padding-left: 14px;
  border-left: 3px solid var(--cc5-wine);
  color: var(--cc5-muted);
  font-size: 14px;
  line-height: 1.55;
}

.cc5__terms strong { color: var(--cc5-ink); }
.cc5__form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cc5__field { display: grid; gap: 7px; }

.cc5__field > label {
  color: var(--cc5-ink);
  font-size: 14px;
  font-weight: 750;
}

.cc5 input[type="text"],
.cc5 input[type="tel"] {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px;
  outline: 0;
  background: #1b1718;
  color: var(--cc5-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.cc5 input::placeholder { color: #a99fa0; opacity: 1; }
.cc5 input:focus { border-color: #d87691; box-shadow: 0 0 0 3px rgba(143,23,57,.28); }

.cc5__phone {
  display: grid;
  grid-template-columns: 60px 1fr;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 5px;
  background: #1b1718;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.cc5__phone:focus-within { border-color: #d87691; box-shadow: 0 0 0 3px rgba(143,23,57,.28); }
.cc5__phone > span { display: grid; place-items: center; border-right: 1px solid var(--cc5-border); color: var(--cc5-ink); font-weight: 750; }
.cc5__phone input[type="tel"] { border: 0; background: transparent; box-shadow: none; }
.cc5__field small { color: #b8adaf; font-size: 12px; line-height: 1.35; }

.cc5__consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--cc5-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cc5__consent,
.cc5__error,
.cc5__submit,
.cc5__fineprint,
.cc5__honeypot { grid-column: 1 / -1; }

.cc5__consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--cc5-wine); }
.cc5__consent a { color: var(--cc5-ink); text-decoration-color: #d87691; text-underline-offset: 3px; }

.cc5__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  padding: 0 20px;
  border: 0;
  border-radius: 5px;
  background: var(--cc5-wine);
  color: white;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease-out, transform 160ms ease-out;
}

.cc5__submit:hover { background: var(--cc5-wine-hover); }
.cc5__submit:active { transform: translateY(1px); }
.cc5__submit:disabled { cursor: wait; opacity: .72; }
.cc5__submit:focus-visible,
.cc5__close:focus-visible,
.cc5-gift:focus-visible,
.cc5 a:focus-visible { outline: 3px solid #ef9ab2; outline-offset: 3px; }

.cc5__spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid rgba(255,255,255,.36);
  border-top-color: white;
  border-radius: 50%;
  animation: cc5-spin 700ms linear infinite;
}
.cc5__submit.is-loading .cc5__spinner { display: block; }

.cc5__error {
  margin: -3px 0 0;
  padding: 11px 13px;
  border-left: 3px solid #ef6a8f;
  background: rgba(143,23,57,.2);
  color: #ffe7ed;
  font-size: 13px;
  line-height: 1.4;
}

.cc5__fineprint { margin: -4px 0 0; color: #aaa0a2; font-size: 11px; line-height: 1.4; text-align: center; }
.cc5__honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cc5__success { min-height: 360px; align-content: center; }
.cc5__success:not([hidden]) { display: grid; }
.cc5__success h2 { max-width: 10ch; font-size: clamp(38px, 7vw, 54px); }
.cc5__success > p:not(.cc5__eyebrow) { margin: 0 0 26px; color: var(--cc5-muted); font-size: 17px; line-height: 1.5; }

.cc5-gift {
  position: fixed;
  right: 18px;
  bottom: 94px;
  z-index: 99990;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 5px 13px 5px 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 28px;
  background: var(--cc5-black);
  color: white;
  box-shadow: 0 10px 28px rgba(0,0,0,.34);
  font: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease-out, transform 180ms ease-out, background 160ms ease-out;
}

.cc5-gift.is-visible { opacity: 1; transform: translateY(0); }
.cc5-gift.is-active { background: #176a45; }
.cc5-gift:hover { background: #171214; }
.cc5-gift__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cc5-wine);
}
.cc5-gift__text { display: grid; gap: 1px; text-align: left; line-height: 1; }
.cc5-gift__text strong { font-size: 14px; letter-spacing: .02em; }
.cc5-gift__text small { color: #cfc4c6; font-size: 10px; }

.cc5-product-note {
  margin: 12px 0 18px !important;
  padding: 13px 15px;
  border-left: 3px solid var(--cc5-wine);
  background: rgba(143,23,57,.08);
  color: inherit;
  line-height: 1.35;
}
.cc5-product-note strong { color: #a91d47; }
.cc5-product-note span { font-size: 13px; opacity: .82; }

@keyframes cc5-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .cc5 { align-items: end; padding: 8px; }
  .cc5__panel { width: 100%; max-height: calc(100dvh - 16px); padding: 30px 20px 22px; border-radius: 8px; }
  .cc5__form { grid-template-columns: 1fr; }
  .cc5 h2 { font-size: 52px; }
  .cc5__lead { font-size: 17px; }
  .cc5__terms { margin-bottom: 20px; }
  .cc5-gift { right: 14px; bottom: 84px; min-width: 52px; padding: 5px; }
  .cc5-gift__icon { margin: 0; }
  .cc5-gift__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .cc5__backdrop,
  .cc5__panel,
  .cc5__close,
  .cc5__submit,
  .cc5-gift,
  .cc5 input,
  .cc5__phone { transition-duration: 0ms; }
  .cc5__spinner { animation-duration: 1200ms; }
}
