body.demo-modal-open { overflow: hidden; }

.demo-modal {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: #172019;
  background: transparent;
  box-shadow: 0 32px 100px rgba(0,0,0,.28);
}

.demo-modal::backdrop { background: rgba(3,12,7,.72); backdrop-filter: blur(8px); }
.demo-modal[open] { animation: demo-modal-fade .2s ease-out both; }
.demo-modal[open] .demo-modal-panel { animation: demo-modal-rise .28s cubic-bezier(.22,.8,.2,1) both; }
.demo-modal-panel { position: relative; max-height: calc(100dvh - 32px); overflow: auto; padding: 38px; border: 1px solid rgba(13,46,26,.12); border-radius: 24px; background: #fff; }
.demo-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe5e0;
  border-radius: 50%;
  color: #5e6b62;
  background: #f7f8f6;
  font: 400 1.45rem/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.demo-modal-close:hover { color: #142118; border-color: #cfd8d1; background: #eef2ee; }
.demo-modal-label { margin: 0 52px 12px 0; color: #087b3a; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.demo-modal h2 { max-width: 540px; margin: 0; color: #132019; font-size: clamp(2rem,5vw,3rem); font-weight: 700; letter-spacing: -.055em; line-height: 1.03; }
.demo-modal-lead { max-width: 540px; margin: 17px 0 0; color: #667269; font-size: .94rem; line-height: 1.65; }
.demo-form { margin-top: 28px; }
.demo-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.demo-field { display: grid; gap: 8px; color: #344139; font-size: .76rem; font-weight: 550; }
.demo-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #d9e0da;
  border-radius: 11px;
  color: #172019;
  background: #fbfcfb;
  font: 400 .92rem/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.demo-field input::placeholder { color: #9aa49c; }
.demo-field input:hover { border-color: #c5d0c8; background: #fff; }
.demo-field input:focus { border-color: #16844a; background: #fff; box-shadow: 0 0 0 3px rgba(22,132,74,.12); }
.demo-form-actions { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.demo-submit,
.demo-success-close {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid #087b3a;
  border-radius: 999px;
  color: #fff;
  background: #087b3a;
  font: 500 .87rem/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.demo-submit:hover,
.demo-success-close:hover { border-color: #14934c; background: #14934c; box-shadow: 0 10px 28px rgba(8,123,58,.14); }
.demo-submit:disabled { cursor: wait; opacity: .65; box-shadow: none; }
.demo-form-note { margin: 0; color: #7a867d; font-size: .74rem; line-height: 1.5; }
.demo-form-status { min-height: 21px; margin: 13px 0 0; color: #b33a34; font-size: .78rem; line-height: 1.5; }
.demo-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.demo-success { padding: 28px 8px 18px; text-align: center; }
.demo-success[hidden],
.demo-form-view[hidden] { display: none; }
.demo-success-mark { display: grid; width: 58px; height: 58px; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: #06200f; background: #55df83; font-size: 1.5rem; font-weight: 650; }
.demo-success h2 { margin-inline: auto; }
.demo-success p { max-width: 440px; margin: 18px auto 26px; color: #667269; font-size: .96rem; line-height: 1.65; }

@keyframes demo-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes demo-modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
  .demo-modal { width: min(100% - 20px,680px); max-height: calc(100dvh - 20px); border-radius: 19px; }
  .demo-modal-panel { max-height: calc(100dvh - 20px); padding: 30px 20px 24px; border-radius: 19px; }
  .demo-modal-close { top: 14px; right: 14px; }
  .demo-modal h2 { font-size: 2.15rem; }
  .demo-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .demo-form-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .demo-submit { width: 100%; }
  .demo-form-note { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-modal[open],
  .demo-modal[open] .demo-modal-panel { animation: none; }
}
