/* ============================================================
   HostMyBlog — form-popup modal (v3)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: flex-start; justify-content: center; padding: clamp(16px, 5vh, 64px) 16px; overflow-y: auto; }
.modal.is-open { display: flex; }
.modal::before { content: ""; position: fixed; inset: 0; background: rgba(23,19,31,0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade 0.25s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-card { position: relative; width: 540px; max-width: 100%; background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-pop); border: 1px solid var(--line); animation: pop 0.28s var(--ease); margin: auto; }
@media (prefers-reduced-motion: reduce) { .modal::before, .modal-card { animation: none; } }

.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); font-size: 1.3rem; border-radius: 50%; transition: color 0.18s var(--ease), background 0.18s var(--ease); }
.modal-close:hover { color: var(--ink); background: rgba(23,19,31,0.06); }

.modal-head { padding: 32px 34px 0; }
.modal-head .eyebrow { font-size: 0.66rem; }
.modal-head h3 { font-size: 1.75rem; margin-top: 12px; }
.modal-head .sub { color: var(--ink-soft); font-size: 0.9rem; margin-top: 8px; }

.modal-body { padding: 24px 34px 34px; }
.lead-form { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field > label, .field-label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.field-label .opt { color: var(--muted); font-weight: 400; font-family: var(--font-mono); font-size: 0.72rem; }
.field input, .field select, .field textarea { font-family: var(--font-sans); font-size: 0.95rem; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-12); }
.field input::placeholder, .field textarea::placeholder { color: #aaa3b3; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B8398' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.tel-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }

.form-submit { margin-top: 6px; }
.form-fine { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
.form-fine .ic { color: var(--teal); }

.modal-success { padding: 48px 40px 44px; text-align: center; }
.modal-success .check { font-size: 3.6rem; color: var(--teal); display: inline-block; }
.modal-success h3 { font-size: 1.9rem; margin-top: 12px; }
.modal-success p { color: var(--ink-soft); margin-top: 12px; max-width: 38ch; margin-inline: auto; line-height: 1.55; }
.modal-success .btn { margin-top: 26px; }

@media (max-width: 560px) {
  .modal { padding: 0; align-items: stretch; }
  .modal-card { width: 100%; border-radius: 0; min-height: 100%; }
  .field.row2 { grid-template-columns: 1fr; }
  .modal-head { padding: 28px 22px 0; }
  .modal-body { padding: 20px 22px 28px; }
}
