/* Floating contact modal v3 (partials/floatingContactModal.php) — loaded on every page from partials/header.php.
   Scoped to .cm so it overrides the old .floating-modal rules in styles.css. */

.floating-modal.cm { padding: 24px; }
.cm .floating-modal-overlay { background: rgba(0, 0, 60, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.cm .cm-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  width: 100%;
  max-width: 960px;
  max-height: calc(100vh - 48px);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 60, 0.65);
  overflow: hidden;
}
.cm.show .cm-card { animation: cm-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes cm-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cm.show .cm-card { animation: none; } }

/* ---------- Left: navy panel ---------- */
.cm-side {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 44px 40px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(ellipse at top right, #1a1aa3 0%, var(--navy) 40%, #00004a 100%);
}
.cm-side::before {            /* faint blueprint grid, like the homepage */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: linear-gradient(160deg, #000 20%, transparent 80%);
          mask-image: linear-gradient(160deg, #000 20%, transparent 80%);
}
.cm-ring {                    /* gold ring peeking from the bottom corner */
  position: absolute;
  z-index: -1;
  right: -110px; bottom: -110px;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 2px solid rgba(225, 166, 65, 0.35);
  box-shadow: inset 0 0 0 36px rgba(225, 166, 65, 0.06);
}
.cm-logo { display: block; width: 150px; height: auto; }

.cm-side-copy { margin-top: auto; }
.cm-eyebrow {
  margin: 0 0 10px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.8);
}
.cm-eyebrow em { color: var(--gold); }
.cm-side h3 { margin: 0 0 14px; font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.cm-side h3 span { display: block; font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; color: var(--gold); }
.cm-side-text { margin: 0; font-size: 0.98rem; line-height: 1.6; color: rgba(255, 255, 255, 0.7); }

.cm-contact { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cm-contact li { display: flex; align-items: center; gap: 14px; }
.cm-icon {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.cm-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cm-contact small { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.cm-contact a { color: #fff; font-weight: 700; text-decoration: none; }
.cm-contact a:hover { color: var(--gold); }

.cm-schedule { align-self: flex-start; color: var(--gold); font-weight: 800; font-size: 0.95rem; text-decoration: none; border-bottom: 2px solid rgba(225, 166, 65, 0.4); padding-bottom: 2px; }
.cm-schedule span { display: inline-block; transition: transform 0.25s ease; }
.cm-schedule:hover span { transform: translateX(4px); }

/* ---------- Right: form ---------- */
.cm-main { position: relative; padding: 44px 44px 40px; overflow-y: auto; }
.cm .cm-close {
  position: absolute;
  top: 18px; right: 18px;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(1, 1, 126, 0.12);
  background: #fff;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.cm .cm-close svg { width: 16px; height: 16px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; }
.cm .cm-close:hover { transform: rotate(90deg); background: var(--gold); border-color: var(--gold); }

.cm-title { margin: 0; font-size: clamp(1.9rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--navy); }
.cm-title em { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; color: var(--gold-accent); }
.cm-sub { margin: 8px 0 26px; font-size: 0.9rem; font-weight: 600; color: var(--gray-medium, #6b7280); }

.cm .cm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.cm .cm-full { grid-column: 1 / -1; }
.cm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cm .cm-field > label,
.cm-chips legend {
  padding: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.cm .cm-form input[type="text"],
.cm .cm-form input[type="tel"],
.cm .cm-form input[type="email"],
.cm .cm-form textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: #f6f4ee;
  font: inherit;
  font-size: 0.98rem;
  color: var(--navy);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cm .cm-form textarea { min-height: 104px; resize: vertical; }
.cm .cm-form input::placeholder, .cm .cm-form textarea::placeholder { color: #9a9aae; }
.cm .cm-form input:focus, .cm .cm-form textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(225, 166, 65, 0.18);
}

/* Inquiry type as pill chips (radio buttons) */
.cm-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.cm-chips legend { margin-bottom: 8px; float: left; width: 100%; }
.cm .cm-chips > label { position: relative; cursor: pointer; font-size: inherit; letter-spacing: 0; text-transform: none; }
.cm-chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.cm-chips span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(1, 1, 126, 0.14);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cm-chips label:hover span { border-color: var(--gold); }
.cm-chips input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.cm-chips input:focus-visible + span { box-shadow: 0 0 0 4px rgba(225, 166, 65, 0.35); }

.cm .cm-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(225, 166, 65, 0.9);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.cm .cm-submit:hover { transform: translateY(-2px); background: var(--navy); color: #fff; opacity: 1; }
.cm .cm-submit:disabled { opacity: 0.7; cursor: wait; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .floating-modal.cm { align-items: flex-start; padding: 12px; overflow-y: auto; }
  .cm .cm-card { grid-template-columns: 1fr; max-height: none; border-radius: 22px; }
  .cm-side { order: 2; gap: 20px; padding: 28px 24px; text-align: center; align-items: center; }
  .cm-side-copy, .cm-logo { display: none; }
  .cm-contact { justify-items: center; }
  .cm-contact li { text-align: left; }
  .cm-schedule { align-self: center; }
  .cm-main { order: 1; padding: 30px 22px 26px; overflow: visible; }
  .cm .cm-close { top: 14px; right: 14px; }
}
@media (max-width: 480px) {
  .cm .cm-form { grid-template-columns: 1fr; }
  .cm-title { padding-right: 44px; }
}

/* ---------- Compact sizing: keep the whole card comfortably inside the viewport ---------- */
@media (min-width: 821px) {
  .cm .cm-card { max-width: 900px; border-radius: 24px; }
  .cm-side { gap: 22px; padding: 34px 34px 30px; }
  .cm-side-copy { margin-top: 18px; }
  .cm-logo { width: 130px; }
  .cm-eyebrow { font-size: 1.15rem; margin-bottom: 6px; }
  .cm-side h3 { font-size: 1.55rem; margin-bottom: 10px; }
  .cm-side-text { font-size: 0.92rem; }
  .cm-contact { gap: 10px; margin-top: auto; }
  .cm-icon { width: 38px; height: 38px; border-radius: 12px; }
  .cm-main { padding: 32px 36px 30px; }
  .cm-title { font-size: 2rem; }
  .cm-sub { margin: 6px 0 18px; font-size: 0.85rem; }
  .cm .cm-form { gap: 12px 12px; }
  .cm .cm-form input[type="text"],
  .cm .cm-form input[type="tel"],
  .cm .cm-form input[type="email"],
  .cm .cm-form textarea { padding: 10px 14px; font-size: 0.94rem; border-radius: 10px; }
  .cm .cm-form textarea { min-height: 80px; }
  .cm-chips span { padding: 7px 14px; font-size: 0.84rem; }
  .cm-chips legend { margin-bottom: 6px; }
  .cm .cm-submit { padding: 13px 22px; font-size: 0.96rem; }
  .cm .cm-close { top: 14px; right: 14px; width: 36px; height: 36px; }
}
/* Short screens: shrink a little more */
@media (min-width: 821px) and (max-height: 760px) {
  .cm-side-text, .cm-sub { display: none; }
  .cm-title { margin-bottom: 14px; }
  .cm .cm-form textarea { min-height: 64px; }
}

/* ---------- Left panel v2: even rhythm + "What happens next" steps ---------- */
.cm-side { justify-content: space-between; }
.cm-side-copy { margin-top: 0 !important; }
.cm-side-text { display: none; }
.cm-contact { margin-top: 0 !important; }

.cm-next {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}
.cm-next-title {
  margin: 0 0 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.cm-next ol { position: relative; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.cm-next ol::before {          /* dashed line joining the numbers */
  content: "";
  position: absolute;
  top: 14px; bottom: 14px; left: 13px;
  border-left: 2px dashed rgba(225, 166, 65, 0.45);
}
.cm-next li { position: relative; display: flex; align-items: flex-start; gap: 14px; }
.cm-next b {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  box-shadow: 0 0 0 4px #0a0a8a;
}
.cm-next span { font-size: 0.84rem; line-height: 1.45; color: rgba(255, 255, 255, 0.65); }
.cm-next strong { display: block; font-size: 0.92rem; color: #fff; }

@media (max-width: 820px) { .cm-next { display: none; } }
@media (min-width: 821px) and (max-height: 700px) { .cm-next span { font-size: 0; } .cm-next strong { font-size: 0.9rem; } .cm-next li { align-items: center; } }
@media (min-width: 821px) {
  .cm-main { display: flex; flex-direction: column; justify-content: center; }
  .cm-next ol::before { bottom: auto; height: calc(100% - 40px); }
}

/* =====================================================================
   Thank-you / error card (.ty) — used by partials/form-result.php (full page after a normal post)
   and by js/script.js (overlay after an AJAX post). Same look in both.
   ===================================================================== */
.ty {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 60, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: 'Inter', system-ui, sans-serif;
}
.ty.is-open { display: flex; animation: ty-fade 0.3s ease both; }
@keyframes ty-fade { from { opacity: 0; } }

/* Full-page version: cream hero background with blueprint grid + gold glow */
.ty.is-static {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background:
    radial-gradient(40% 45% at 85% 15%, rgba(255, 191, 82, 0.35), transparent 70%),
    radial-gradient(35% 40% at 10% 90%, rgba(1, 1, 126, 0.08), transparent 70%),
    linear-gradient(90deg, rgba(1, 1, 126, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(0deg, rgba(1, 1, 126, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    #faf7f0;
}
.ty-brand { display: none; }
.ty.is-static .ty-brand { display: block; }
.ty-brand img { display: block; width: 170px; height: auto; }

.ty-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  padding: 0 44px 34px;
  margin-top: 46px;                 /* room for the badge that overlaps the top edge */
  border-radius: 28px;
  background: #fff;
  border-top: 5px solid var(--gold);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 60, 0.55);
  text-align: center;
  animation: ty-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes ty-rise { from { opacity: 0; transform: translateY(30px) scale(0.96); } }

.ty-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(1, 1, 126, 0.12);
  background: #fff;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}
.ty-close svg { width: 15px; height: 15px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; }
.ty-close:hover { transform: rotate(90deg); background: var(--gold); }

/* Badge: navy disc with a gold tick that draws itself, plus a burst of gold dots */
.ty-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px; height: 104px;
  margin: -52px auto 22px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 10px #fff, 0 24px 50px -16px rgba(1, 1, 126, 0.7);
  animation: ty-pop 0.6s 0.15s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes ty-pop { from { transform: scale(0.3); opacity: 0; } }
.ty-badge svg { width: 58px; height: 58px; fill: none; stroke: var(--gold); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.ty-badge path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: ty-draw 0.5s 0.6s ease-out forwards; }
@keyframes ty-draw { to { stroke-dashoffset: 0; } }
.ty-badge i {
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 9px;
  margin: -4.5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: ty-burst 0.9s 0.55s ease-out forwards;
}
.ty-badge i:nth-child(1) { --x: -78px; --y: -18px; }
.ty-badge i:nth-child(2) { --x: 80px;  --y: -26px; width: 7px; height: 7px; }
.ty-badge i:nth-child(3) { --x: -62px; --y: 44px;  background: var(--navy); width: 6px; height: 6px; }
.ty-badge i:nth-child(4) { --x: 70px;  --y: 40px; }
.ty-badge i:nth-child(5) { --x: -30px; --y: -66px; background: var(--navy); width: 6px; height: 6px; }
.ty-badge i:nth-child(6) { --x: 34px;  --y: -64px; width: 6px; height: 6px; }
@keyframes ty-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  30% { opacity: 1; }
  100% { opacity: 0.85; transform: translate(var(--x), var(--y)) scale(1); }
}

.ty-eyebrow { margin: 0 0 8px; font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 1.25rem; color: var(--gray-dark); }
.ty-eyebrow em { color: var(--gold-accent); }
.ty-title { margin: 0 0 14px; font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; color: var(--navy); }
.ty-title span { display: block; font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--gold-accent); }
.ty-text { max-width: 430px; margin: 0 auto 24px; font-size: 1rem; line-height: 1.6; color: var(--gray-dark); }

.ty-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 26px;
  padding: 16px 14px;
  border-radius: 18px;
  background: #faf7f0;
  list-style: none;
}
.ty-steps li { display: grid; justify-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; line-height: 1.3; color: var(--navy); }
.ty-steps b {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--navy);
}

.ty-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.ty-btn:hover { transform: translateY(-2px); }
.ty-btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 14px 30px -12px rgba(225, 166, 65, 0.9); }
.ty-btn-gold:hover { background: var(--navy); color: #fff; }
.ty-btn-ghost { border-color: rgba(1, 1, 126, 0.18); background: transparent; color: var(--navy); }
.ty-btn-ghost:hover { border-color: var(--navy); }

.ty-contact { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid rgba(1, 1, 126, 0.08); font-size: 0.88rem; }
.ty-contact a { color: var(--navy); font-weight: 700; text-decoration: none; }
.ty-contact a:hover { color: var(--gold-accent); }
.ty-contact span { margin: 0 10px; color: var(--gold-accent); }

/* Error variant */
.ty-card.is-error .ty-badge { background: #fff4e0; box-shadow: 0 0 0 10px #fff, 0 24px 50px -16px rgba(225, 166, 65, 0.7); }
.ty-card.is-error .ty-badge svg { stroke: var(--gold-accent); stroke-width: 5.5; }

@media (prefers-reduced-motion: reduce) {
  .ty-card, .ty-badge, .ty.is-open { animation: none; }
  .ty-badge path { animation: none; stroke-dashoffset: 0; }
  .ty-badge i { animation: none; opacity: 0.85; transform: translate(var(--x), var(--y)); }
}
@media (max-width: 560px) {
  .ty-card { padding: 0 22px 26px; }
  .ty-steps { grid-template-columns: 1fr; justify-items: start; padding: 14px 18px; }
  .ty-steps li { grid-template-columns: 30px 1fr; align-items: center; justify-items: start; text-align: left; font-size: 0.88rem; }
  .ty-btn { width: 100%; justify-content: center; }
}
.ty-btn:focus { outline: none; }
.ty-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255, 191, 82, 0.45); }
