/* Demo lead capture — layout scoped to body.demo-page, uses mkt-core tokens */

body.demo-page {
  background: var(--page);
  color: var(--text-primary);
}

/* Minimal layout utilities (no Bootstrap) */
body.demo-page .wrapper {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 16% 14%, rgba(var(--green-rgb), 0.08), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(var(--green-rgb), 0.05), transparent 30rem),
    var(--page);
}

body.demo-page .flex-grow-1 {
  flex-grow: 1;
}

body.demo-page .container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--side-pad);
}

body.demo-page .text-center {
  text-align: center;
}

body.demo-page .text-start {
  text-align: start;
}

body.demo-page .vstack {
  display: flex;
  flex-direction: column;
}

body.demo-page .gap-4 {
  gap: 0.7rem;
}

body.demo-page .small {
  font-size: 0.8125rem;
}

body.demo-page .mt-5 {
  margin-top: 2rem;
}

body.demo-page .mb-0 {
  margin-bottom: 0;
}

/* Keep the page stable even when the legacy Bootstrap bundle is unavailable. */
body.demo-page button.btn-mkt {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

body.demo-page .demo-input:-webkit-autofill,
body.demo-page .demo-input:-webkit-autofill:hover,
body.demo-page .demo-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--raised) inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* Page section */
.demo-page-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(1rem, 2.5vw, 1.6rem) 0;
}

.demo-page-section .container {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - clamp(2rem, 5vw, 3.2rem));
  display: flex;
  align-items: stretch;
}

/* Single lead-capture shell */
.demo-shell {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

/* Form card — flat surface aligned with home and pricing */
.demo-form-card {
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
}

/* Logos */
.demo-form-logo {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: fit-content;
}

.demo-form-logo img {
  display: block;
  height: auto;
}

/* Form column */
.demo-form-column {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.demo-form-card {
  position: relative;
  width: min(100%, 28.5rem);
  padding: clamp(1rem, 1.85vw, 1.45rem);
}

.demo-form-card-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-close-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: color 120ms ease, border-color 120ms ease;
}

.demo-close-link:hover {
  color: var(--text-primary);
}

.demo-form-logo {
  display: inline-flex;
  margin-bottom: clamp(0.55rem, 1.2vw, 0.85rem);
}

body.demo-page #demo-form-section .mkt-title-lg {
  margin-bottom: 0.42rem;
}

body.demo-page #demo-form-section .mkt-lead {
  max-width: 25rem;
  margin-inline: auto;
  margin-bottom: 0.9rem;
}

/* Form fields */
body.demo-page #demo-lead-form {
  max-width: 24.5rem;
  margin-inline: auto;
}

body.demo-page .input-group.with-icon {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border-solid);
  border-radius: 12px;
  background: var(--raised);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

body.demo-page .input-group.with-icon:focus-within {
  border-color: var(--green);
  background: var(--overlay);
  box-shadow: 0 0 0 3px rgba(var(--green-rgb), 0.12);
}

body.demo-page .input-group.with-icon .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  color: var(--green);
  font-size: 1rem;
}

body.demo-page .input-group.with-icon .demo-input {
  flex: 1;
  min-width: 0;
  min-height: 3.05rem;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  font-family: inherit;
  font-size: 15px;
  padding: 0 1rem 0 0;
  outline: none;
}

body.demo-page .input-group.with-icon .demo-input::placeholder {
  color: var(--text-tertiary);
}

body.demo-page #demo-form-error {
  color: #ff6b6b;
  font-size: 0.8125rem;
  margin: 0;
}

.demo-form-note {
  max-width: 23rem;
  margin: 0.78rem auto 0;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  line-height: 1.38;
}

/* Cal embed */
.demo-cal-frame {
  overflow: auto;
  height: min(62svh, 38rem);
  min-height: 24rem;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--raised);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.demo-page #my-cal-inline-30min {
  min-height: 44rem;
  overflow: auto !important;
}

body.demo-page #my-cal-inline-30min iframe {
  min-height: 44rem;
}

/* Desktop: fixed viewport layout */
@media (min-width: 992px) {
  body.demo-page {
    overflow: hidden;
  }

  body.demo-page .wrapper {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .demo-page-section {
    box-sizing: border-box;
    height: 100svh;
    min-height: 0;
    padding: clamp(0.65rem, 1.4vw, 1rem) 0;
  }

  .demo-page-section .container {
    height: 100%;
    min-height: 0;
  }

  .demo-shell,
  .demo-form-column,
  .demo-form-card {
    height: 100%;
    min-height: 0;
  }

  .demo-form-card {
    max-height: calc(100svh - 2rem);
  }
}

@media (max-width: 991.98px) {
  body.demo-page {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.demo-page .wrapper {
    min-height: 100svh;
    overflow: visible;
  }

  .demo-page-section {
    height: auto;
    min-height: 100svh;
    padding: 0.8rem 0;
    overflow: hidden;
  }

  .demo-page-section .container {
    min-height: auto;
  }

  .demo-form-card {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  body.demo-page .container {
    padding-inline: 0;
  }

  .demo-page-section {
    padding: 0;
  }

  .demo-form-card {
    border-inline: 0;
    border-radius: 0;
  }

  .demo-form-logo img {
    width: 108px;
  }

  .demo-form-column {
    align-items: stretch;
  }

  .demo-form-card-actions {
    top: 0.85rem;
    right: 0.85rem;
  }

  .demo-form-card {
    padding: 1.25rem 1rem 1.5rem;
  }

  .demo-form-logo {
    margin-bottom: 1.5rem;
  }

  body.demo-page #demo-form-section .mkt-lead {
    margin-bottom: 1.2rem;
  }
}
