/* Contact page — headline, form on the left, the key on the right */

.contact-page {
  min-height: 100vh; position: relative; overflow: hidden;
  padding: 7.5rem 2.5rem 3rem;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(52vw 70vh at 80% 44%, rgba(96, 165, 250, 0.30) 0%, rgba(147, 197, 253, 0.12) 40%, transparent 68%),
    linear-gradient(160deg, #cfe0f7 0%, #e6f0fb 46%, #ffffff 100%);
}
.contact-page::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, transparent 22%);
}
.contact-shell { position: relative; z-index: 1; }

.contact-shell {
  width: 100%; max-width: 72rem; margin: 0 auto; position: relative; z-index: 1;
}
.contact-headline { text-align: center; }

.contact-headline {
  font-family: "Space Grotesk", "Archivo", sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: 0.06em;
  color: #142745; text-transform: uppercase;
}

.contact-body {
  margin-top: 2.6rem;
  display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 2.5rem; align-items: center;
}

/* ---- left: tab + form, with social rail ---- */
.contact-left { position: relative; padding-left: 0; }
.social-rail {
  position: absolute; left: 0; top: 3.4rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.social-rail a {
  color: #6688c4; transition: color 0.18s ease, transform 0.18s ease;
  display: flex;
}
.social-rail a:hover { color: #1d4ed8; transform: translateY(-2px); }
.social-rail svg { width: 18px; height: 18px; }

.form-tab {
  display: inline-block; position: relative;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #2b62c8;
  padding-bottom: 0.6rem; margin-bottom: 1.6rem;
}
.form-tab::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64%; height: 2px;
  background: linear-gradient(90deg, #3b82f6, transparent);
}

.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-form input, .contact-form textarea {
  width: 100%; box-sizing: border-box;
  padding: 0.8rem 0.95rem; border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #15233f; font-family: var(--font-body); font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8595b2; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: #2563eb; background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.contact-submit {
  margin-top: 0.5rem; padding: 0.85rem 1.4rem; border: 0; cursor: pointer;
  border-radius: 999px; font-family: var(--font-body); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem;
  color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(37, 99, 235, 0.5); }
.contact-sent {
  margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.76rem; color: #6ee7a8;
  opacity: 0; transition: opacity 0.3s ease;
}
.contact-sent.show { opacity: 1; }

/* ---- right: the key ---- */
.key-stage {
  position: relative; min-height: 26rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.key-svg {
  width: min(100%, 34rem); height: auto;
  filter: drop-shadow(0 26px 44px rgba(37, 99, 235, 0.3));
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* the key rests still; it works back and forth in the lock while a field has focus */
#key-swing {
  transform-box: view-box;
  transform-origin: 280px 230px;
  transform: rotate(0deg);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#key-art.is-turning #key-swing {
  animation: key-turn 1.1s ease-in-out infinite;
}
@keyframes key-turn {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(9deg); }
}

/* "Book a demo" buttons land here: stop with the form's label still showing under the nav */
#contact-form { scroll-margin-top: 9rem; }
.contact-lede {
  margin: 1rem auto 0; max-width: 34rem; text-align: center; text-wrap: balance;
  font-family: "Space Grotesk", "Archivo", sans-serif;
  color: #3c4a66; font-size: 1.08rem; line-height: 1.6;
}
.contact-sent.is-bad { color: #b3261e; }
.contact-sent { color: #1c7a43; }
.contact-address a { color: #2563eb; }
.contact-form input, .contact-form textarea { color-scheme: light; }

/* ---- sending, and the "Response received" message that replaces the form ---- */
.contact-form[hidden], .contact-done[hidden] { display: none; }
.contact-submit:disabled { opacity: 0.7; cursor: default; transform: none; }
.contact-extra { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-done {
  padding: 2.2rem 1.8rem 2rem; border-radius: 14px; text-align: center;
  background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(28, 122, 67, 0.28);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.12);
  animation: contact-done-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.contact-done:focus { outline: none; }
.contact-done-tick { width: 56px; height: 56px; color: #1c7a43; }
.contact-done-title {
  margin-top: 0.9rem; font-family: "Space Grotesk", "Archivo", sans-serif; font-weight: 700;
  font-size: 1.6rem; letter-spacing: -0.01em; color: #142745;
}
.contact-done-text { margin-top: 0.6rem; color: #3c4a66; font-size: 0.98rem; line-height: 1.6; overflow-wrap: anywhere; }
.contact-again {
  margin-top: 1.3rem; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.86rem; color: #2563eb; text-decoration: underline;
}
@keyframes contact-done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .contact-done { animation: none; } }

/* address bottom-right */
.contact-address {
  margin-top: 1.5rem; display: flex; align-items: flex-start; gap: 0.6rem;
  justify-content: center; color: #51607e; font-size: 0.85rem; line-height: 1.5;
}
.contact-address svg { width: 16px; height: 16px; color: #3b82f6; margin-top: 2px; flex-shrink: 0; }

@media (max-width: 880px) {
  .contact-body { grid-template-columns: 1fr; gap: 2.5rem; }
  .key-stage { order: -1; min-height: 18rem; }
  .contact-address { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .contact-page { padding: 6rem 1.2rem 2.5rem; }
  .contact-left { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .key-svg { transition: none; } #key-art.is-turning #key-swing { animation: none; } }
