/* Get-a-Demo r1 — page-scoped styles for the native scheduler + details card.
 * Extracted from the standalone (01-get-a-demo-r1.html), tokenized vs ACSS,
 * fpd- BEM-prefixed so the styles are inert on the old live markup after the
 * launch slug swap. Brand fonts + logo are NOT shipped here (theme loads
 * ES Build / Gellix and the site header logo). WCAG fixes preserved:
 * contrast-capped button gradient, 14px text floor, focus rings.
 * The type scale is intentionally larger than the ACSS site scale (WCAG pass),
 * so it is scoped locally as --fpd-* rather than overriding global ACSS vars. */

.fpd {
  /* WCAG-upsized type scale (standalone :root, kept verbatim). Everything else
     maps to the real ACSS variables which already carry identical values. */
  --fpd-h1: 4.4rem;
  --fpd-text-xs: 1.4rem;   /* 14px floor */
  --fpd-text-s: 1.55rem;
  --fpd-text-m: 1.9rem;
  --fpd-text-l: 2.1rem;
  --fpd-white-trans-13: rgba(255, 255, 255, .13); /* no ACSS token */

  font-family: var(--body-font);
  font-size: var(--fpd-text-s);
  line-height: 1.6;
  color: var(--text-light);
}
.fpd *,
.fpd *::before,
.fpd *::after { box-sizing: border-box; }

.fpd :focus-visible {
  outline: 2px solid var(--primary-semi-light);
  outline-offset: 2px;
  border-radius: .4rem;
}

/* atmosphere: brand glows + faint dot grid, scoped to the demo page bg layer */
.fpd-page-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 78rem 52rem at 85% -10%, rgba(107, 46, 229, .34), transparent 62%),
    radial-gradient(ellipse 70rem 48rem at -12% 110%, rgba(166, 65, 217, .20), transparent 60%),
    radial-gradient(ellipse 60rem 40rem at 50% 118%, rgba(17, 4, 46, .85), transparent 70%),
    var(--bg-dark);
}
.fpd-page-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 2.8rem 2.8rem;
  mask-image: radial-gradient(ellipse 90rem 60rem at 70% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90rem 60rem at 70% 0%, #000 0%, transparent 70%);
}

/* hero grid: copy left, form card right (crai-hero__grid pattern) */
.fpd-hero { position: relative; z-index: 1; padding: 6rem var(--space-m) 8rem; }
.fpd-hero__grid {
  max-width: var(--content-width); margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(40rem, .95fr);
  gap: var(--space-l) var(--space-xl); align-items: start;
}
@media (max-width: 991px) {
  .fpd-hero { padding-top: 4rem; }
  .fpd-hero__grid { grid-template-columns: minmax(0, 1fr); }
}
.fpd-hero__copy {
  display: flex; flex-direction: column; row-gap: var(--space-s);
  max-width: 56rem; padding-top: 2rem;
}
.fpd-eyebrow {
  font-size: var(--fpd-text-xs); letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--accent-semi-light);
}
.fpd-hero__heading {
  font-family: var(--heading-font); font-weight: 600; font-size: var(--fpd-h1);
  line-height: 1.06; letter-spacing: -.015em; text-wrap: balance;
}
.fpd-hero__standfirst {
  font-size: var(--fpd-text-m); color: var(--text-light-muted); line-height: 1.55; max-width: 48rem;
}

/* "what happens next" list, crai-layers__list marker language */
.fpd-next-steps { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; margin-top: .8rem; }
.fpd-next-steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start;
  color: var(--text-light-muted); font-size: var(--fpd-text-s);
}
.fpd-next-steps li strong { color: var(--text-light); font-weight: 600; }
.fpd-next-steps__num {
  font-family: var(--heading-font); font-weight: 600; font-size: var(--fpd-text-xs);
  color: var(--primary-light); width: 2.6rem; height: 2.6rem; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; margin-top: .1em;
  border: 1px solid var(--primary-trans-50); border-radius: var(--radius-circle);
  background: var(--primary-ultra-dark-trans-40);
}

/* pill strip (crai-pill-strip pattern) */
.fpd-pill-strip {
  display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; margin-top: var(--space-xs);
  padding-top: var(--space-s); border-top: 1px solid var(--primary-trans-50);
}
.fpd-pill-strip__item {
  font-size: var(--fpd-text-xs); color: var(--text-light-muted); padding: .45em 1em;
  border: 1px solid var(--fpd-white-trans-13); border-radius: var(--radius-circle);
  background: var(--neutral-trans-60);
}
.fpd-pill-strip__item strong { color: var(--text-light); font-weight: 600; }

/* the card: masked form front, then the scheduler */
.fpd-demo-card {
  border: 1px solid var(--primary-trans-50); border-radius: var(--radius);
  background-image: linear-gradient(137deg, var(--base-trans-60) 0%, var(--primary-ultra-dark-trans-40) 100%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: var(--space-m); position: relative; overflow: hidden;
}
.fpd-demo-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .35) 49.5%, rgba(255, 255, 255, 0) 100%);
}
.fpd-demo-card__steps {
  display: flex; align-items: center; gap: 1.2rem; margin-bottom: var(--space-s);
  font-size: var(--fpd-text-xs); color: var(--text-light-muted);
}
.fpd-demo-card__step { display: flex; align-items: center; gap: .7rem; }
.fpd-demo-card__step-dot {
  width: 2.2rem; height: 2.2rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: var(--heading-font); font-weight: 600; font-size: 1.15rem;
  border: 1px solid var(--fpd-white-trans-13); border-radius: var(--radius-circle);
  color: var(--text-light-muted);
}
.fpd-demo-card__step.is-active { color: var(--text-light); }
.fpd-demo-card__step.is-active .fpd-demo-card__step-dot {
  border-color: var(--secondary-semi-light); color: var(--white); background: var(--primary-trans-50);
}
.fpd-demo-card__step-rule { flex: 1; height: 1px; background: var(--fpd-white-trans-13); }

.fpd-demo-form { display: none; flex-direction: column; gap: 1.6rem; }
.fpd-demo-card.is-details .fpd-demo-form { display: flex; }
.fpd-demo-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 478px) { .fpd-demo-form__row { grid-template-columns: 1fr; } }
.fpd-field { display: flex; flex-direction: column; gap: .6rem; }
.fpd-field[hidden] { display: none; }
.fpd [hidden] { display: none !important; }
.fpd-field label {
  font-size: var(--fpd-text-xs); font-weight: 600; color: var(--text-light-muted); letter-spacing: .02em;
}
.fpd-field input, .fpd-field select, .fpd-field textarea {
  font-family: var(--body-font); font-size: var(--fpd-text-s); color: var(--text-light);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--fpd-white-trans-13); border-radius: .75rem;
  padding: 1.1rem 1.3rem; width: 100%; transition: border-color .2s ease, box-shadow .2s ease; appearance: none;
}
.fpd-field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23d9d9d9' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.3rem center; padding-right: 3.6rem; cursor: pointer;
}
.fpd-field select option { background: #1a1a1a; color: #fff; }
.fpd-field textarea { min-height: 8rem; resize: vertical; }
.fpd-field input::placeholder, .fpd-field textarea::placeholder { color: rgba(217, 217, 217, .62); }
.fpd-field input:focus, .fpd-field select:focus, .fpd-field textarea:focus {
  outline: none; border-color: var(--primary-semi-light); box-shadow: 0 0 0 3px rgba(107, 46, 229, .25);
}

/* honeypot: visually gone, present in the DOM for bots */
.fpd-hp-field { position: absolute; left: -500rem; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* gradient stops at secondary so white text never sits on amber
   (white on #A641D9 = 4.8:1, AA; on #FFE6B3 it was 1.2:1). The amber
   survives as a top-edge highlight. */
.fpd-btn-gradient {
  font-family: var(--body-font); font-weight: 600; font-size: var(--fpd-text-s); color: var(--white);
  background-image: linear-gradient(10deg, var(--primary) 30%, var(--secondary) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 230, 179, .5);
  border: none; border-radius: var(--radius); padding: 1.4rem var(--space-l); cursor: pointer;
  transition: all .25s ease; margin-top: .4rem;
}
.fpd-btn-gradient:hover { background-image: none; background-color: var(--black); box-shadow: inset 0 0 0 1px var(--primary-semi-light); }
.fpd-btn-gradient:disabled { opacity: .55; cursor: wait; }
.fpd-demo-form__fineprint { font-size: var(--fpd-text-xs); color: var(--text-light-muted); opacity: .75; }
.fpd-demo-form__fineprint a { color: var(--text-light-muted); }
.fpd-demo-form__error {
  display: none; font-size: var(--fpd-text-xs); color: #ff9d9d;
  border: 1px solid rgba(255, 120, 120, .4); border-radius: .75rem; padding: .9rem 1.2rem;
  background: rgba(120, 20, 20, .25);
}

/* step 1: native scheduler, same card language as the form */
.fpd-scheduler { display: flex; flex-direction: column; gap: 1.6rem; }
.fpd-demo-card.is-details .fpd-scheduler { display: none; }
.fpd-demo-card.is-booked .fpd-demo-form, .fpd-demo-card.is-booked .fpd-scheduler { display: none; }
.fpd-picked-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: var(--fpd-text-s); color: var(--text-light-muted); padding: .9rem 1.2rem;
  border: 1px solid var(--primary-trans-50); border-radius: .75rem; background: var(--primary-ultra-dark-trans-40);
}
.fpd-picked-summary strong { color: var(--text-light); }
.fpd-scheduler__confirm { font-size: var(--fpd-text-s); color: var(--text-light-muted); }
.fpd-scheduler__confirm strong { color: var(--text-light); }
.fpd-scheduler__meta {
  display: flex; align-items: center; gap: 1rem; font-size: var(--fpd-text-xs); color: var(--text-light-muted);
  padding: .9rem 1.2rem; border: 1px solid var(--fpd-white-trans-13); border-radius: .75rem; background: rgba(0, 0, 0, .35);
}
.fpd-scheduler__meta strong { color: var(--text-light); font-weight: 600; }
.fpd-scheduler__loading { font-size: var(--fpd-text-xs); color: var(--text-light-muted); opacity: .8; }
.fpd-slot-days { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.fpd-slot-day {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .1rem; cursor: pointer;
  font-family: var(--body-font); font-size: var(--fpd-text-xs); color: var(--text-light-muted);
  background: transparent; border: 1px solid var(--fpd-white-trans-13); border-radius: .75rem; padding: .7rem 1.3rem;
  transition: all .2s ease;
}
.fpd-slot-day em { font-style: normal; font-family: var(--heading-font); font-weight: 600; font-size: var(--fpd-text-s); color: var(--text-light); }
.fpd-slot-day:hover { border-color: var(--primary-semi-light); }
.fpd-slot-day.is-on { border-color: var(--secondary-semi-light); background: var(--primary-trans-50); color: var(--text-light); }
.fpd-slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 478px) { .fpd-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fpd-slot-time {
  font-family: var(--body-font); font-size: var(--fpd-text-xs); font-weight: 600; color: var(--text-light);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--fpd-white-trans-13); border-radius: .75rem; padding: 1rem .6rem;
  cursor: pointer; transition: all .2s ease; text-align: center;
}
.fpd-slot-time:hover { border-color: var(--primary-semi-light); background: var(--primary-ultra-dark-trans-40); }
.fpd-slot-time.is-on { border-color: var(--secondary-semi-light); background: var(--primary-trans-50); }
.fpd-scheduler__tz { font-size: var(--fpd-text-xs); color: var(--text-light-muted); opacity: .7; }
.fpd-scheduler__book-bar {
  display: none; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
  border-top: 1px solid var(--fpd-white-trans-13); padding-top: 1.6rem;
}
.fpd-scheduler__book-bar.is-visible { display: flex; }
.fpd-scheduler__book-bar .fpd-btn-gradient { margin-top: 0; }
.fpd-scheduler__picked { font-size: var(--fpd-text-s); color: var(--text-light); }
.fpd-booked { display: none; flex-direction: column; align-items: flex-start; gap: 1.2rem; padding: var(--space-s) 0; }
.fpd-booked.is-visible { display: flex; }
.fpd-booked__check {
  width: 4.2rem; height: 4.2rem; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--primary-trans-50); border-radius: var(--radius-circle); background: var(--primary-ultra-dark-trans-40);
  color: var(--accent-semi-light); font-size: 2rem;
}
.fpd-booked__heading { font-family: var(--heading-font); font-weight: 600; font-size: var(--fpd-text-l); color: var(--text-light); }
.fpd-booked__detail { font-size: var(--fpd-text-s); color: var(--text-light-muted); }
.fpd-booked__detail strong { color: var(--text-light); }
.fpd-ghost-link { font-size: var(--fpd-text-xs); color: var(--text-light-muted); text-decoration: underline; text-underline-offset: 4px; }
.fpd-ghost-link:hover { color: var(--text-light); }
button.fpd-ghost-link { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--body-font); }

/* load reveal */
@keyframes fpdFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fpd-hero__copy > *, .fpd-demo-card { animation: fpdFadeUp .6s ease both; }
.fpd-hero__copy > :nth-child(2) { animation-delay: .06s; }
.fpd-hero__copy > :nth-child(3) { animation-delay: .12s; }
.fpd-hero__copy > :nth-child(4) { animation-delay: .18s; }
.fpd-hero__copy > :nth-child(5) { animation-delay: .24s; }
.fpd-demo-card { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .fpd-hero__copy > *, .fpd-demo-card { animation: none; } }
