/*
 * License page / Contact. Figma 249:570 (desktop 1920), 282:500 (mobile 390).
 * Every value is from Figma unless marked "derived". The form is Contact Form 7 markup (.cf7-grid) restyled.
 * Head = lpl-contact__hd (not __head) so the base.css "centre every head" rules do not apply (Figma: tag + title left,
 * lead right, items-end).
 */
.lpl-sec--contact {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  padding: 90px 0;
  background: linear-gradient(to bottom, #330a6e, #8315a5);
  font-family: 'Inter', sans-serif;
}
.lpl-sec--contact *,
.lpl-sec--contact *::before,
.lpl-sec--contact *::after { box-sizing: border-box; }
.lpl-contact__anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

/* background decoration */
.lpl-contact__watermark {
  --pad: 140px; /* the box is 189px tall in Figma but the 460px glyphs overhang it; pad so background-clip does not cut them */
  --h: 189px;
  position: absolute;
  z-index: 0;
  top: calc(12.77% - var(--pad));
  bottom: calc(65.94% - var(--pad));
  left: -6.15%;
  right: -5.62%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 min(23.9583vw, 460px)/19.6px 'Inter', sans-serif;
  white-space: pre;
  text-align: center;
  color: transparent;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 0, rgba(255, 255, 255, 0.07) var(--pad), rgba(255, 255, 255, 0.02) calc(var(--pad) + var(--h)), rgba(255, 255, 255, 0.02) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
}
.lpl-contact__glow {
  position: absolute;
  z-index: 0;
  top: -365px;
  left: calc(50% + 359px);
  width: 909px;
  height: 909px;
  max-width: none;
  pointer-events: none;
}
.lpl-contact__glow--m { display: none; }

.lpl-contact__wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1408px; /* 1360 content + 2x24 gutter */
  margin-inline: auto;
  padding-inline: 24px; /* derived for widths < 1408 */
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* header 249:574: row, items-end, justify-between, height 216; left 249:575 716 wide (gap 16);
   title 249:578 60/83.6 600 -3px white in a 176 box (overhangs the 217 column by 19); lead 249:579 525 wide */
.lpl-contact__hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.lpl-contact__hd-main {
  align-self: flex-start;        /* a lead taller than the 216 head grows downwards; tag + title stay on top */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 716px;
  max-width: 100%;
  flex: 0 1 716px;
  min-width: 0;
}
.lpl-contact__hd-main > * { flex: none; }
.lpl-sec--contact .lpl-tag.lpl-contact__tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  height: 44px;
  padding: 12px 16px;
  margin: 0;
  border-radius: 999px;
  background: #640ea1;
  color: #fff;
  font: 600 14px/20px 'Inter', sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}
.lpl-sec--contact .lpl-h2.lpl-contact__title {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 176px;
  margin: 0 0 -20px;             /* 44 + 16 + 176 = 236 in the 216 head row: the box overhangs */
  padding: 0;
  color: #fff;
  font: 600 60px/83.6px 'Inter', sans-serif;
  letter-spacing: -3px;
  text-align: left;
}
.lpl-contact__lede {
  flex: 0 0 525px;
  width: 525px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
  font: 400 18px/26px 'Inter', sans-serif;
  letter-spacing: 0;
  text-align: right;
}

/* glass card 249:581 */
.lpl-contact__card {
  padding: 45px 48px 50px; /* Figma: 50 top, the first label overhangs its row by 5px */
  border-radius: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(153, 153, 153, 0.2));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.lpl-contact__empty { margin: 0; color: #fff; }

/* neutralise the old site-wide .wpcf7-form look (style.css) */
.lpl-sec--contact .wpcf7,
.lpl-sec--contact .wpcf7-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.lpl-sec--contact .wpcf7-form > h4 { display: none; } /* duplicate of the section heading */
.lpl-sec--contact .wpcf7-form br { display: none; }
.lpl-sec--contact .wpcf7-form p { margin: 0; padding: 0; font-size: inherit; }

.lpl-sec--contact .cf7-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  align-items: end;
}
.lpl-sec--contact .cf7-grid > div { min-width: 0; margin: 0; padding: 0; }
.lpl-sec--contact .cf7-grid > .text { grid-column: 1 / -1; }
.lpl-sec--contact .cf7-grid > .full { grid-column: 1; margin-top: 19px; align-self: start; }
.lpl-sec--contact .cf7-grid > .lpl-contact__note { grid-column: 2 / -1; }

.lpl-sec--contact .cf7-grid label {
  display: block;
  margin: 0 0 15px;
  padding: 0;
  color: #f6f6f6;
  font: 600 14px/22px 'Inter', sans-serif;
  letter-spacing: 0;
}
.lpl-sec--contact .wpcf7-form-control-wrap { display: block; position: relative; }
.lpl-sec--contact .cf7-grid input[type="text"],
.lpl-sec--contact .cf7-grid input[type="email"],
.lpl-sec--contact .cf7-grid input[type="tel"],
.lpl-sec--contact .cf7-grid textarea {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 15px 22px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(to bottom, #fff, #f5dfff);
  color: #545454;
  font: 400 12px/22px 'Inter', sans-serif;
  letter-spacing: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
.lpl-sec--contact .cf7-grid textarea { height: 98px; resize: vertical; }
.lpl-sec--contact .cf7-grid input::placeholder,
.lpl-sec--contact .cf7-grid textarea::placeholder { color: #545454; opacity: 1; }
.lpl-sec--contact .cf7-grid input:focus-visible,
.lpl-sec--contact .cf7-grid textarea:focus-visible {
  outline: 2px solid #f5b319; /* derived: Figma has no focus state */
  outline-offset: 2px;
  border: 0;
  box-shadow: none;
}
/* intl-tel-input wrapper around the phone field */
.lpl-sec--contact .iti { display: block; width: 100%; }
.lpl-sec--contact .iti input[type="tel"] { padding-right: 22px; }
/* VQA: the "+380" prefix rendered at the library's 16px / #080d0d next to a 12px / #545454 field text */
.lpl-sec--contact .iti__selected-dial-code { font: 400 12px/22px 'Inter', sans-serif; color: #545454; }

/* submit 249:715 */
.lpl-sec--contact input.wpcf7-submit {
  display: block;
  width: 245px;
  height: 54px;
  margin: 0;
  padding: 14px 50px 14px 22px;
  border: 0;
  border-radius: 15px;
  background-color: #f5b319;
  background-image: url('../../img/license/contact-chevron.svg');
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: calc(50% + 40.5px) center;
  color: #7612a4;
  font: 600 16px/25.2px 'Inter', sans-serif;
  letter-spacing: 0;
  text-align: center;
  cursor: pointer;
}
.lpl-sec--contact input.wpcf7-submit:hover { background-color: #f5b319; }
.lpl-sec--contact input.wpcf7-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lpl-sec--contact .wpcf7-spinner { position: absolute; margin: 0; }

/* note 249:714 */
.lpl-sec--contact .lpl-contact__card .lpl-contact__note {
  margin: 19px 0 0;
  max-width: 607px;
  justify-self: end;
  align-self: start;
  color: #e0e0e0;
  font: 400 14px/26px 'Inter', sans-serif;
  letter-spacing: 0;
  text-align: right;
}
.lpl-sec--contact .lpl-contact__card .lpl-contact__note:not(.is-in-grid) { margin: 24px 0 0; max-width: none; }

/* CF7 states (not in Figma: derived so messages stay readable on the purple card) */
.lpl-sec--contact .wpcf7 form .wpcf7-response-output:empty { display: none; }
.lpl-sec--contact .wpcf7-not-valid-tip { margin-top: 6px; color: #ffd6d6; font: 400 12px/18px 'Inter', sans-serif; }
.lpl-sec--contact .wpcf7 form .wpcf7-response-output,
.lpl-sec--contact .wpcf7 form.invalid .wpcf7-response-output,
.lpl-sec--contact .wpcf7 form.sent .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 400 14px/22px 'Inter', sans-serif;
}

/* derived: header stacks before the two blocks collide */
@media (max-width: 1320px) {
  .lpl-contact__hd { flex-direction: column; align-items: flex-start; min-height: 0; gap: 20px; }
  .lpl-contact__hd-main { flex: none; }
  .lpl-sec--contact .lpl-h2.lpl-contact__title { min-height: 0; margin: 0; font-size: 44px; line-height: 1.4; letter-spacing: -2px; }
  .lpl-contact__lede { flex: none; width: 100%; max-width: 640px; text-align: left; }
}
/* derived: tablet form */
@media (max-width: 1100px) {
  .lpl-sec--contact .cf7-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lpl-sec--contact .cf7-grid > .lpl-contact__note { grid-column: 1 / -1; justify-self: start; text-align: left; margin-top: 0; }
  .lpl-sec--contact .cf7-grid > .full { grid-column: 1 / -1; margin-top: 0; }
  .lpl-sec--contact .cf7-grid > .number { grid-column: 1 / -1; }   /* VQA: 2 columns held name + email, the phone field sat alone with an empty half */
}

/* mobile frame 390: content 376, gutter 7 */
@media (max-width: 767px) {
  .lpl-sec--contact { padding: 90px 0; }
  .lpl-contact__wrap { padding-inline: 7px; gap: 36px; }
  .lpl-contact__glow { display: none; }
  .lpl-contact__glow--m { display: block; top: -536px; left: 17px; }
  .lpl-contact__watermark {
    --pad: 40px;
    --h: 33px;
    top: calc(1.89% - var(--pad)); bottom: calc(95.24% - var(--pad)); left: -13.08%; right: -12.82%;
    font-size: min(24.359vw, 95px);
    opacity: 0.7;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 0, rgba(255, 255, 255, 0.07) var(--pad), rgba(255, 255, 255, 0.01) calc(var(--pad) + var(--h)), rgba(255, 255, 255, 0.01) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
  .lpl-contact__hd { gap: 20px; }
  .lpl-contact__hd-main { gap: 16px; width: 100%; }
  .lpl-sec--contact .lpl-tag.lpl-contact__tag { font-size: 10px; }
  .lpl-sec--contact .lpl-h2.lpl-contact__title { font-size: 22px; line-height: 29px; letter-spacing: -0.22px; }
  .lpl-contact__lede { max-width: none; font-size: 12px; line-height: 21px; }
  .lpl-contact__card { padding: 26px; }
  .lpl-sec--contact .cf7-grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; align-items: stretch; }
  .lpl-sec--contact .cf7-grid > div:nth-child(1) { order: 1; }
  .lpl-sec--contact .cf7-grid > .number { order: 2; }
  .lpl-sec--contact .cf7-grid > div:nth-child(2) { order: 3; }
  .lpl-sec--contact .cf7-grid > .text { order: 4; }
  .lpl-sec--contact .cf7-grid > .lpl-contact__note { order: 5; grid-column: 1; justify-self: stretch; max-width: none; margin: 0; font-size: 12px; line-height: 21px; text-align: left; }
  .lpl-sec--contact .cf7-grid > .full { order: 6; grid-column: 1; margin: 0; }
  .lpl-sec--contact .cf7-grid textarea { height: 96px; }
  .lpl-sec--contact input.wpcf7-submit { width: 100%; font-size: 14px; background-position: calc(50% + 31px) center; }
}

/* QA: Figma 251:818 shows a plain text box without the native resize grip */
.lpl-sec--contact .cf7-grid textarea { resize: none; }

/* ---- motion / interaction polish (no layout change) --------------------------------------------
   Reveal of the header + card comes from the engine (data-lpl-reveal in contact.php); only transform,
   box-shadow, colours and outline are transitioned here, never opacity / translate / scale. */
.lpl-sec--contact .cf7-grid input[type="text"],
.lpl-sec--contact .cf7-grid input[type="email"],
.lpl-sec--contact .cf7-grid input[type="tel"],
.lpl-sec--contact .cf7-grid textarea {
  transition:
    box-shadow var(--lpl-dur-fast, 0.2s) var(--lpl-ease, ease),
    outline-color var(--lpl-dur-fast, 0.2s) var(--lpl-ease, ease),
    outline-offset var(--lpl-dur-fast, 0.2s) var(--lpl-ease, ease);
}
@media (hover: hover) {
  .lpl-sec--contact .cf7-grid input[type="text"]:hover,
  .lpl-sec--contact .cf7-grid input[type="email"]:hover,
  .lpl-sec--contact .cf7-grid input[type="tel"]:hover,
  .lpl-sec--contact .cf7-grid textarea:hover { box-shadow: 0 0 0 2px rgba(245, 179, 25, 0.45); }
}
.lpl-sec--contact .cf7-grid input[type="text"]:focus-visible,
.lpl-sec--contact .cf7-grid input[type="email"]:focus-visible,
.lpl-sec--contact .cf7-grid input[type="tel"]:focus-visible,
.lpl-sec--contact .cf7-grid textarea:focus-visible { box-shadow: 0 0 0 5px rgba(245, 179, 25, 0.22); }

.lpl-sec--contact input.wpcf7-submit {
  transition:
    transform var(--lpl-dur-fast, 0.2s) var(--lpl-ease, ease),
    box-shadow var(--lpl-dur, 0.45s) var(--lpl-ease, ease),
    filter var(--lpl-dur-fast, 0.2s) var(--lpl-ease, ease);
}
@media (hover: hover) {
  .lpl-sec--contact input.wpcf7-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 10px 24px -8px rgba(245, 179, 25, 0.55);
  }
}
.lpl-sec--contact input.wpcf7-submit:active { transform: translateY(0) scale(0.98); transition-duration: 0.08s; }

/* the background glow drifts very slowly (decoration only) */
@media (prefers-reduced-motion: no-preference) {
  .lpl-sec--contact .lpl-contact__glow { animation: lpl-contact-drift 22s var(--lpl-ease-io, ease-in-out) infinite alternate; }
  @keyframes lpl-contact-drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-28px, 22px, 0); }
  }
}
