/* ==========================================================================
   Book a demo page (page-book-demo.php, slug "book-demo")
   Full-screen: blurred app UI behind, the demo card centred on top.
   ========================================================================== */

.bd-body{background:var(--bg);}
.bd{
  position:relative;min-height:100vh;min-height:100svh;
  display:grid;grid-template-rows:auto 1fr;
  padding:0 var(--gut) clamp(24px,4vw,56px);
  overflow:hidden;isolation:isolate;
}

/* ---------- background: the app UI, blurred, drifting very slowly ---------- */
.bd-bg{
  position:fixed;inset:-6%;z-index:-2;
  background-size:cover;background-position:center;
  filter:blur(7px);
  animation:bd-drift 40s ease-in-out infinite alternate;
}
.bd-veil{
  position:fixed;inset:0;z-index:-1;
  background:
    radial-gradient(120% 90% at 50% 50%,rgba(249,250,251,.1) 0%,rgba(249,250,251,.45) 100%),
    rgba(11,12,15,.04);
}
@keyframes bd-drift{
  from{transform:scale(1.04) translate3d(-1%,-1%,0);}
  to{transform:scale(1.1) translate3d(1%,1%,0);}
}

/* ---------- top bar: logo + close ---------- */
.bd-top{
  display:flex;align-items:center;justify-content:space-between;
  height:clamp(64px,7vw,88px);
}
.bd-logo img{height:22px;width:auto;}
.bd-close{
  display:inline-flex;align-items:center;gap:12px;height:40px;padding:0 6px 0 14px;
  color:var(--ink);text-decoration:none;background:rgba(249,250,251,.75);
  border:1px solid var(--line);backdrop-filter:blur(6px);
  transition:border-color .15s ease,color .15s ease;
}
.bd-x{position:relative;width:26px;height:26px;background:var(--ink);transition:background .15s ease;}
.bd-x::before,.bd-x::after{
  content:"";position:absolute;left:50%;top:50%;width:12px;height:1.5px;background:#fff;
  transform:translate(-50%,-50%) rotate(45deg);
}
.bd-x::after{transform:translate(-50%,-50%) rotate(-45deg);}
.bd-close:hover{border-color:var(--blue);color:var(--blue);}
.bd-close:hover .bd-x{background:var(--blue);}

/* ---------- the card (all off-white, no pure white) ---------- */
.bd-card{
  position:relative;align-self:center;justify-self:center;
  width:100%;max-width:1180px;
  display:grid;grid-template-columns:1.05fr 1fr;
  background:var(--bg);border:1px solid var(--line);
  box-shadow:0 30px 80px -30px rgba(11,12,15,.25);
  animation:bd-in .9s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes bd-in{
  from{opacity:0;transform:translateY(24px);}
  to{opacity:1;transform:none;}
}

/* ---------- left: headline + form ---------- */
.bd-left{padding:clamp(32px,4.4vw,64px);display:flex;flex-direction:column;}
.bd-kicker{margin-bottom:clamp(24px,3vw,40px);}
.bd-title{
  font-family:var(--display);font-weight:500;letter-spacing:0;
  font-size:clamp(34px,3.6vw,52px);line-height:1;text-wrap:balance;
}
.bd-lede{margin-top:18px;}

.bd-form{margin-top:clamp(28px,3.4vw,44px);display:grid;gap:18px;max-width:460px;}
.bd-input{
  width:100%;height:54px;padding:0 16px;
  font:16px/1 var(--sans);color:var(--ink);
  background:transparent;border:1px solid var(--line);border-radius:0;
  -webkit-appearance:none;appearance:none;
  transition:border-color .15s ease,background .15s ease;
}
.bd-input::placeholder{color:var(--muted);}
.bd-input:hover{border-color:rgba(11,12,15,.3);}
.bd-input:focus{outline:none;border-color:var(--blue);background:var(--bg-2);}
.bd-input[aria-invalid="true"]{border-color:#e5484d;}

.bd-check{display:flex;align-items:center;gap:12px;font-size:14.5px;color:var(--muted);cursor:pointer;}
.bd-check input{position:absolute;opacity:0;width:1px;height:1px;}
.bd-box{
  flex:0 0 18px;width:18px;height:18px;border:1px solid rgba(11,12,15,.3);background:transparent;
  display:grid;place-items:center;transition:background .15s ease,border-color .15s ease;
}
.bd-box::after{
  content:"";width:9px;height:5px;border-left:1.5px solid #fff;border-bottom:1.5px solid #fff;
  transform:translateY(-1px) rotate(-45deg);opacity:0;
}
.bd-check input:checked + .bd-box{background:var(--blue);border-color:var(--blue);}
.bd-check input:checked + .bd-box::after{opacity:1;}
.bd-check input:focus-visible + .bd-box{outline:2px solid var(--blue);outline-offset:3px;}
.bd-check a{color:var(--ink);text-underline-offset:3px;}
.bd-check a:hover{color:var(--blue);}

.bd-submit{justify-self:start;height:52px;padding:0 24px;}
.bd-submit[disabled]{opacity:.6;cursor:progress;}
.bd-msg{min-height:1.3em;color:var(--muted);}
.bd-msg.is-error{color:#e5484d;}

/* ---------- right: what you'll see + logos ---------- */
.bd-right{
  display:flex;flex-direction:column;
  background:var(--bg);border-left:1px solid var(--line);
}
.bd-h2{
  font-family:var(--display);font-weight:500;letter-spacing:0;
  font-size:clamp(22px,2vw,28px);line-height:1.15;text-wrap:balance;
  padding:clamp(32px,4.4vw,64px) clamp(28px,3.4vw,48px) clamp(24px,2.6vw,36px);
}
.bd-points{list-style:none;margin:0;padding:0;border-top:1px solid var(--line);}
.bd-points li{
  display:grid;grid-template-columns:auto 1fr;column-gap:16px;row-gap:6px;align-items:center;
  padding:clamp(18px,1.8vw,24px) clamp(28px,3.4vw,48px);
  border-bottom:1px solid var(--line);
}
.bd-point-l{color:var(--muted);}
.bd-point-t{grid-column:2;font-size:16.5px;line-height:1.45;color:var(--muted);text-wrap:pretty;}
.bd-point-t b{font-weight:500;color:var(--ink);}

.bd-trusted{margin-top:auto;padding-top:clamp(28px,3vw,40px);}
.bd-trusted-h{padding:0 clamp(28px,3.4vw,48px) 14px;color:var(--muted);border-bottom:1px solid var(--line);}
/* logo wheel: 4 boxes in view. Every few seconds the strip (two copies of the logos) slides
   along by one logo, then waits, and loops (assets/js/logo-wheel.js; the pause is set there).
   Each move: the .9s and the curve in the transition line. Hover pauses it. */
.bd-logos{overflow:hidden;}
.bd-logos-track{display:flex;width:200%;transition:transform .9s cubic-bezier(.7,0,.2,1);}
.bd-logos-track > div{
  flex:1 1 0;min-width:0; /* 8 equal boxes in a strip twice as wide = 4 in view */
  display:grid;place-items:center;height:clamp(72px,6.4vw,92px);
  border-right:1px solid var(--line);
  transition:background-color .2s ease,flex-grow .7s cubic-bezier(.7,0,.2,1);
}
.bd-logos img{height:clamp(24px,2.3vw,34px);width:auto;max-width:78%;object-fit:contain;transition:transform .7s cubic-bezier(.7,0,.2,1);}
/* hover, same as the homepage logo wall (mouse only, wide screens): the wheel stops, the box
   widens to double while the others shrink, the logo grows and the slanted lines show */
@media (hover:hover) and (min-width:901px){
  .bd-logos-track > div:hover{flex-grow:2;background-image:var(--hatch);}
  .bd-logos-track > div:hover img{transform:scale(1.35);}
}

/* ---------- small screens ---------- */
@media (max-width:900px){
  .bd-card{grid-template-columns:1fr;}
  .bd-right{border-left:0;border-top:1px solid var(--line);}
  .bd-form{max-width:none;}
}
@media (max-width:520px){
  .bd-close{padding:0;border:0;background:none;backdrop-filter:none;}
  .bd-close > :not(.bd-x){display:none;}
  .bd-x{width:40px;height:40px;} /* bigger tap target on phones */
  .bd-x::before,.bd-x::after{width:16px;}
  .bd-title{font-size:clamp(30px,9vw,36px);}
  .bd-check{padding:10px 0;margin:-10px 0;} /* taller tap area for the checkbox, same spacing */
  .bd-logos-track{width:400%;} /* 2 boxes in view on phones */
}
@media (prefers-reduced-motion:reduce){
  .bd-bg,.bd-card{animation:none;}
}

/* ==========================================================================
   Demo scheduler page (page-demo-scheduler.php, slug "demo-scheduler")
   Same card and text sizes as Book a demo, flipped: copy, steps and logos on the left;
   HubSpot's calendar centred on the right. The card's height comes from the left side;
   demo-scheduler.js shrinks only the calendar to fit the right side.
   ========================================================================== */
.bd-card--cal{grid-template-columns:1.05fr 1fr;}
.bd-info{display:flex;flex-direction:column;background:var(--bg);}
.bd-info-head{padding:clamp(32px,4.4vw,64px) clamp(28px,3.4vw,48px) clamp(24px,2.6vw,36px);}
.bd-card--cal .bd-points{margin-top:auto;} /* steps + logos sit at the bottom of the left side */
.bd-card--cal .bd-points li{grid-template-columns:1fr;} /* no number boxes on the steps */
.bd-card--cal .bd-point-t{grid-column:1;}

/* right: the calendar. It's HubSpot's own page in a frame, so its colours are set in HubSpot
   (meeting settings > branding). It's placed absolutely so it never makes the card taller. */
.bd-cal{display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--line);}
.bd-cal-main{position:relative;flex:1;overflow:hidden;}
.bd-cal-frame{position:absolute;left:0;top:0;width:420px;transform-origin:0 0;opacity:0;transition:opacity .4s ease;}
.bd-cal-main.is-ready .bd-cal-frame{opacity:1;}
.bd-cal-frame iframe{display:block;width:100% !important;border:0;}
.bd-cal-load{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:var(--muted);}

@media (max-width:900px){
  .bd-card--cal{grid-template-columns:1fr;}
  .bd-cal{border-left:0;border-top:1px solid var(--line);}
  .bd-cal-main{min-height:720px;}
}
