/* ============================================================
   Request a demo (src/pages/contact.astro)
   Scoped under .p-contact. x3 language: ink + breathing aurora,
   tracked labels, off-white 3-step form card.
   Breakpoints: sm 640 / md 768 / lg 1024.
   ============================================================ */

.p-contact .demo-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  background: var(--color-black);
  color: var(--color-white);
  /* the fixed header overlays the top of the hero */
  padding-block: 128px 64px;
}
@media (min-width: 1024px) {
  .p-contact .demo-hero { padding-block: 148px 88px; }
}

/* ---------- aurora (home hero recipe, toned down for form legibility) */
.p-contact .demo-hero__aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.p-contact .demo-blob {
  position: absolute;
  will-change: transform;
}
.p-contact .demo-blob > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  animation: demo-breathe 16s ease-in-out infinite;
}
.p-contact .demo-blob--1 {
  left: -10%;
  top: -14%;
  width: 90vmin;
  height: 90vmin;
  opacity: 0.62;
}
.p-contact .demo-blob--1 > span {
  filter: blur(80px);
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--color-x3-blue-deep) 80%, transparent) 0%,
    color-mix(in oklab, var(--color-x3-blue-deep) 25%, transparent) 45%,
    transparent 68%
  );
}
.p-contact .demo-blob--2 {
  right: -12%;
  top: 40%;
  width: 80vmin;
  height: 80vmin;
  opacity: 0.5;
}
.p-contact .demo-blob--2 > span {
  filter: blur(90px);
  animation-duration: 13s;
  animation-delay: 2s;
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--color-x3-blue-bright) 65%, transparent) 0%,
    color-mix(in oklab, var(--color-blue) 20%, transparent) 48%,
    transparent 68%
  );
}
.p-contact .demo-blob--3 {
  bottom: -24%;
  left: 22%;
  width: 90vmin;
  height: 90vmin;
  opacity: 0.5;
}
.p-contact .demo-blob--3 > span {
  filter: blur(95px);
  animation-duration: 19s;
  animation-delay: 5s;
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--color-x3-indigo) 75%, transparent) 0%,
    color-mix(in oklab, var(--color-x3-blue-deep) 30%, transparent) 45%,
    transparent 68%
  );
}
@keyframes demo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ---------- split layout ---------- */
.p-contact .demo-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--container-large);
  margin-inline: auto;
  padding-inline: 20px;
  display: grid;
  gap: 56px;
  /* copy column tops out level with the form card (Sofia 2026-08-16:
     "align the subtitle, title and body text to top... aligned with the
     beginning of the form") — centering floated the copy mid-card */
  align-items: start;
}
/* children never expand the track past the viewport (single-column mobile) */
.p-contact .demo-hero__inner > * { min-width: 0; }
@media (min-width: 1024px) {
  .p-contact .demo-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 72px;
    padding-inline: 32px;
  }
}

/* ---------- copy column ---------- */
.p-contact .demo-kicker {
  font-size: var(--fs-kicker);
  letter-spacing: var(--track-wide);
  color: rgba(255, 255, 255, 0.5);
}
.p-contact .demo-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tighter);
  font-size: 40px;
  line-height: 1.05;
  color: var(--color-white);
}
@media (min-width: 640px) { .p-contact .demo-title { font-size: 50px; } }
@media (min-width: 1280px) { .p-contact .demo-title { font-size: 58px; } }
.p-contact .demo-sub {
  margin-top: 20px;
  /* wide enough that the positioning sentence holds two lines */
  max-width: 560px;
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  color: rgba(255, 255, 255, 0.7);
}
/* "30-minute" never splits at the hyphen */
.p-contact .demo-nowrap { white-space: nowrap; }

.p-contact .demo-points {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.p-contact .demo-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--fs-sm);
  line-height: 20px;
  color: rgba(255, 255, 255, 0.82);
}
.p-contact .demo-point__check {
  margin-top: 1px;
  display: inline-flex;
  height: 19px;
  width: 19px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  flex-shrink: 0;
  background: color-mix(in oklab, var(--color-x3-blue-deep) 28%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--color-white);
}

.p-contact .demo-logos { margin-top: 44px; }
.p-contact .demo-logos__label {
  font-size: var(--fs-xs);
  letter-spacing: var(--track-widest);
  color: rgba(255, 255, 255, 0.45);
}
.p-contact .demo-logos__row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.p-contact .demo-logos__row img {
  height: var(--logo-h, 22px);
  width: auto;
  /* the /logos/ set mixes color and white fills — force a uniform
     quiet white strip on the ink hero */
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

/* ---------- form card ---------- */
.p-contact .demo-card {
  position: relative;
  background: var(--color-background);
  color: var(--color-foreground);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: none;
}
@media (min-width: 768px) { .p-contact .demo-card { padding: 36px 40px; } }

/* progress */
.p-contact .demo-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.p-contact .demo-progress__step {
  font-size: var(--fs-xs);
  letter-spacing: var(--track-widest);
  color: var(--color-grey-300);
}
.p-contact .demo-progress__step [data-demo-stepnum] { color: var(--color-blue); }
.p-contact .demo-progress__label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-grey-500);
}
.p-contact .demo-progress__track {
  margin-top: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-grey-100);
  overflow: hidden;
}
.p-contact .demo-progress__fill {
  display: block;
  height: 100%;
  width: 33.34%;
  border-radius: 999px;
  background: var(--color-blue);
  transition: width 0.45s var(--ease-out-expo);
}

/* panels — one focused step at a time */
.p-contact .demo-panel {
  display: none;
  margin-top: 26px;
}
.p-contact .demo-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: demo-panel-in 0.4s var(--ease-out-expo);
}
@keyframes demo-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* fields */
.p-contact .demo-row { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .p-contact .demo-row { grid-template-columns: 1fr 1fr; }
}
.p-contact .demo-field { display: block; }
.p-contact .demo-label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-grey-500);
  margin-bottom: 6px;
}
.p-contact .demo-req { color: var(--color-blue); }
.p-contact .demo-input,
.p-contact .demo-textarea {
  width: 100%;
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  font-size: var(--fs-body);
  color: var(--color-grey-600);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.p-contact .demo-input { height: 48px; padding-inline: 14px; }
.p-contact .demo-textarea { padding: 12px 14px; resize: vertical; }
.p-contact .demo-input:focus,
.p-contact .demo-textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px var(--color-blue-100);
}
/* inline validation (demo-form.js): the field goes red with the message
   underneath — the browser's native bubble is suppressed via novalidate */
.p-contact .demo-input.is-invalid,
.p-contact .demo-textarea.is-invalid {
  border-color: var(--color-red-600);
}
.p-contact .demo-input.is-invalid:focus,
.p-contact .demo-textarea.is-invalid:focus {
  border-color: var(--color-red-600);
  box-shadow: 0 0 0 3px var(--color-red-200);
}
.p-contact .demo-error {
  margin: 6px 0 0;
  font-size: var(--fs-xs);
  color: var(--color-red-600);
}
/* the free-text industry line the Other pill reveals */
.p-contact .demo-other {
  display: block;
  margin-top: 14px;
}
.p-contact .demo-other[hidden] { display: none; }

/* pills (radio / checkbox chips) */
.p-contact .demo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.p-contact .demo-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-grey-200);
  background: var(--color-white);
  font-size: var(--fs-sm);
  color: var(--color-grey-500);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.p-contact .demo-pill:hover { border-color: var(--color-grey-300); }
.p-contact .demo-pill:has(input:checked) {
  border-color: var(--color-blue);
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}
.p-contact .demo-pill:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--color-blue-100);
}

/* nav */
.p-contact .demo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.p-contact .demo-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--color-grey-400);
  cursor: pointer;
  transition: color 0.2s ease;
}
.p-contact .demo-back:hover { color: var(--color-grey-600); }
.p-contact .demo-back[hidden] { display: none; }
.p-contact .demo-nav .demo-advance { margin-left: auto; }
.p-contact .demo-nav .demo-advance[hidden] { display: none; }

/* submit pending swap (site.js sets .is-pending on the form) */
/* the label span is a flex row like the .btn itself, so the arrow rides
   beside the text instead of wrapping under it */
.p-contact .demo-submit__idle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.p-contact .demo-submit__pending { display: none; }
.p-contact .demo-form.is-pending .demo-submit__idle { display: none; }
.p-contact .demo-form.is-pending .demo-submit__pending { display: inline; }

.p-contact .demo-fine {
  margin-top: 14px;
  font-size: var(--fs-xs);
  color: var(--color-grey-400);
}

/* success state */
.p-contact .demo-success {
  text-align: center;
  padding: 28px 8px;
}
.p-contact .demo-success__icon {
  display: inline-flex;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-blue-100);
  color: var(--color-blue);
}
.p-contact .demo-success__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tighter);
  font-size: 24px;
  color: var(--color-grey-600);
}
.p-contact .demo-success__body {
  margin: 8px auto 0;
  max-width: 340px;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--color-grey-400);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .p-contact .demo-blob > span { animation: none; }
  .p-contact .demo-panel.is-active { animation: none; }
  .p-contact .demo-progress__fill { transition: none; }
}

/* ---------- HubSpot variant (.demo-card--hs) ----------
   FormHero.astro (Sofia 2026-08-14: every form page rides the /demo/
   template). The card carries a HubSpot-injected form; these rules dress
   HubSpot's own markup (.hs-form) in the demo-form field language above.
   Only existing tokens — the field recipe mirrors .demo-input verbatim. */
.p-contact .demo-card__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: var(--track-tighter);
  color: var(--color-foreground);
}
.p-contact .demo-card__desc {
  margin: 0 0 18px;
  font-size: var(--fs-sm);
  color: var(--color-grey-500);
}
.p-contact .demo-card--hs .hs-form-field { margin-bottom: 16px; }
.p-contact .demo-card--hs .hs-form-field > label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-grey-500);
  margin-bottom: 6px;
}
.p-contact .demo-card--hs .hs-form-required { color: var(--color-blue); }
.p-contact .demo-card--hs .hs-input {
  width: 100%;
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  font-size: var(--fs-body);
  font-family: inherit;
  color: var(--color-grey-600);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.p-contact .demo-card--hs input.hs-input,
.p-contact .demo-card--hs select.hs-input { height: 48px; padding-inline: 14px; }
.p-contact .demo-card--hs textarea.hs-input { min-height: 96px; padding: 12px 14px; resize: vertical; }
.p-contact .demo-card--hs input.hs-input[type="checkbox"],
.p-contact .demo-card--hs input.hs-input[type="radio"] {
  width: auto; height: auto; padding: 0; margin-right: 8px;
}
.p-contact .demo-card--hs .hs-input:focus {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px var(--color-blue-100);
}
.p-contact .demo-card--hs .hs-input.invalid,
.p-contact .demo-card--hs .hs-input.error {
  border-color: var(--color-red-600);
}
.p-contact .demo-card--hs .hs-error-msgs {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.p-contact .demo-card--hs .hs-error-msgs label {
  font-size: var(--fs-xs);
  color: var(--color-red-600);
}
/* two-column rows: HubSpot floats fieldset halves — contain and gap them */
.p-contact .demo-card--hs fieldset { max-width: none; border: 0; margin: 0; padding: 0; }
.p-contact .demo-card--hs fieldset.form-columns-2 { display: flex; gap: 12px; }
.p-contact .demo-card--hs fieldset.form-columns-2 .hs-form-field { width: 50%; float: none; }
.p-contact .demo-card--hs fieldset .hs-form-field .hs-input { width: 100%; }
@media (max-width: 560px) {
  .p-contact .demo-card--hs fieldset.form-columns-2 { flex-direction: column; gap: 0; }
  .p-contact .demo-card--hs fieldset.form-columns-2 .hs-form-field { width: 100%; }
}
/* legal consent rich text */
.p-contact .demo-card--hs .hs-richtext,
.p-contact .demo-card--hs .legal-consent-container {
  font-size: var(--fs-xs);
  color: var(--color-grey-500);
  margin-top: 10px;
}
.p-contact .demo-card--hs .hs-richtext a { color: var(--color-blue); }
/* submit — the demo-advance primary look, one line always */
.p-contact .demo-card--hs .hs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  height: 48px;
  padding-inline: 22px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background-color: var(--color-blue);
  background-image: linear-gradient(115deg, var(--color-blue) 0%, var(--color-blue) 48%, var(--color-black) 100%);
  background-size: 230% 100%;
  background-position: 0% 0;
  color: var(--color-white);
  font-size: var(--fs-body);
  font-family: inherit;
  cursor: pointer;
  transition: background-position 0.5s var(--ease-out-expo);
}
.p-contact .demo-card--hs .hs-button:hover { background-position: 100% 0; }
.p-contact .demo-card--hs .submitted-message {
  font-size: var(--fs-body);
  color: var(--color-grey-600);
}
