/* Homepage enhancements — mobile hero + Get Booked steps */

/* ===== A) Mobile hero layout ===== */
@media (max-width: 1023px) {
  .landing-cta-gradient .landing-glow-container.grid {
    gap: 1rem !important;
    padding-top: 1rem !important;
    /* No bottom pad — avatar sits flush on the hero edge */
    padding-bottom: 0 !important;
  }

  .landing-cta-gradient .landing-rise-lcp {
    font-size: clamp(1.55rem, 6.8vw, 2rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em;
  }

  .landing-cta-gradient .landing-glow-container > div:first-child p {
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
    margin-top: 0.65rem !important;
  }

  /* Username CTA row — prevent overflow on narrow phones */
  .landing-cta-gradient form,
  .landing-cta-gradient [class*="rounded-full"]:has(input) {
    max-width: 100%;
  }

  .landing-cta-gradient input[placeholder="yourname"] {
    font-size: 16px !important; /* avoid iOS zoom */
    min-width: 0;
  }

  /* Character + phone visual — centered horizontally, glued to bottom */
  .landing-cta-gradient .group.relative:has(#hero-profile-cards-mount),
  .landing-cta-gradient .group.relative.block.w-full.self-end {
    display: block !important;
    width: min(100%, 320px) !important;
    max-width: min(100%, 320px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0.15rem !important;
    margin-bottom: 0 !important;
    justify-self: center !important;
    align-self: end !important;
    overflow: visible !important;
  }

  .landing-cta-gradient .group.relative:has(#hero-profile-cards-mount) .landing-image-in.relative,
  .landing-cta-gradient .group.relative.block.w-full.self-end .landing-image-in.relative {
    max-width: 100%;
    width: 100% !important;
    margin-inline: auto;
  }

  .landing-cta-gradient .group.relative.block.w-full.self-end .landing-image-in:has(> video),
  .landing-cta-gradient .group.relative:has(#hero-profile-cards-mount) .landing-image-in:has(> video) {
    display: flex !important;
    align-items: flex-end !important;
  }

  /* Keep character fully inside + glued to bottom of its frame */
  .landing-cta-gradient .hero-carousel-video,
  .landing-cta-gradient img.hero-carousel-video-img {
    object-fit: contain !important;
    object-position: bottom center !important;
    bottom: 0 !important;
  }

  .landing-cta-gradient .hero-section-bg-video {
    object-position: center center !important;
  }

  .hero-profile-cards-mount {
    width: 46% !important;
    max-width: 148px !important;
    top: -0.5rem !important;
    right: -0.15rem !important;
    /* Phone behind character, but big enough to show iPhone bezel */
    z-index: 0 !important;
  }

  /* Character stack above the phone mockup */
  .landing-cta-gradient .group.relative:has(#hero-profile-cards-mount) .landing-image-in.relative {
    position: relative;
    z-index: 3 !important;
  }

  .hero-profile-cards-mount .hero-card-in-phone {
    --hero-s: 0.48;
    --screen-top: 1.4%;
  }

  .hero-profile-cards-mount .hero-card-in-phone__frame {
    z-index: 3 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /*
   * Industry glass bar — must stay inside the character frame.
   * Desktop content (Watch Industry pill) was forcing ~500px width and
   * getting clipped by .landing-cta-gradient { overflow: hidden }.
   */
  .landing-cta-gradient .hero-carousel-bar {
    left: 0.5rem !important;
    right: 0.5rem !important;
    width: auto !important;
    max-width: calc(100% - 1rem) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: 0.45rem !important;
    padding: 0.7rem 0.75rem !important;
    overflow: hidden !important;
  }

  .landing-cta-gradient .hero-carousel-bar > .block.min-w-0,
  .landing-cta-gradient .hero-carousel-bar > .block.min-w-0.flex-1 {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .landing-cta-gradient .hero-carousel-bar .block.truncate,
  .landing-cta-gradient .hero-carousel-bar span.block {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100%;
  }

  .landing-cta-gradient .hero-carousel-bar .text-xl {
    font-size: clamp(0.85rem, 3.6vw, 1.05rem) !important;
    line-height: 1.2 !important;
  }

  /* Watch Industry pill — compact so the bar fits */
  .landing-cta-gradient .hero-carousel-bar .flex.shrink-0.items-center {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    gap: 0.35rem !important;
    padding: 0.35rem 0.55rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
  }

  /* Industry chips row */
  .landing-cta-gradient .block.w-full:has(button[class*="rounded"]) {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .landing-cta-gradient .block.w-full button {
    font-size: 0.72rem !important;
  }
}

@media (max-width: 380px) {
  .landing-cta-gradient .group.relative:has(#hero-profile-cards-mount),
  .landing-cta-gradient .group.relative.block.w-full.self-end {
    width: min(100%, 288px) !important;
    max-width: min(100%, 288px) !important;
  }

  .hero-profile-cards-mount {
    max-width: 132px !important;
  }

  .landing-cta-gradient .landing-rise-lcp {
    font-size: clamp(1.4rem, 7vw, 1.75rem) !important;
  }

  /* Hide “Watch Industry” label text on very narrow screens; keep icon affordance */
  .landing-cta-gradient .hero-carousel-bar .flex.shrink-0.items-center {
    padding: 0.4rem !important;
  }

  .landing-cta-gradient .hero-carousel-bar .flex.shrink-0.items-center > span:not(:has(svg)):not(.sr-only) {
    /* keep short labels; long ones truncate via parent */
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ===== Homepage section bands ===== */
/* For startups… — white */
section.overflow-hidden.py-6.lg\:py-10:has(h2) {
  background-color: #fff;
}

/* Testimonials (Top-rated in booking management) — same sky-50 blue */
section.overflow-hidden.py-12.lg\:py-24:has(h2) {
  background-color: #ebf8ff;
}

/* Get started with Bookme in minutes — equal space top & bottom */
section.landing-glow-container.px-4.pt-10.pb-16 {
  padding-top: 4rem; /* was pt-10 (2.5rem) vs pb-16 (4rem) */
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  section.landing-glow-container.px-4.pt-10.pb-16 {
    padding-top: 5rem; /* match former lg:pb-24 scale evenly */
    padding-bottom: 5rem;
  }
}

section.landing-glow-container.px-4.pt-10.pb-16 > .bg-sky-50 {
  /* Keep the inner card’s equal vertical padding */
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 1024px) {
  section.landing-glow-container.px-4.pt-10.pb-16 > .bg-sky-50 {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* ===== B) Get booked in 3 steps ===== */
.bookme-steps {
  --bm-navy: #00112e;
  --bm-blue: #0167a2;
  --bm-sky: #4fc1f3;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 5.5rem;
  padding: 3.25rem 1rem 3.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79, 193, 243, 0.12), transparent 55%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 45%, #f4f8fc 100%);
}

.bookme-steps__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.bookme-steps__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(1, 103, 162, 0.08);
  color: var(--bm-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* Match other section h2s (landing-glow-h1); keep spacing only here */
.bookme-steps__title {
  margin: 0 auto 0.65rem;
  max-width: 20ch;
  text-wrap: balance;
}

.bookme-steps__subtitle {
  color: rgba(0, 17, 46, 0.62);
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  line-height: 1.5;
  margin: 0 auto 1.75rem;
  max-width: 36rem;
}

/* Video + caption inside one rounded box (no overlay gradient) */
.bookme-steps__media {
  margin: 0 auto 1.5rem;
  max-width: 760px;
}

.bookme-steps__video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.55rem;
  background: #fff;
  box-shadow:
    0 24px 60px -28px rgba(0, 17, 46, 0.35),
    0 0 0 1px rgba(1, 103, 162, 0.12);
}

.bookme-steps__video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #00112e;
  overflow: hidden;
}

.bookme-steps__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #00112e;
}

.bookme-steps__caption {
  position: relative;
  padding: 1.1rem 1.15rem 1.2rem;
  background: #fff;
  text-align: left;
  min-height: 5.5rem;
  overflow: hidden;
}

.bookme-steps__cue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  opacity: 0;
  transform: translateX(28px);
  will-change: opacity, transform;
}

.bookme-steps__cue.is-in {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.bookme-steps__cue.is-out {
  opacity: 0;
  transform: translateX(-14px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.bookme-steps__cue-num {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(145deg, var(--bm-sky), var(--bm-blue) 55%, #052f5c);
  box-shadow: 0 8px 18px -8px rgba(1, 103, 162, 0.7);
}

.bookme-steps__cue-body {
  min-width: 0;
  padding-top: 0.1rem;
}

.bookme-steps__cue-title {
  display: block;
  color: var(--bm-navy);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 0.3rem;
}

.bookme-steps__cue-text {
  display: block;
  color: rgba(0, 17, 46, 0.62);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bookme-steps__cta {
  margin-top: 0.35rem;
}

/* Temporary timeline calibration bar — remove when cues are locked */
.bookme-steps__debug {
  margin: 0.85rem auto 0;
  max-width: 720px;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px dashed rgba(11, 107, 203, 0.35);
  background: rgba(235, 248, 255, 0.85);
  text-align: left;
}

.bookme-steps__debug-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: #0b6bcb;
  margin-bottom: 0.55rem;
}

.bookme-steps__debug-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.bookme-steps__debug-btn {
  appearance: none;
  border: 1px solid rgba(11, 107, 203, 0.28);
  background: #fff;
  color: #0e1726;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
}

.bookme-steps__debug-btn:hover {
  border-color: #0b6bcb;
  color: #0b6bcb;
}

.bookme-steps__debug-time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0e1726;
  min-width: 7.5rem;
}

.bookme-steps__debug-scrub-wrap {
  display: block;
  width: 100%;
}

.bookme-steps__debug-scrub-hint {
  display: block;
  font-size: 0.72rem;
  color: rgba(14, 23, 38, 0.55);
  margin-bottom: 0.35rem;
}

.bookme-steps__debug-scrub {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.bookme-steps__debug-scrub:focus {
  outline: none;
}

.bookme-steps__debug-scrub::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(14, 23, 38, 0.12);
  border: 1px solid rgba(11, 107, 203, 0.25);
}

.bookme-steps__debug-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: #0b6bcb;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(11, 107, 203, 0.45);
  cursor: grab;
}

.bookme-steps__debug-scrub:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.08);
}

.bookme-steps__debug-scrub::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(14, 23, 38, 0.12);
  border: 1px solid rgba(11, 107, 203, 0.25);
}

.bookme-steps__debug-scrub::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0b6bcb;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(11, 107, 203, 0.45);
  cursor: grab;
}

/* Blue pill CTA — white circle + northeast arrow */
.bookme-steps__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.45rem 0.45rem 1.25rem;
  border-radius: 999px;
  background: #0b6bcb;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(11, 107, 203, 0.65);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.bookme-steps__btn:hover {
  background: #0958a8;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(11, 107, 203, 0.75);
}

.bookme-steps__btn-label {
  padding: 0.35rem 0.15rem 0.35rem 0;
}

.bookme-steps__btn-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #fff;
  color: #0b6bcb;
  flex-shrink: 0;
}

.bookme-steps__btn:hover .bookme-steps__btn-icon {
  color: #0958a8;
}

@media (min-width: 768px) {
  .bookme-steps {
    padding: 4.5rem 1.5rem 5rem;
  }

  .bookme-steps__media {
    margin-bottom: 1.75rem;
  }

  .bookme-steps__video-shell {
    border-radius: 1.75rem;
  }

  .bookme-steps__caption {
    padding: 1.25rem 1.4rem 1.4rem;
    min-height: 5.75rem;
  }

  .bookme-steps__cue {
    gap: 1.05rem;
  }

  .bookme-steps__cue-num {
    width: 2.7rem;
    height: 2.7rem;
  }

  .bookme-steps__cue-text {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bookme-steps__cue,
  .bookme-steps__cue.is-in,
  .bookme-steps__cue.is-out {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ===== yourname typewriter ghost (hero + sticky claim) ===== */
.bm-yourname-tw {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  white-space: nowrap;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  opacity: 0.72;
}

/* When ghost is driving the animation, hide native placeholder */
input.bm-yourname-tw-active::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* Match dark hero claim */
.landing-cta-gradient .bm-yourname-tw,
form:has(input.\!text-white) .bm-yourname-tw,
.bm-yourname-tw-active.\!text-white ~ .bm-yourname-tw,
input.\!text-white ~ .bm-yourname-tw,
div:has(> input.\!text-white) > .bm-yourname-tw {
  color: rgba(255, 255, 255, 0.85);
}

/* Light / sticky white claim bar */
div:has(> input:not(.\!text-white)) > .bm-yourname-tw {
  color: #9aa3af;
}

@media (prefers-reduced-motion: reduce) {
  .bm-yourname-tw {
    display: none !important;
  }
}

/* ===== Scroll-to-top (above floating bookme.com/yourname) ===== */
.bm-scroll-top {
  position: fixed;
  left: 20px;
  bottom: 7.5rem;
  z-index: 2147483000;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0165a3;
  color: #fff;
  box-shadow: 0 8px 22px rgba(1, 101, 163, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.92);
  transition:
    opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.28s ease,
    background 0.2s ease,
    bottom 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bm-scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.bm-scroll-top:hover {
  background: var(--landing-primary-hover, #014f80);
}

.bm-scroll-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.bm-scroll-top svg {
  display: block;
}

@media (max-width: 639px) {
  .bm-scroll-top {
    left: max(14px, env(safe-area-inset-left, 0px));
    width: 48px;
    height: 48px;
    z-index: 10050;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-scroll-top {
    transition: opacity 0.15s ease;
    transform: none;
  }
}
