/* ==========================================================================
   Get a Quote — shared hero form + animated success modal
   Included via query-form.php on every landing page. All styling lives here
   (no inline / in-page styles).
   ========================================================================== */

:root {
  --dzq-navy-1: #020842;
  --dzq-navy-2: #0a1560;
  --dzq-navy-3: #04115c;
  --dzq-accent: #ffbe00;
  --dzq-accent-2: #ffd24d;
  --dzq-light: #eef1ff;
  --dzq-muted: rgba(238, 241, 255, 0.6);
  --dzq-line: rgba(255, 255, 255, 0.16);
  --dzq-success: #22c55e;
}

/* ----- Section shell -------------------------------------------------- */
.dz-quote {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 4.5rem) 0;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(255, 190, 0, 0.10), transparent 60%),
    linear-gradient(135deg, var(--dzq-navy-1) 0%, var(--dzq-navy-2) 55%, var(--dzq-navy-3) 100%);
  isolation: isolate;
}

.dz-quote__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.dz-quote__glow--1 {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -60px;
  background: rgba(255, 190, 0, 0.45);
  animation: dzFloat 9s ease-in-out infinite;
}

.dz-quote__glow--2 {
  width: 260px;
  height: 260px;
  bottom: -110px;
  left: -70px;
  background: rgba(88, 120, 255, 0.5);
  animation: dzFloat 11s ease-in-out infinite reverse;
}

/* ----- Card ----------------------------------------------------------- */
.dz-quote__card {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 24px;
  border: 1px solid var(--dzq-line);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.65);
  animation: dzUp 0.8s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.dz-quote__head {
  text-align: center;
  margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
  animation: dzUp 0.8s 0.06s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.dz-quote__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dzq-navy-1);
  background: linear-gradient(135deg, var(--dzq-accent) 0%, var(--dzq-accent-2) 100%);
  box-shadow: 0 8px 20px -8px rgba(255, 190, 0, 0.8);
}

.dz-quote__badge i {
  animation: dzPulse 1.8s ease-in-out infinite;
}

.dz-quote__title {
  margin: 0.9rem 0 0.4rem;
  color: #fff;
  font-weight: 800;
  line-height: 1.12;
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
}

.dz-quote__title span {
  background: linear-gradient(120deg, var(--dzq-accent) 0%, var(--dzq-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dz-quote__subtitle {
  margin: 0;
  color: var(--dzq-muted);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
}

/* ----- Fields --------------------------------------------------------- */
.dz-quote__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.15rem;
}

.dz-field {
  position: relative;
  animation: dzUp 0.7s both;
}

.dz-field--full {
  grid-column: 1 / -1;
}

.dz-field:nth-child(1) { animation-delay: 0.12s; }
.dz-field:nth-child(2) { animation-delay: 0.18s; }
.dz-field:nth-child(3) { animation-delay: 0.24s; }
.dz-field:nth-child(4) { animation-delay: 0.30s; }
.dz-field:nth-child(5) { animation-delay: 0.36s; }

.dz-field__input {
  width: 100%;
  padding: 1.15rem 2.6rem 1.15rem 1rem;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dzq-line);
  border-radius: 13px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.dz-field__input::placeholder {
  color: transparent;
}

.dz-field__input:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.dz-field__input:focus {
  border-color: var(--dzq-accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(255, 190, 0, 0.16);
}

.dz-field__input--area {
  resize: vertical;
  min-height: 120px;
  padding-right: 1rem;
}

.dz-field__input option {
  color: #10163f;
}

/* Floating label */
.dz-field__label {
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  padding: 0 0.35rem;
  color: var(--dzq-muted);
  font-size: 0.98rem;
  pointer-events: none;
  transform-origin: left center;
  transition: transform 0.2s ease, color 0.2s ease, top 0.2s ease;
}

.dz-field__input:focus + .dz-field__label,
.dz-field__input:not(:placeholder-shown) + .dz-field__label,
.dz-field__label--static {
  top: -0.55rem;
  transform: scale(0.8);
  color: var(--dzq-accent-2);
  background: linear-gradient(180deg, var(--dzq-navy-2), var(--dzq-navy-2));
  border-radius: 4px;
}

.dz-field--select .dz-field__label--static {
  background: linear-gradient(180deg, #0a1560, #0a1560);
}

/* Field icons */
.dz-field__icon {
  position: absolute;
  right: 1rem;
  top: 1.15rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.25s ease;
}

.dz-field__input:focus ~ .dz-field__icon {
  color: var(--dzq-accent);
}

.dz-field--select .dz-field__icon--chevron {
  transition: transform 0.25s ease, color 0.25s ease;
}

.dz-field--select .dz-field__input:focus ~ .dz-field__icon--chevron {
  transform: rotate(180deg);
}

/* ----- Submit --------------------------------------------------------- */
.dz-quote__submit {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
  padding: 0.95rem 2rem;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  color: var(--dzq-navy-1);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--dzq-accent) 0%, var(--dzq-accent-2) 100%);
  box-shadow: 0 16px 32px -12px rgba(255, 190, 0, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: dzUp 0.7s 0.42s both;
}

.dz-quote__submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.dz-quote__submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -12px rgba(255, 190, 0, 0.85);
}

.dz-quote__submit:hover::before {
  left: 130%;
}

.dz-quote__submit:active {
  transform: translateY(-1px);
}

.dz-quote__submit-icon {
  display: inline-flex;
  transition: transform 0.25s ease;
}

.dz-quote__submit:hover .dz-quote__submit-icon {
  transform: translate(3px, -3px);
}

/* ----- Success modal -------------------------------------------------- */
.dz-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.dz-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.dz-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 40, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dz-modal__dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 2.4rem 1.8rem 2rem;
  text-align: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55);
  transform: translateY(24px) scale(0.92);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), opacity 0.35s ease;
}

.dz-modal.is-visible .dz-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.dz-modal__check {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.12);
}

.dz-modal.is-visible .dz-modal__check {
  animation: dzCheckPulse 0.9s 0.2s ease both;
}

.dz-check {
  width: 62px;
  height: 62px;
}

.dz-check__circle {
  fill: none;
  stroke: var(--dzq-success);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.dz-check__mark {
  fill: none;
  stroke: var(--dzq-success);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.dz-modal.is-visible .dz-check__circle {
  animation: dzDraw 0.6s 0.15s ease forwards;
}

.dz-modal.is-visible .dz-check__mark {
  animation: dzDraw 0.35s 0.62s ease forwards;
}

.dz-modal__title {
  margin: 0 0 0.5rem;
  color: #10163f;
  font-weight: 800;
  font-size: 1.55rem;
}

.dz-modal__text {
  margin: 0 0 1.5rem;
  color: #5b6079;
  font-size: 1rem;
  line-height: 1.55;
}

.dz-modal__btn {
  padding: 0.8rem 1.9rem;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  background: linear-gradient(135deg, var(--dzq-navy-1), var(--dzq-navy-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 28px -12px rgba(2, 8, 66, 0.75);
}

.dz-modal__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -12px rgba(2, 8, 66, 0.85);
}

.dz-no-scroll {
  overflow: hidden;
}

/* ----- Keyframes ------------------------------------------------------ */
@keyframes dzUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dzFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(24px) translateX(-14px); }
}

@keyframes dzPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

@keyframes dzDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes dzCheckPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
  70%  { box-shadow: 0 0 0 22px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ----- Responsive ----------------------------------------------------- */
@media (max-width: 640px) {
  .dz-quote__grid {
    grid-template-columns: 1fr;
  }

  .dz-quote__submit {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dz-quote__card,
  .dz-quote__head,
  .dz-field,
  .dz-quote__submit,
  .dz-quote__glow,
  .dz-quote__badge i,
  .dz-modal__dialog,
  .dz-modal__check,
  .dz-check__circle,
  .dz-check__mark {
    animation: none !important;
    transition: none !important;
  }

  .dz-check__circle,
  .dz-check__mark {
    stroke-dashoffset: 0;
  }

  .dz-modal__dialog {
    transform: none;
    opacity: 1;
  }
}
