/* Closing invitation and enquiry form; the four demonstrations stay unchanged. */
.contact-closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(#2b2832, #24212b);
}
.contact-invitation {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(46px, 7vw, 100px);
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 7.2vw, 110px) 170px;
  text-align: left;
}
#contact-title { font-size: clamp(60px, 6.4vw, 96px); font-weight: 430; line-height: 1.03; letter-spacing: -.073em; }
#contact-title em { display: inline-block; font-family: var(--font-accent); color: #e0d0e9; font-weight: 400; letter-spacing: -.065em; }
.contact-copy { padding-top: 6px; }
.contact-description { max-width: 39ch; margin: 0; color: #cbc7cf; font-size: clamp(17px, 1.32vw, 20px); line-height: 1.65; letter-spacing: -.018em; text-wrap: pretty; }
.contact-cta { display: inline-flex; align-items: center; justify-content: center; gap: 29px; min-height: 50px; margin-top: 29px; padding: 14px 23px; border: 1px solid #efe3f5; border-radius: 30px; background: #ece2f3; color: #292331; font-size: 15px; font-weight: 550; line-height: 1.2; }
.contact-cta:hover { background: #fbf1ff; border-color: #fbf1ff; }
.contact-cta > span { font-size: 20px; font-weight: 400; line-height: 1; }
.contact-reach { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 22px; color: #b8acbf; font-size: 12px; line-height: 1.6; }
.contact-reach > span { white-space: nowrap; }
.contact-reach > span + span::before { content: "·"; margin-right: 8px; color: #8d7e98; }
.contact-currents { position: absolute; bottom: 0; left: 50%; width: max(100%, 1000px); height: 180px; max-width: none; transform: translateX(-50%); opacity: .65; pointer-events: none; }
.contact-strand { opacity: .62; }
.contact-stream { display: none; stroke-dasharray: 0 114 0 252 0 165 0 379; opacity: .85; }
.contact-currents path { vector-effect: non-scaling-stroke; }
@media (prefers-reduced-motion: no-preference) {
  .contact-currents[data-motion] .contact-stream { display: inline; animation: closing-flow var(--flow) linear var(--offset) infinite paused; }
  .contact-currents[data-running] .contact-stream { animation-play-state: running; }
  /* A full dash-pattern cycle keeps the loop seamless on every curve. */
  @keyframes closing-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -910; } }
}
.site-footer.contact-footer { background: #24212b; }
.contact-footer .frame { border-color: #443b4d; }
.contact-footer-link { min-height: 44px; padding-block: 10px; color: #d5c9df; font-size: 12px; }
.contact-footer-link span { margin-left: 8px; }
.contact-footer-link:hover { color: #f7edff; }
html[data-study-isolated] .contact-closing { display: none; }

#contact-dialog { width: min(552px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 37px; border-color: #6a5b74; background: #302a38; box-shadow: 0 30px 90px #17121d66; overflow-y: auto; }
#contact-dialog .contact-close { position: absolute; top: 11px; right: 11px; z-index: 2; width: 36px; height: 36px; color: #c3b4cc; font-size: 27px; border-radius: 50%; }
#contact-dialog .contact-close:hover { background: #43374d; color: #f7eaff; }
#contact-dialog h2 { margin: 0; font-size: 43px; font-weight: 460; letter-spacing: -.055em; }
#enquiry-description { margin-top: 12px; color: #c2b6cb; font-size: 15px; }
#enquiry-form { margin-top: 24px; }
#contact-dialog .enquiry-details { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; }
#contact-dialog label { margin: 0 0 8px; color: #d8cddd; font-size: 13px; line-height: 1.4; }
#contact-dialog label > span { margin-left: 5px; color: #b2a2bd; font-size: 11px; }
#contact-dialog input, #contact-dialog textarea { display: block; width: 100%; padding: 12px; border: 1px solid #6c5e77; border-radius: 7px; color: #f1e8f5; background: #26212e; font: inherit; font-size: 16px; line-height: 1.5; }
#contact-dialog textarea { min-height: 115px; resize: vertical; }
#contact-dialog textarea::placeholder { color: #998da5; font-size: 14px; line-height: 1.6; }
#enquiry-form > label { margin-top: 22px; }
.enquiry-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#contact-dialog .contact-cta { margin-top: 20px; font-size: 14px; min-height: 46px; padding: 12px 19px; gap: 23px; }
#enquiry-form > .contact-cta { min-width: 166px; }
#contact-dialog [data-submit-label] { font: inherit; line-height: 1.2; }
.enquiry-submit-icon { position: relative; display: block; flex: none; width: 18px; height: 18px; }
.enquiry-submit-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#enquiry-form[data-state="sending"] .enquiry-arrow { display: none; }
#enquiry-form[data-state="sending"] .enquiry-submit-icon::after { content: ""; position: absolute; inset: 1px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.enquiry-surface { position: relative; isolation: isolate; }
#contact-dialog[data-state="sent"] .enquiry-content { opacity: .55; filter: blur(3px); }
.enquiry-success { position: absolute; z-index: 1; inset: -12px; display: grid; place-items: center; padding: 26px 16px; border-radius: 10px; background: rgb(48 42 56 / .72); text-align: center; }
.enquiry-success[hidden] { display: none; }
.enquiry-success-card { width: 100%; }
.enquiry-success-mark { width: 60px; height: 60px; margin: 0 auto 23px; color: #c5dccb; }
.enquiry-success-mark svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.enquiry-success-mark circle { stroke-opacity: .35; }
.enquiry-success-mark path { stroke-width: 2; }
#enquiry-success-title { margin: 0; font-size: 36px; font-weight: 460; letter-spacing: -.045em; line-height: 1.15; outline: none; }
#contact-dialog #enquiry-success-description { margin: 13px 0 0; color: #cbc0d2; font-size: 15px; line-height: 1.6; }
#contact-dialog .enquiry-done { min-width: 106px; margin-top: 28px; }
@media (prefers-reduced-motion: no-preference) {
  #enquiry-form[data-state="sending"] .enquiry-submit-icon::after { animation: enquiry-spin .8s linear infinite; }
  .enquiry-success:not([hidden]) { animation: enquiry-reveal .22s ease-out both; }
  .enquiry-success:not([hidden]) .enquiry-success-mark path { stroke-dasharray: 30; animation: enquiry-check .35s .12s ease-out both; }
  @keyframes enquiry-spin { to { transform: rotate(360deg); } }
  @keyframes enquiry-reveal { from { opacity: 0; } to { opacity: 1; } }
  @keyframes enquiry-check { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
}

@media (max-width: 900px) {
  .contact-invitation { grid-template-columns: minmax(0, 1fr); gap: 31px; padding-block: 68px 145px; }
  #contact-title { font-size: clamp(64px, 9vw, 80px); }
  .contact-copy { padding-top: 0; }
  .contact-description { max-width: 45ch; }
}
@media (max-width: 680px) {
  .contact-invitation { gap: 26px; padding-block: 56px 116px; }
  #contact-title { font-size: clamp(49px, 12.8vw, 72px); line-height: 1.04; }
  .contact-description { max-width: 35ch; font-size: 16px; line-height: 1.65; }
  .contact-copy > .contact-cta { margin-top: 25px; }
  .contact-reach { margin-top: 21px; }
  .contact-currents { width: max(100%, 680px); height: 115px; opacity: .55; }
  .contact-footer .frame { gap: 10px; }
  .contact-footer .footer-actions { gap: 20px; }
  #contact-dialog { padding: 29px 22px 25px; }
  #contact-dialog h2 { font-size: 36px; }
  #contact-dialog .enquiry-details { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  #contact-dialog textarea { min-height: 104px; }
}
@media (max-width: 360px) {
  .contact-invitation { padding-block: 49px 105px; }
  #contact-title { font-size: 47px; }
  .contact-description { font-size: 15px; }
  .contact-footer .footer-actions { gap: 14px; }
  .contact-footer-link, .contact-footer .top-link { font-size: 11px; }
  #contact-dialog { padding-inline: 18px; }
}

/* The live form retains the approved dialog layout. */
.enquiry-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#contact-dialog .enquiry-privacy { margin-top: 18px; color: #c2b6cb; font-size: 12px; line-height: 1.65; }
.enquiry-privacy a { text-decoration: underline; text-underline-offset: 3px; }
.enquiry-error { margin-top: 20px; padding: 13px 15px; border: 1px solid #8b616a; border-radius: 7px; background: #46313e; color: #f1c5c4; font-size: 13px; line-height: 1.6; }
.enquiry-error strong { font-weight: 550; }
#contact-dialog #enquiry-error-message { margin: 5px 0 0; color: #dfc4cb; font-size: 13px; line-height: 1.6; }
#enquiry-form[data-state="sending"] .contact-cta { cursor: wait; }
.contact-footer .footer-actions { flex-wrap: wrap; }
#contact-dialog .contact-direct { margin-top: 22px; color: #c2b6cb; font-size: 13px; line-height: 1.6; }
.contact-direct a { text-decoration: underline; text-underline-offset: 3px; }

/* Turnstile shows its own progress from the moment the form opens. */
.enquiry-verification { margin-top: 16px; }
.enquiry-verification [data-turnstile-widget] { min-height: 65px; }
.enquiry-verification:has([data-turnstile-widget]:empty)[data-verification="idle"] { margin-top: 0; }
#contact-dialog .enquiry-verification p, #contact-dialog .verification-help { margin: 0 0 10px; color: #c2b6cb; font-size: 12px; line-height: 1.6; }
#contact-dialog .verification-retry { min-height: 36px; padding: 6px 0; color: #e0d0e9; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.verification-retry[hidden] { display: none; }
#contact-dialog .contact-cta:disabled { opacity: .6; cursor: default; }
#contact-dialog [data-state="sending"] .contact-cta:disabled { cursor: wait; }
